15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci OES_blend_subtract 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_OES_blend_subtract 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: 05/19/2009 Version 1.0 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNumber 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci OpenGL ES Extension #3 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciDependencies 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Written based on the wording of the OpenGL ES 1.1 specification. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciOverview 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci Blending capability is extended by respecifying the entire blend 475bd8deadSopenharmony_ci equation. While this document defines only two new equations, the 485bd8deadSopenharmony_ci BlendEquationOES procedure that it defines will be used by subsequent 495bd8deadSopenharmony_ci extensions to define additional blending equations. 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci In addition to the default blending equation, two new blending equations 525bd8deadSopenharmony_ci are specified. These equations are similar to the default blending 535bd8deadSopenharmony_ci equation, but produce the difference of its left and right hand sides, 545bd8deadSopenharmony_ci rather than the sum. Image differences are useful in many image 555bd8deadSopenharmony_ci processing applications. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciNew Procedures and Functions 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci void BlendEquationOES(enum mode); 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciNew Tokens 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci Accepted by the <mode> parameter of BlendEquationOES: 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci FUNC_ADD_OES 0x8006 665bd8deadSopenharmony_ci FUNC_SUBTRACT_OES 0x800A 675bd8deadSopenharmony_ci FUNC_REVERSE_SUBTRACT_OES 0x800B 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 705bd8deadSopenharmony_ci and GetFloatv: 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci BLEND_EQUATION_OES 0x8009 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 1.1 Specification (OpenGL Operation) 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci None 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 1.1 Specification (Rasterization) 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci None 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 1.1 Specification (Per-Fragment Operations 835bd8deadSopenharmony_ciand the Framebuffer) 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci Replace the 1st paragraph of the "Blend Equation" discussion in section 865bd8deadSopenharmony_ci 4.1.7 (Blending) with the following: 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci "Blending is controlled by the blend equations, defined by the command 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci void BlendEquationOES(enum mode); 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci <mode> determines the blend equation. <mode> must be one of FUNC_ADD_OES, 935bd8deadSopenharmony_ci FUNC_SUBTRACT_OES, or FUNC_REVERSE_SUBTRACT_OES." 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci Replace the last paragraph of the "Blend Equation" discussion in section 965bd8deadSopenharmony_ci 4.1.7 (Blending) with the following: 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci "Table 4.blendeq provides the corresponding per-component blend equations 995bd8deadSopenharmony_ci for each mode. In the table, the s subscript on a color component 1005bd8deadSopenharmony_ci abbreviation (R, G, B, or A) refers to the source color component for an 1015bd8deadSopenharmony_ci incoming fragment and the d subscript on a color component abbreviation 1025bd8deadSopenharmony_ci refers to the destination color component at the corresponding framebuffer 1035bd8deadSopenharmony_ci location. A color component abbreviation without a subscript refers to the 1045bd8deadSopenharmony_ci new color component resulting from blending. Additionally, Sr, Sg, Sb, and 1055bd8deadSopenharmony_ci Sa are the red, green, blue, and alpha components of the source weighting 1065bd8deadSopenharmony_ci factors determined by the source blend function, and Dr, Dg , Db, and Da 1075bd8deadSopenharmony_ci are the red, green, blue, and alpha components of the destination weighting 1085bd8deadSopenharmony_ci factors determined by the destination blend function. Blend functions are 1095bd8deadSopenharmony_ci described below. 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci Mode Equation 1125bd8deadSopenharmony_ci ------------------------- --------------------- 1135bd8deadSopenharmony_ci FUNC_ADD_OES R = Rs * Sr + Rd * Dr 1145bd8deadSopenharmony_ci G = Gs * Sg + Gd * Dg 1155bd8deadSopenharmony_ci B = Bs * Sb + Bd * Db 1165bd8deadSopenharmony_ci A = As * Sa + Ad * Da 1175bd8deadSopenharmony_ci ------------------------- --------------------- 1185bd8deadSopenharmony_ci FUNC_SUBTRACT_OES R = Rs * Sr - Rd * Dr 1195bd8deadSopenharmony_ci G = Gs * Sg - Gd * Dg 1205bd8deadSopenharmony_ci B = Bs * Sb - Bd * Db 1215bd8deadSopenharmony_ci A = As * Sa - Ad * Da 1225bd8deadSopenharmony_ci ------------------------- --------------------- 1235bd8deadSopenharmony_ci FUNC_REVERSE_SUBTRACT_OES R = Rd * Dr - Rs * Sr 1245bd8deadSopenharmony_ci G = Gd * Dg - Gs * Sg 1255bd8deadSopenharmony_ci B = Bd * Db - Bs * Sb 1265bd8deadSopenharmony_ci A = Ad * Da - As * Sa 1275bd8deadSopenharmony_ci ------------------------- --------------------- 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci Table 4.blendeq: Blend equations." 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci In the "Blending State" paragraph, insert the following: 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci "The state required for blending is... one integer indicating the 1345bd8deadSopenharmony_ci blend equation... The initial blending equation is FUNC_ADD_OES." 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL ES 1.1 Specification (Special Functions) 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci None 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 1.1 Specification (State and State Requests) 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci None 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciErrors 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci INVALID_ENUM is generated by BlendEquationOES if its single parameter 1475bd8deadSopenharmony_ci is not FUNC_ADD_OES, FUNC_SUBTRACT_OES, or FUNC_REVERSE_SUBTRACT_OES. 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ciNew State 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci Get Value Get Command Type Initial Value 1525bd8deadSopenharmony_ci --------- ----------- ---- ------------- 1535bd8deadSopenharmony_ci BLEND_EQUATION_OES GetIntegerv Z3 FUNC_ADD_OES 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ciNew Implementation Dependent State 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci None 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ciRevision History 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci 2009/05/19 Benj Lipchak First draft of true extension specification 1625bd8deadSopenharmony_ci 163