15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_blend_func_separate 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_blend_func_separate 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Date: 04/06/1999 Version 1.3 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 173 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci None 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciOverview 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Blending capability is extended by defining a function that allows 245bd8deadSopenharmony_ci independent setting of the RGB and alpha blend factors for blend 255bd8deadSopenharmony_ci operations that require source and destination blend factors. It 265bd8deadSopenharmony_ci is not always desired that the blending used for RGB is also applied 275bd8deadSopenharmony_ci to alpha. 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciNew Procedures and Functions 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci void BlendFuncSeparateEXT(enum sfactorRGB, 325bd8deadSopenharmony_ci enum dfactorRGB, 335bd8deadSopenharmony_ci enum sfactorAlpha, 345bd8deadSopenharmony_ci enum dfactorAlpha); 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNew Tokens 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 395bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci BLEND_DST_RGB_EXT 0x80C8 425bd8deadSopenharmony_ci BLEND_SRC_RGB_EXT 0x80C9 435bd8deadSopenharmony_ci BLEND_DST_ALPHA_EXT 0x80CA 445bd8deadSopenharmony_ci BLEND_SRC_ALPHA_EXT 0x80CB 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 GL Specification (OpenGL Operation) 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci None 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 GL Specification (Rasterization) 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci None 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 GL Specification (Per-Fragment Operations 565bd8deadSopenharmony_ciand the Framebuffer) 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci The RGB and alpha blend factors are separate. The function 595bd8deadSopenharmony_ci BlendFuncSeparateEXT allows the specification of the four factors. 605bd8deadSopenharmony_ci Table 4.1 and Table 4.2 are modified as follows: 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci Value RGB Factors Alpha Factors 635bd8deadSopenharmony_ci ------------------ ---------------------------- ------------- 645bd8deadSopenharmony_ci ZERO (0, 0, 0) 0 655bd8deadSopenharmony_ci ONE (1, 1, 1) 1 665bd8deadSopenharmony_ci DST_COLOR (Rd/Kr, Gd/Kg, Bd/Kb) Ad/Ka 675bd8deadSopenharmony_ci ONE_MINUS_DST_COLOR (1-Rd/Kr, 1-Gd/Kg, 1-Bd/Kb) 1-Ad/Ka 685bd8deadSopenharmony_ci SRC_ALPHA (As/Ka, As/Ka, As/Ka) As/Ka 695bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-As/Ka, 1-As/Ka, 1-As/Ka) 1-As/Ka 705bd8deadSopenharmony_ci DST_ALPHA (Ad/Ka, Ad/Ka, Ad/Ka) Ad/Ka 715bd8deadSopenharmony_ci ONE_MINUS_DST_ALPHA (1-Ad/Ka, 1-Ad/Ka, 1-Ad/Ka) 1-Ad/Ka 725bd8deadSopenharmony_ci CONSTANT_COLOR (Rc, Gc, Bc) Ac 735bd8deadSopenharmony_ci ONE_MINUS_CONSTANT_COLOR (1-Rc, 1-Gc, 1-Bc) 1-Ac 745bd8deadSopenharmony_ci CONSTANT_ALPHA (Ac, Ac, Ac) Ac 755bd8deadSopenharmony_ci ONE_MINUS_CONSTANT_ALPHA (1-Ac, 1-Ac, 1-Ac) 1-Ac 765bd8deadSopenharmony_ci SRC_ALPHA_SATURATE (f, f, f) 1 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci Value RGB Factors Alpha Factors 795bd8deadSopenharmony_ci ------------------ ---------------------------- ------------- 805bd8deadSopenharmony_ci ZERO (0, 0, 0) 0 815bd8deadSopenharmony_ci ONE (1, 1, 1) 1 825bd8deadSopenharmony_ci SRC_COLOR (Rs/Kr, Gs/Kg, Bs/Kb) As/Ka 835bd8deadSopenharmony_ci ONE_MINUS_SRC_COLOR (1-Rs/Kr, 1-Gs/Kg, 1-Bs/Kb) 1-As/Ka 845bd8deadSopenharmony_ci SRC_ALPHA (As/Ka, As/Ka, As/Ka) As/Ka 855bd8deadSopenharmony_ci ONE_MINUS_SRC_ALPHA (1-As/Ka, 1-As/Ka, 1-As/Ka) 1-As/Ka 865bd8deadSopenharmony_ci DST_ALPHA (Ad/Ka, Ad/Ka, Ad/Ka) Ad/Ka 875bd8deadSopenharmony_ci ONE_MINUS_DST_ALPHA (1-Ad/Ka, 1-Ad/Ka, 1-Ad/Ka) 1-Ad/Ka 885bd8deadSopenharmony_ci CONSTANT_COLOR (Rc, Gc, Bc) Ac 895bd8deadSopenharmony_ci ONE_MINUS_CONSTANT_COLOR (1-Rc, 1-Gc, 1-Bc) 1-Ac 905bd8deadSopenharmony_ci CONSTANT_ALPHA (Ac, Ac, Ac) Ac 915bd8deadSopenharmony_ci ONE_MINUS_CONSTANT_ALPHA (1-Ac, 1-Ac, 1-Ac) 1-Ac 925bd8deadSopenharmony_ci SRC_ALPHA_SATURATE (f, f, f) 1 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci The commands that control blending are 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci void BlendFunc(enum src, enum dst) 975bd8deadSopenharmony_ci void BlendFuncSeparateEXT(enum sfactorRGB, enum dfactorRGB, 985bd8deadSopenharmony_ci enum sfactorAlpha, enum dfactorAlpha); 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci The BlendFunc command sets both source factors (RGB and alpha) and 1015bd8deadSopenharmony_ci destination factors (RGB and alpha) while BlendFuncSeparateEXT sets 1025bd8deadSopenharmony_ci the RGB factors independently from the alpha factors. 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 GL Specification (Special Functions) 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci None 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 GL Specification (State and State Requests) 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci The state required is four integers indicating the source and 1115bd8deadSopenharmony_ci destination blending functions for RGB and alpha. The initial state 1125bd8deadSopenharmony_ci for both source functions is ONE. The initial state for both 1135bd8deadSopenharmony_ci destination functions is ZERO. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ciAdditions to the GLX Specification 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci None 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ciGLX Protocol 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci A new GL rendering command is added. The following command is sent 1225bd8deadSopenharmony_ci to the server as part of a glXRender request: 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci BlendFuncSeparateEXT 1255bd8deadSopenharmony_ci 2 20 rendering command length 1265bd8deadSopenharmony_ci 2 4134 rendering command opcode 1275bd8deadSopenharmony_ci 4 ENUM sfactorRGB 1285bd8deadSopenharmony_ci 4 ENUM dfactorRGB 1295bd8deadSopenharmony_ci 4 ENUM sfactorAlpha 1305bd8deadSopenharmony_ci 4 ENUM dfactorAlpha 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ciErrors 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci GL_INVALID_ENUM is generated if either sfactorRGB, dfactorRGB, 1355bd8deadSopenharmony_ci sfactorAlpha, or dfactorAlpha is not an accepted value. 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci GL_INVALID_OPERATION is generated if glBlendFunc is executed between 1385bd8deadSopenharmony_ci the execution of glBegin and the corresponding execution of glEnd. 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ciNew State 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci The get values BLEND_SRC and BLEND_DST return the RGB source and 1435bd8deadSopenharmony_ci destination factor, respectively. 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci Initial 1465bd8deadSopenharmony_ci Get Value Get Command Type Value Attribute 1475bd8deadSopenharmony_ci --------- ----------- ---- ------- ------------ 1485bd8deadSopenharmony_ci BLEND_SRC_RGB_EXT GetFloatv Z ONE color-buffer 1495bd8deadSopenharmony_ci BLEND_DST_RGB_EXT GetFloatv Z ZERO color-buffer 1505bd8deadSopenharmony_ci BLEND_SRC_ALPHA_EXT GetFloatv Z ONE color-buffer 1515bd8deadSopenharmony_ci BLEND_DST_ALPHA_EXT GetFloatv Z ZERO color-buffer 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ciNew Implementation Dependent State 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci None 156