Graphics Reference
In-Depth Information
OpenGL ES 3.0 has improved this situation by introducing standard
texture compression formats that all vendors must support. Ericsson
Texture Compression (ETC2 and EAC) was offered as a royalty-free
standard to Khronos, and it was adopted as the standard texture
compression format for OpenGL ES 3.0. There are variants of EAC
for compressing one- and two-channel data as well as variants of
ETC2 for compressing three- and four-channel data. The function
used to load compressed image data for 2D textures and cubemaps
is glCompressedTexImage2D ; the corresponding function for 2D
texture arrays is glCompressedTexImage3D . Note that ETC2/EAC is not
supported for 3D textures (only 2D textures and 2D texture arrays), but
glCompressedTexImage3D can be used to potentially load vendor-specific
3D texture compression formats.
void glCompressedTexImage2D (GLenum target , GLint level ,
GLenum internalFormat ,
GLsizei width ,
GLsizei height ,
GLint border ,
GLsizei imageSize ,
const void * data )
void glCompressedTexImage3D (GLenum target , GLint level ,
GLenum internalFormat ,
GLsizei width ,
GLsizei height ,
GLsizei depth ,
GLint border ,
GLsizei imageSize ,
const void * data )
specifies the texture target; should be GL_
TEXTURE_2D or either the GL_TEXTURE_CUBE_MAP_*
(for glCompressedTexImage2D ) or GL_TEXTURE_3D
or GL_TEXTURE_2D_ARRAY (for
glCompressedTexImage3D ).
target
specifies which mip level to load. The base level is
specified by 0, followed by an increasing level for
each successive mipmap.
level
the internal format for the texture storage. The
standard compressed texture formats in OpenGL ES
3.0 are described in Table 9-12.
internalFormat
(continues)
 
 
Search WWH ::




Custom Search