int PEXNextPass( Display *display, PEXRenderer renderer, int next_pass )
Number of passes required to complete multipass operation.
Invoke PEXNextPass to signify the end of a multipass-rendering pass for the renderer identified by renderer, and, if applicable, the beginning of the next pass for that renderer.
The renderer executes any processing necessary to finish the pass. The number of additional passes required, if known, is returned by this function.
PEXlib defines the following values for next_pass:
If the client sends an additional pass when that pass was not required, then the result is implementation-dependent.
Except where defined otherwise in this description, the returned value indicates whether additional passes are needed to complete the current multipass session. A value of zero indicates that rendering is complete and that this request caused the renderer state to become PEXRendering. A value of -1 indicates that the number of passes needed to complete rendering is unknown, and the client is expected to send passes until a count of zero is returned.
When a multipass session ends, whether fully completed or prematurely terminated, all resources other than the frame buffer, such as the Z-buffer and accumulation buffers, are left in an implementation-dependent state. Therefore, continuing in single-pass rendering mode after completing multipass typically requires initialization of all applicable states and resources.
For a list of all Renderer functions and related topics, see Rendering.