Graphics Reference
In-Depth Information
void
glCompressedTexSubImage3D (GLenum target ,
GLint level ,
GLint xoffset ,
GLint yoffset ,
GLint zoffset ,
GLsizei width ,
GLsizei height ,
GLsizei depth ,
GLenum format ,
GLenum imageSize ,
const void* data )
specifies the texture target, either GL_TEXTURE_2D or
GL_TEXTURE_2D_ARRAY )
target
level
specifies which mip level to update
the x index of the texel to start updating from
xoffset
the y index of the texel to start updating from
yoffset
the z index of the texel to start updating from
zoffset
the width of the subregion of the image to update
width
the height of the subregion of the image to update
height
the depth of the subregion of the image to update
depth
the compressed texture format to use; must be
the format with which the image was originally specified
format
contains the actual pixel data for the subregion of the image
pixels
Copying Texture Data from the Color Buffer
An additional texturing feature that is supported in OpenGL ES 3.0 is the
ability to copy data from a color buffer to a texture. This can be useful
if you want to use the results of rendering as an image in a texture.
Framebuffer objects (Chapter 12) provide a fast method for doing render-
to-texture and are a faster method than copying image data. However, if
performance is not a concern, the ability to copy image data out of the
color buffer can be a useful feature.
The color buffer from which to copy image data from can be set using the
function glReadBuffer . If the application is rendering to a double-buffered
EGL displayable surface, then glReadBuffer must be set to GL_BACK (the
back buffer—the default state). Recall that OpenGL ES 3.0 supports only
double-buffered EGL displayable surfaces. As a consequence, all OpenGL
 
 
 
Search WWH ::




Custom Search