15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci APPLE_texture_format_BGRA8888 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_APPLE_texture_format_BGRA8888 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Benj Lipchak, Apple (lipchak 'at' apple.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciIP Status 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci No known IP issues. 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciStatus 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Complete. 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciVersion 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Last Modified Date: June 26, 2013 245bd8deadSopenharmony_ci Revision: 3 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ciNumber 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci OpenGL ES Extension #79 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciDependencies 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci Written based on the wording of the OpenGL ES 1.1 specification. 335bd8deadSopenharmony_ci There are interactions with OpenGL ES 3.0 or EXT_texture_storage. 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciOverview 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci This extension introduces BGRA_EXT as an acceptable external format. 385bd8deadSopenharmony_ci This avoids byte swizzling when loading RGBA internal format 395bd8deadSopenharmony_ci textures, which may be stored in BGRA order internally. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciIssues 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci None. 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciNew Procedures and Functions 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci None. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciNew Tokens 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci Accepted by the <format> parameters of TexImage2D and TexSubImage2D: 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci GL_BGRA_EXT 0x80E1 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci Accepted by the <internalformat> parameters of TexStorage2D and 565bd8deadSopenharmony_ci TexStorage3D: 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci GL_BGRA8_EXT 0x93A1 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 1.1 Specification (OpenGL ES Operation) 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci None 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 1.1 Specification (Rasterization) 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci Section 3.6.2, add the following row to Table 3.3: 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci Format Name Element Meaning and Order Target Buffer 695bd8deadSopenharmony_ci ----------- ------------------------- ------------- 705bd8deadSopenharmony_ci BGRA_EXT B, G, R, A Color 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci Section 3.6.2, add the following row to Table 3.4: 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci Format Type Bytes per Pixel 755bd8deadSopenharmony_ci -------- ------------- --------------- 765bd8deadSopenharmony_ci BGRA_EXT UNSIGNED_BYTE 4 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci Section 3.7.1, change the 4th paragraph to loosen the requirement that 795bd8deadSopenharmony_ci <internalformat> must match <format> for the case of BGRA_EXT format, which 805bd8deadSopenharmony_ci must have an RGBA internal format. In this case we do not generate the 815bd8deadSopenharmony_ci error INVALID_OPERATION. 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 1.1 Specification (Per-Fragment Operations and the Framebuffer) 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci None 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL ES 1.1 Specification (Special Functions) 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci None 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 1.1 Specification (State and State Requests) 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci None 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ciDependencies on OpenGL ES 3.0 or EXT_texture_storage 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci When the GL is OpenGL ES 3.0, the following table entry is added to 985bd8deadSopenharmony_ci Table 3.2: 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci Format Type External Bytes per Pixel Internal Format 1015bd8deadSopenharmony_ci -------- ------------- ------------------------ --------------- 1025bd8deadSopenharmony_ci BGRA_EXT UNSIGNED_BYTE 4 BGRA8_EXT 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci When the GL is OpenGL ES 3.0, BGRA8_EXT is also added to the Texture-only 1055bd8deadSopenharmony_ci color formats list in the Required Texture Formats subsection of section 1065bd8deadSopenharmony_ci 3.8.3. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci If the GL is not OpenGL ES 3.0 and the EXT_texture_storage extension is not 1095bd8deadSopenharmony_ci present, omit references to BGRA8_EXT and TexStorage*. 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci Note that despite TexStorage* being defined in terms of TexImage*, 1125bd8deadSopenharmony_ci BGRA8_EXT is not accepted as an <internalformat> parameter to TexImage* 1135bd8deadSopenharmony_ci when the GL is OpenGL ES 3.0. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci Details of how this extension interacts with EXT_texture_storage when the 1165bd8deadSopenharmony_ci GL is a version of OpenGL earlier than 3.0 can be found in the 1175bd8deadSopenharmony_ci EXT_texture_storage spec. 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ciErrors 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci INVALID_ENUM is generated by TexImage2D if <internalformat> is BGRA_EXT. 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci INVALID_OPERATION is generated by TexImage2D if <format> is BGRA_EXT and 1245bd8deadSopenharmony_ci <internalformat> is not RGBA. 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ciNew State 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci None 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ciNew Implementation Dependent State 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci None 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ciRevision History 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci #3 06/26/2013 Benj Lipchak Add ES3 interactions 1375bd8deadSopenharmony_ci #2 10/27/2009 Benj Lipchak Add EXT suffix to BGRA token 1385bd8deadSopenharmony_ci #1 05/14/2009 Benj Lipchak First draft 139