HP SVA V2.0 Parallel Compositing Reference Guide
You can run the multitile sample in two configurations:
• With Display nodes only
To run the sample in this configuration, you need a Display Surface for example, tile2x2.
(You create new Display Surfaces using the Display Surface Configuration tool, which is
described in the HP SVA System Administration Guide.) Launch the sample using its launch
script with a command such as the following:
$ ./launch-multitile.sh -d tile2x2
• With Display nodes and render nodes
To run the sample in this configuration, you need a Display Surface and some number of
render nodes, for example, 4. Use a command such as the following:
$ ./launch-multitile.sh -d tile2x2 -r 4
1.7 Coding Tips
This section contains two kinds of tips:
• Common programming errors.
• Techniques to maximize performance.
1.7.1 Common Programming Errors
• Retrieving Framelets from a Graphics Card
The Library and OpenGL take different approach to pixel buffers. OpenGL lets the program
dictate the format of the pixel buffers retrieved from the graphics card. If the graphics card
holds pixels in a different format from what the program requests, OpenGL converts pixels
to the format you requested. In performance critical situations, the programmer normally
does a considerable amount of experimentation trying to find the format that is most efficient.
The Library spends a high percentage of its time transferring images. Consequently, it
requires that you tell it the format of your data. Similarly, the Library tells you the format
of the pixels it provides to you.
The key to providing framelets to the Library is to make sure you describe framelets correctly.
Since the most common source of pixels for framelets is OpenGL, you need to make sure
that format of the pixels you retrieve from the graphics cards is what you have declared in
the Library context.
The PC_PIXEL_FORMAT context property describes the pixels in your framelets. It encodes
both the format of color channel and the format of any additional information, such as depth
or alpha values.
The following table shows the pixel formats supported by the Library and how they
correspond to OpenGL attributes:
OpenGL TypeOpenGL FormatPX_PIXEL_FORMAT
GL_UNSIGNED_BYTEGL_BGRAPC_PF_BGRA8
GL_UNSIGNED_BYTEGL_BGRPC_PF_BGR8
GL_UNSIGNED_BYTEGL_RGBAPC_PF_RGBA8
• Drawing an Output to a Graphics Card
The pixels in an output have the same format as those supplied to the Library in framelets.
Typically, a program writes these pixels to a window using a function, such as the OpenGL
22 Main Areas of the Parallel Compositing Library