icetInputOutputBuffers3
Usage
#include <GL/ice-t.h>
| void icetInputOutputBuffers( | GLenum | inputs, |
| GLenum | outputs ); |
Overview
icetInputOutputBuffers sets what OpenGL frame buffers IceT reads and generates. During a call to icetDrawFrame, IceT reads the input buffers directly from OpenGL after it performs a callback to the draw function (set by icetDrawFunc). Output buffers are stored internally after the call to icetDrawFrame finishes. The output buffers can be retrieved with calls to the icetGetColorBuffer and icetGetDepthBuffer functions. In addition, if the color buffer output is on and ICET_DISPLAY is enabled, the color buffer is also written back to the OpenGL frame buffer before icetDrawFrame returns.
Both inputs and outputs are or'ed values of one or more of the following flags:
ICET_COLOR_BUFFER_BIT-
Reads/generates color data. Color data is stored in RGBA or BGRA format. Each channel is 8-bits, resulting in a 32-bit word when combined together. Each 32-bit color value is always aligned on 32-bit word boundaries for faster computation.
ICET_DEPTH_BUFFER_BIT-
Reads/generates depth data. Depth data is stored as 32-bit unsigned integers.
The current values of the input and output buffers are stored in the ICET_INPUT_BUFFERS and ICET_OUTPUT_BUFFERS state variables. By default, the ICET_INPUT_BUFFERS value is set to $(ICET_COLOR_BUFFER_BIT | ICET_DEPTH_BUFFER_BIT)$, and the ICET_OUTPUT_BUFFERS value is set to $ICET_COLOR_BUFFER_BIT$.
The composition operator IceT uses is defined by the inputs. If the depth buffer is an input, then Z comparison is performed. If the depth buffer is not an input, alpha blending is performed. Note that in the latter case, order of composition may matter and therefore not all composition strategies will work.
Errors
ICET_INVALID_VALUE-
An output was selected that is not also an input or no outputs were selected at all.
Warnings
None.