Contents
- Dependencies
- Overview
- New Procedures and Functions
- New Tokens
- Errors
- New State
Dependencies
The extension is written against the OpenGL 2.0 Specification.
OpenGL 2.0 is required.
Overview
This extension builds upon the GL_ARB_draw_buffers extension and provides separate blend enables and color write masks for each color output. In GL_ARB_draw_buffers (part of OpenGL 2.0), separate values can be written to each color buffer, but the blend enable and color write mask are global and apply to all color outputs.
While this extension does provide separate blend enables, it does not provide separate blend functions or blend equations per color output.
New Procedures and Functions
``` void ColorMaskIndexedEXT(uint buf, boolean r, boolean g, boolean b, boolean a);
void GetBooleanIndexedvEXT(enum value, uint index, boolean *data);
void GetIntegerIndexedvEXT(enum value, uint index, int *data);
void EnableIndexedEXT(enum target, uint index);
void DisableIndexedEXT(enum target, uint index);
boolean IsEnabledIndexedEXT(enum target, uint index); ```
New Tokens
None.
Errors
The error INVALID_ENUM is generated by EnableIndexedEXT and DisableIndexedEXT if the
<target>
parameter is not BLEND.
The error INVALID_OPERATION is generated by EnableIndexedEXT and DisableIndexeEXT if the
<target>
parameter is BLEND and the
<index>
parameter is outside the range [0, MAX_DRAW_BUFFERS-1].
The error INVALID_ENUM is generated by IsEnabledIndexedEXT if the
<target>
parameter is not BLEND.
The error INVALID_OPERATION is generated by IsEnabledIndexedEXT if the
<target>
parameter is BLEND and the
<index>
parameter is outside the range [0, MAX_DRAW_BUFFERS-1].
The error INVALID_OPERATION is generated by DrawBufferColorMaskEXT if the
<buf>
parameter is outside the range [0, MAX_DRAW_BUFFERS-1].
The error INVALID_ENUM is generated by GetBooleanIndexedvEXT if the
<target>
parameter is not BLEND.
The error INVALID_OPERATION is generated by GetBooleanIndexedvEXT if the
<target>
parameter is BLEND and the
<index>
parameter is outside the range [0, MAX_DRAW_BUFFERS-1].
New State
| Get Target | Type | Get Command | Initial Value | Description | |:---------------|:---------|:----------------|:------------------|:----------------| |BLEND | B | IsEnabled | False |Blending enabled for draw buffer 0| |BLEND | B | IsEnabledIndexedEXT| False |Blending enabled for draw buffer i where i is specified as
<index>
|
| Get Value | Type | Get Command | Initial Value | Description | |:--------------|:---------|:----------------|:------------------|:----------------| |COLOR_WRITEMASK| 4xB |GetBooleanv |True |Color write mask for draw buffer 0 color-buffer| |COLOR_WRITEMASK| 4xB | GetBooleanIndexedvEXT| True |Color write mask for draw buffer i where i is specified as
<index>
|