15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci OES_blend_equation_separate 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_OES_blend_equation_separate 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Benj Lipchak, Apple (lipchak 'at' apple.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNotice 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Copyright (c) 2009-2013 The Khronos Group Inc. Copyright terms at 165bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciSpecification Update Policy 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 215bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL ES Working Group. For 225bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 235bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 245bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 255bd8deadSopenharmony_ci described in more detail at 265bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciStatus 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci Ratified by the Khronos BOP, July 31, 2009. 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciVersion 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Date: 06/17/2009 Version 1.1 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNumber 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci OpenGL ES Extension #1 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciDependencies 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Written based on the wording of the OpenGL ES 1.1 specification. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci OES_blend_subtract is required for blend equation support. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciOverview 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci OpenGL ES 1.1 provides a single blend equation that applies to both RGB 495bd8deadSopenharmony_ci and alpha portions of blending. This extension provides a separate blend 505bd8deadSopenharmony_ci equation for RGB and alpha to match the generality available for blend 515bd8deadSopenharmony_ci factors. 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ciNew Procedures and Functions 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci void BlendEquationSeparateOES(enum modeRGB, enum modeAlpha); 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciNew Tokens 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and 605bd8deadSopenharmony_ci GetFloatv: 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci BLEND_EQUATION_RGB_OES 0x8009 (same as BLEND_EQUATION_OES) 635bd8deadSopenharmony_ci BLEND_EQUATION_ALPHA_OES 0x883D 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 1.1 Specification (OpenGL Operation) 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci None 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 1.1 Specification (Rasterization) 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci None 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 1.1 Specification (Per-Fragment Operations 745bd8deadSopenharmony_ciand the Framebuffer) 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci Replace the first paragraph of the "Blend Equation" discussion in section 775bd8deadSopenharmony_ci 4.1.7 (Blending) with the following: 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci "Blending is controlled by the blend equations, defined by the commands 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci void BlendEquationOES(enum mode); 825bd8deadSopenharmony_ci void BlendEquationSeparateOES(enum modeRGB, enum modeAlpha); 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci BlendEquationSeparateOES argument <modeRGB> determines the RGB blend 855bd8deadSopenharmony_ci equation while <modeAlpha> determines the alpha blend equation. 865bd8deadSopenharmony_ci BlendEquationOES argument <mode> determines both the RGB and alpha blend 875bd8deadSopenharmony_ci equations. <modeRGB> and <modeAlpha> must each be one of FUNC_ADD_OES, 885bd8deadSopenharmony_ci FUNC_SUBTRACT_OES, or FUNC_REVERSE_SUBTRACT_OES. 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci Replace the last paragraph of the "Blend Equation" discussion in section 915bd8deadSopenharmony_ci 4.1.7 (Blending) with the following: 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci Table 4.blendeq provides the corresponding per-component blend 945bd8deadSopenharmony_ci equations for each mode, whether acting on RGB components for <modeRGB> 955bd8deadSopenharmony_ci or the alpha component for <modeAlpha>. 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci In the table, the "s" subscript on a color component abbreviation 985bd8deadSopenharmony_ci (R, G, B, or A) refers to the source color component for an incoming 995bd8deadSopenharmony_ci fragment and the "d" subscript on a color component abbreviation refers 1005bd8deadSopenharmony_ci to the destination color component at the corresponding framebuffer 1015bd8deadSopenharmony_ci location. A color component abbreviation without a subscript refers to 1025bd8deadSopenharmony_ci the new color component resulting from blending. Additionally, Sr, Sg, 1035bd8deadSopenharmony_ci Sb, and Sa are the red, green, blue, and alpha components of the source 1045bd8deadSopenharmony_ci weighting factors determined by the source blend function, and Dr, Dg, Db, 1055bd8deadSopenharmony_ci and Da are the red, green, blue, and alpha components of the destination 1065bd8deadSopenharmony_ci weighting factors determined by the destination blend function. Blend 1075bd8deadSopenharmony_ci functions are described below. 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci Mode RGB components Alpha component 1105bd8deadSopenharmony_ci --------------------- ---------------------- ---------------------- 1115bd8deadSopenharmony_ci FUNC_ADD Rc = Rs * Sr + Rd * Dr Ac = As * Sa + Ad * Da 1125bd8deadSopenharmony_ci Gc = Gs * Sg + Gd * Dg 1135bd8deadSopenharmony_ci Bc = Bs * Sb + Bd * Db 1145bd8deadSopenharmony_ci --------------------- ---------------------- ---------------------- 1155bd8deadSopenharmony_ci FUNC_SUBTRACT Rc = Rs * Sr - Rd * Dr Ac = As * Sa - Ad * Da 1165bd8deadSopenharmony_ci Gc = Gs * Sg - Gd * Dg 1175bd8deadSopenharmony_ci Bc = Bs * Sb - Bd * Db 1185bd8deadSopenharmony_ci --------------------- ---------------------- ---------------------- 1195bd8deadSopenharmony_ci FUNC_REVERSE_SUBTRACT Rc = Rd * Sr - Rs * Dr Ac = Ad * Sa - As * Da 1205bd8deadSopenharmony_ci Gc = Gd * Sg - Gs * Dg 1215bd8deadSopenharmony_ci Bc = Bd * Sb - Bs * Db 1225bd8deadSopenharmony_ci --------------------- ---------------------- ---------------------- 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci Table 4.blendeq: RGB and alpha blend equations." 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci In the "Blending State" paragraph, insert the following in place of 1275bd8deadSopenharmony_ci existing blend equation state: 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci "The state required for blending is... two integers indicating the RGB 1305bd8deadSopenharmony_ci and alpha blend equations... The initial blending equations for RGB and 1315bd8deadSopenharmony_ci alpha are FUNC_ADD_OES." 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL ES 1.1 Specification (Special Functions) 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci None 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 1.1 Specification (State and State Requests) 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci None 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ciErrors 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci INVALID_ENUM is generated if either the modeRGB or modeAlpha 1445bd8deadSopenharmony_ci parameter of BlendEquationSeparateOES is not one of FUNC_ADD_OES, 1455bd8deadSopenharmony_ci FUNC_SUBTRACT_OES, or FUNC_REVERSE_SUBTRACT_OES. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ciNew State 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci Initial 1505bd8deadSopenharmony_ci Get Value Get Command Type Value 1515bd8deadSopenharmony_ci ------------------------ ----------- ---- ------------ 1525bd8deadSopenharmony_ci BLEND_EQUATION_RGB_OES GetIntegerv Z FUNC_ADD_OES 1535bd8deadSopenharmony_ci BLEND_EQUATION_ALPHA_OES GetIntegerv Z FUNC_ADD_OES 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci [remove BLEND_EQUATION_OES from the table, add a note "BLEND_EQUATION_OES" 1565bd8deadSopenharmony_ci beside BLEND_EQUATION_RGB_OES to note the aliased name.] 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ciNew Implementation Dependent State 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci None 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ciRevision History 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci 2009/06/17 Benj Lipchak Remove MIN/MAX from Table 4.blendeq 1655bd8deadSopenharmony_ci 2009/05/19 Benj Lipchak First draft of true extension specification 1665bd8deadSopenharmony_ci 167