15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_blend_minmax
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_blend_minmax
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Last Modified Date: September 17, 2009
125bd8deadSopenharmony_ci    Version:            1.5
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciNumber
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    OpenGL Extension #37
175bd8deadSopenharmony_ci    OpenGL ES Extension #65
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciDependencies
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    There is an interaction with OpenGL ES.
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciOverview
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    Blending capability is extended by respecifying the entire blend
265bd8deadSopenharmony_ci    equation.  While this document defines only two new equations, the
275bd8deadSopenharmony_ci    BlendEquationEXT procedure that it defines will be used by subsequent
285bd8deadSopenharmony_ci    extensions to define additional blending equations.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    The two new equations defined by this extension produce the minimum
315bd8deadSopenharmony_ci    (or maximum) color components of the source and destination colors.
325bd8deadSopenharmony_ci    Taking the maximum is useful for applications such as maximum projection
335bd8deadSopenharmony_ci    in medical imaging.
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ciIssues
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    *   I've prefixed the ADD token with FUNC, to indicate that the blend
385bd8deadSopenharmony_ci        equation includes the parameters specified by BlendFunc.  (The min
395bd8deadSopenharmony_ci        and max equations don't.)  Is this necessary?  Is it too ugly?
405bd8deadSopenharmony_ci        Is there a better way to accomplish the same thing?
415bd8deadSopenharmony_ci    
425bd8deadSopenharmony_ciNew Procedures and Functions
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    void BlendEquationEXT(enum mode);
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ciNew Tokens
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    Accepted by the <mode> parameter of BlendEquationEXT:
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci        FUNC_ADD_EXT                     0x8006
515bd8deadSopenharmony_ci        MIN_EXT                          0x8007
525bd8deadSopenharmony_ci        MAX_EXT                          0x8008
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
555bd8deadSopenharmony_ci    GetFloatv, and GetDoublev:
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci        BLEND_EQUATION_EXT               0x8009
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation)
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    None
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization)
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    None
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations
685bd8deadSopenharmony_ciand the Framebuffer)
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    The GL Specification defines a single blending equation.  This
715bd8deadSopenharmony_ci    extension introduces a blend equation mode that is specified by calling
725bd8deadSopenharmony_ci    BlendEquationEXT with one of three enumerated values.  The default
735bd8deadSopenharmony_ci    value FUNC_ADD_EXT specifies that the blending equation defined in
745bd8deadSopenharmony_ci    the GL Specification be used.  This equation is
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci        C' = (Cs * S) + (Cd * D)
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ci             /  1.0     C' > 1.0
795bd8deadSopenharmony_ci        C = (
805bd8deadSopenharmony_ci             \   C'     C' <= 1.0
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    where Cs and Cd are the source and destination colors, and S and D are
835bd8deadSopenharmony_ci    as specified by BlendFunc.
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    If BlendEquationEXT is called with <mode> set to MIN_EXT, the
865bd8deadSopenharmony_ci    blending equation becomes
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci        C = min (Cs, Cd)
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    Finally, if BlendEquationEXT is called with <mode> set to MAX_EXT, the
915bd8deadSopenharmony_ci    blending equation becomes
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci        C = max (Cs, Cd)
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci    In all cases the blending equation is evaluated separately for each
965bd8deadSopenharmony_ci    color component.
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions)
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci    None
1015bd8deadSopenharmony_ci
1025bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests)
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    None
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ciAdditions to the GLX Specification
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    None
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ciGLX Protocol
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci    A new GL rendering command is added. The following command is sent to the 
1135bd8deadSopenharmony_ci    server as part of a glXRender request:
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci        BlendEquationEXT
1165bd8deadSopenharmony_ci            2           8               rendering command length
1175bd8deadSopenharmony_ci            2           4097            rendering command opcode
1185bd8deadSopenharmony_ci            4           ENUM            mode
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ciDependencies on OpenGL ES
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    If the GL is OpenGL ES, only the new MIN_EXT and MAX_EXT blend equations
1235bd8deadSopenharmony_ci    are introduced by this extension.  BlendEquationOES, FUNC_ADD_OES, and
1245bd8deadSopenharmony_ci    BLEND_EQUATION_OES are introduced by the OES_blend_subtract extension,
1255bd8deadSopenharmony_ci    which is required for this extension to operate.  Alternatively,
1265bd8deadSopenharmony_ci    OpenGL ES 2.0 is required, which introduces BlendEquation, FUNC_ADD, and
1275bd8deadSopenharmony_ci    BLEND_EQUATION without the suffixes.
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    MIN_EXT and MAX_EXT should be added to Table 4.blendeq described in the
1305bd8deadSopenharmony_ci    OES_blend_subtract extension specification, and Table 4.1 of the OpenGL
1315bd8deadSopenharmony_ci    ES 2.0 specification.
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    Mentions of GetDoublev, Begin/End, and GLX in this extension specification
1345bd8deadSopenharmony_ci    can be ignored for OpenGL ES.  Also, BlendEquationEXT and FUNC_ADD_EXT
1355bd8deadSopenharmony_ci    instead have the OES suffix courtesy of OES_blend_subtract, or no suffix
1365bd8deadSopenharmony_ci    courtesy of core OpenGL ES 2.0.
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ciErrors
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    INVALID_ENUM is generated by BlendEquationEXT if its single parameter
1415bd8deadSopenharmony_ci    is not FUNC_ADD_EXT, MIN_EXT, or MAX_EXT.
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci    INVALID_OPERATION is generated if BlendEquationEXT is executed between
1445bd8deadSopenharmony_ci    the execution of Begin and the corresponding execution to End.
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ciNew State
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci    Get Value           Get Command     Type    Initial Value   Attribute
1495bd8deadSopenharmony_ci    ---------           -----------     ----    -------------   ---------
1505bd8deadSopenharmony_ci    BLEND_EQUATION_EXT  GetIntegerv     Z3      FUNC_ADD_EXT    color-buffer
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ciNew Implementation Dependent State
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    None
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ciRevision History
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    Version 1.5, September 17, 2009 (Jon Leech) -
1595bd8deadSopenharmony_ci        Merge into OpenGL Registry version of the extension and assign
1605bd8deadSopenharmony_ci        OpenGL ES extension number.
1615bd8deadSopenharmony_ci    Version 1.4, May 19, 2009 (Benj Lipchak) -
1625bd8deadSopenharmony_ci        Adapted for OpenGL ES.
1635bd8deadSopenharmony_ci    Version 1.3, May 31, 1995 -
1645bd8deadSopenharmony_ci        Last SGI revision.
165