Class ARBDrawBuffersBlend
This extension builds upon the ARB_draw_buffers
and EXT_draw_buffers2
extensions. In ARB_draw_buffers (part of OpenGL 2.0), separate
values could be written to each color buffer. This was further enhanced by EXT_draw_buffers2 by adding in the ability to enable blending and to set
color write masks independently per color output.
This extension provides the ability to set individual blend equations and blend functions for each color output.
Requires OpenGL 2.0
and EXT_draw_buffers2
. Promoted to core in OpenGL 4.0
.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
glBlendEquationiARB
(int buf, int mode) Provides a way to enable blending and set color write masks independently per color output.static void
glBlendEquationSeparateiARB
(int buf, int modeRGB, int modeAlpha) Provides a way to enable blending and set color write masks independently per color output.static void
glBlendFunciARB
(int buf, int src, int dst) Provides a way to enable blending and set color write masks independently per color output.static void
glBlendFuncSeparateiARB
(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) Provides a way to enable blending and set color write masks independently per color output.
-
Method Details
-
glBlendEquationiARB
public static void glBlendEquationiARB(int buf, int mode) Provides a way to enable blending and set color write masks independently per color output.This call modifies the blend equations associated with an individual draw buffer.
The error
INVALID_ENUM
is generated if thebuf
parameter is outside the range [0,MAX_DRAW_BUFFERS
– 1].The error
INVALID_ENUM
is generated ifmode
is not one ofFUNC_ADD
,FUNC_SUBTRACT
,FUNC_REVERSE_SUBTRACT
,MAX
, orMIN
.The error
INVALID_OPERATION
is generated if this method is executed between the execution ofBegin
and the corresponding execution ofEnd
.- Parameters:
buf
- an integer that indicates theDRAW_BUFFER
to modify.mode
- determines both the RGB and alpha blend equations. One of:FUNC_ADD
FUNC_SUBTRACT
FUNC_REVERSE_SUBTRACT
MIN
MAX
-
glBlendEquationSeparateiARB
public static void glBlendEquationSeparateiARB(int buf, int modeRGB, int modeAlpha) Provides a way to enable blending and set color write masks independently per color output.This call modifies the blend equations associated with an individual draw buffer.
The error
INVALID_ENUM
is generated if thebuf
parameter is outside the range [0,MAX_DRAW_BUFFERS
– 1].The error
INVALID_ENUM
is generated if eithermodeRGB
ormodeAlpha
are not one ofFUNC_ADD
,FUNC_SUBTRACT
,FUNC_REVERSE_SUBTRACT
,MAX
, orMIN
.The error
INVALID_OPERATION
is generated if this method is executed between the execution ofBegin
and the corresponding execution ofEnd
.- Parameters:
buf
- an integer that indicates theDRAW_BUFFER
to modify.modeRGB
- the RGB blend equation. One of:FUNC_ADD
FUNC_SUBTRACT
FUNC_REVERSE_SUBTRACT
MIN
MAX
modeAlpha
- the alpha blend equation. One of:FUNC_ADD
FUNC_SUBTRACT
FUNC_REVERSE_SUBTRACT
MIN
MAX
-
glBlendFunciARB
public static void glBlendFunciARB(int buf, int src, int dst) Provides a way to enable blending and set color write masks independently per color output.This call modifies the blend functions associated with an individual draw buffer.
The error
INVALID_ENUM
is generated if thebuf
parameter is outside the range [0,MAX_DRAW_BUFFERS
– 1].The error
INVALID_ENUM
is generated if eithersrc
, ordst
is not an accepted value.The error
INVALID_OPERATION
is generated if this method is executed between the execution ofBegin
and the corresponding execution ofEnd
.- Parameters:
buf
- an integer that indicates theDRAW_BUFFER
to modify.src
- determines both RGB and alpha source functionsdst
- determines both RGB and alpha destination functions
-
glBlendFuncSeparateiARB
public static void glBlendFuncSeparateiARB(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) Provides a way to enable blending and set color write masks independently per color output.This call modifies the blend functions associated with an individual draw buffer.
The error
INVALID_ENUM
is generated if thebuf
parameter is outside the range [0,MAX_DRAW_BUFFERS
– 1].The error
INVALID_ENUM
is generated if eithersrcRGB
,dstRGB
,srcAlpha
, ordstAlpha
is not an accepted value.The error
INVALID_OPERATION
is generated if this method is executed between the execution ofBegin
and the corresponding execution ofEnd
.- Parameters:
buf
- an integer that indicates theDRAW_BUFFER
to modify.srcRGB
- the source RGB blend functiondstRGB
- the destination RGB blend functionsrcAlpha
- the source alpha blend functiondstAlpha
- the destination alpha blend function
-