HP SVA V2.0 Parallel Compositing Reference Guide

Table 1-2 Typical Call Sequence (continued)
CommentStep
Either the pcContextCreate or
pcContextCreateMaster function creates a session.
Exactly one host calls pcContextCreateMaster to
enumerate all the hosts that share the context. The
remaining hosts call pcContextCreate when they are
ready to share the context.
3. Create a context.
The Library needs to know certain properties of the frames
that are produced, such as the overall size of the frame.
It is common for one host (often the master), to set these
properties and the remaining hosts to get these properties
so the hosts can work cooperatively. pcContextSet
and pcContextGet… functions set and get context
properties.
4. Set or get context properties.
This step represents the host’s rendering code. When it
is time to render another frame, the host executes this
step.
5. For each frame…
Sometimes it is necessary to adjust context properties
before rendering. A change to the size of the frame is a
typical example. Like Step 4, the changes are often made
by one host and retrieved by all the remaining hosts.
5a. Adjust context properties.
This step begins the frame for the Library. Using the
pcFrameBegin function , the Library learns how many
framelets this host will produce for this frame and the
dimensions of each framelet.
5b. Begin the frame.
5c. For each framelet contributed by this host…
This is the typical point where the host renders the pixels
for a framelet.
5c(i). Render the pixels for the framelet.
Once the pixels are rendered, they are handed to the
Library. Based on the information supplied by all hosts
in Step 5b, the Library knows how it must composite the
framelet. Either of two functions implement this step:
pcFrameAddFramelet or
pcFrameAddGLFrameletEXT.
5c(ii). Add the framelet to the frame.
At this point, the host has delivered all it framelets. When
the last host reaches this point, all the information needed
to construct the frame is available to the Library.
pcFrameEnd is the function called to perform this step.
5d. End the frame.
Any host that has requested output can now retrieve that
output via one or more results.
5e. For each result you want to retrieve…
This step actually retrieves the output. The program
requests the data as one or more channels of information.
Two common channels are PC_CHANNEL_COLOR and
PC_CHANNEL_DEPTH.
5e(i). Retrieve the needed channels.
To destroy a context, each host calls pcContextDestroy.
6. Destroy the context.
To destroy a session, each host calls pcSessionDestroy.
7. Destroy the session.
This optional step unloads the Library. Call
pcSystemFinalize to unload the Library.
This step is useful if you want to call
pcSystemInitialize with a different search path.
8. Optional: Un-initialize the Library.
16 Main Areas of the Parallel Compositing Library