• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    APPLE_texture_format_BGRA8888
4
5Name Strings
6
7    GL_APPLE_texture_format_BGRA8888
8
9Contact
10
11    Benj Lipchak, Apple (lipchak 'at' apple.com)
12
13IP Status
14
15    No known IP issues.
16
17Status
18
19    Complete.
20
21Version
22
23    Last Modified Date: June 26, 2013
24    Revision: 3
25
26Number
27
28    OpenGL ES Extension #79
29
30Dependencies
31
32    Written based on the wording of the OpenGL ES 1.1 specification.
33    There are interactions with OpenGL ES 3.0 or EXT_texture_storage.
34
35Overview
36
37    This extension introduces BGRA_EXT as an acceptable external format.
38    This avoids byte swizzling when loading RGBA internal format
39    textures, which may be stored in BGRA order internally.
40
41Issues
42
43    None.
44
45New Procedures and Functions
46
47    None.
48
49New Tokens
50
51    Accepted by the <format> parameters of TexImage2D and TexSubImage2D:
52
53        GL_BGRA_EXT                                 0x80E1
54
55    Accepted by the <internalformat> parameters of TexStorage2D and
56    TexStorage3D:
57
58        GL_BGRA8_EXT                                0x93A1
59
60Additions to Chapter 2 of the OpenGL ES 1.1 Specification (OpenGL ES Operation)
61
62    None
63
64Additions to Chapter 3 of the OpenGL ES 1.1 Specification (Rasterization)
65
66    Section 3.6.2, add the following row to Table 3.3:
67
68        Format Name    Element Meaning and Order    Target Buffer
69        -----------    -------------------------    -------------
70        BGRA_EXT       B, G, R, A                   Color
71
72    Section 3.6.2, add the following row to Table 3.4:
73
74        Format      Type             Bytes per Pixel
75        --------    -------------    ---------------
76        BGRA_EXT    UNSIGNED_BYTE    4
77
78    Section 3.7.1, change the 4th paragraph to loosen the requirement that
79    <internalformat> must match <format> for the case of BGRA_EXT format, which
80    must have an RGBA internal format.  In this case we do not generate the
81    error INVALID_OPERATION.
82
83Additions to Chapter 4 of the OpenGL ES 1.1 Specification (Per-Fragment Operations and the Framebuffer)
84
85    None
86
87Additions to Chapter 5 of the OpenGL ES 1.1 Specification (Special Functions)
88
89    None
90
91Additions to Chapter 6 of the OpenGL ES 1.1 Specification (State and State Requests)
92
93    None
94
95Dependencies on OpenGL ES 3.0 or EXT_texture_storage
96
97    When the GL is OpenGL ES 3.0, the following table entry is added to
98    Table 3.2:
99
100        Format    Type           External Bytes per Pixel  Internal Format
101        --------  -------------  ------------------------  ---------------
102        BGRA_EXT  UNSIGNED_BYTE  4                         BGRA8_EXT
103
104    When the GL is OpenGL ES 3.0, BGRA8_EXT is also added to the Texture-only
105    color formats list in the Required Texture Formats subsection of section
106    3.8.3.
107
108    If the GL is not OpenGL ES 3.0 and the EXT_texture_storage extension is not
109    present, omit references to BGRA8_EXT and TexStorage*.
110
111    Note that despite TexStorage* being defined in terms of TexImage*,
112    BGRA8_EXT is not accepted as an <internalformat> parameter to TexImage*
113    when the GL is OpenGL ES 3.0.
114
115    Details of how this extension interacts with EXT_texture_storage when the
116    GL is a version of OpenGL earlier than 3.0 can be found in the
117    EXT_texture_storage spec.
118
119Errors
120
121    INVALID_ENUM is generated by TexImage2D if <internalformat> is BGRA_EXT.
122
123    INVALID_OPERATION is generated by TexImage2D if <format> is BGRA_EXT and
124    <internalformat> is not RGBA.
125
126New State
127
128    None
129
130New Implementation Dependent State
131
132    None
133
134Revision History
135
136    #3  06/26/2013    Benj Lipchak     Add ES3 interactions
137    #2  10/27/2009    Benj Lipchak     Add EXT suffix to BGRA token
138    #1  05/14/2009    Benj Lipchak     First draft
139