public class ARBTextureStorage
extends java.lang.Object
The texture image specification commands in OpenGL allow each level to be separately specified with different sizes, formats, types and so on, and only imposes consistency checks at draw time. This adds overhead for implementations.
This extension provides a mechanism for specifying the entire structure of a texture in a single call, allowing certain consistency checks and memory allocations to be done up front. Once specified, the format and dimensions of the image array become immutable, to simplify completeness checks in the implementation.
When using this extension, it is no longer possible to supply texture data using TexImage*. Instead, data can be uploaded using TexSubImage*, or produced by other means (such as render-to-texture, mipmap generation, or rendering to a sibling EGLImage).
This extension has complicated interactions with other extensions. The goal of most of these interactions is to ensure that a texture is always mipmap complete (and cube complete for cubemap textures).
Requires OpenGL 1.2. Promoted to core in OpenGL 4.2.
| Modifier and Type | Field and Description |
|---|---|
static int |
GL_TEXTURE_IMMUTABLE_FORMAT
Accepted by the
value parameter of GetTexParameter{if}v. |
| Modifier and Type | Method and Description |
|---|---|
static void |
glTexStorage1D(int target,
int levels,
int internalformat,
int width)
Simultaneously specifies storage for all levels of a one-dimensional texture.
|
static void |
glTexStorage2D(int target,
int levels,
int internalformat,
int width,
int height)
Simultaneously specifies storage for all levels of a two-dimensional or one-dimensional array texture.
|
static void |
glTexStorage3D(int target,
int levels,
int internalformat,
int width,
int height,
int depth)
Simultaneously specifies storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture.
|
static void |
glTextureStorage1DEXT(int texture,
int target,
int levels,
int internalformat,
int width)
DSA version of
TexStorage1D. |
static void |
glTextureStorage2DEXT(int texture,
int target,
int levels,
int internalformat,
int width,
int height)
DSA version of
TexStorage2D. |
static void |
glTextureStorage3DEXT(int texture,
int target,
int levels,
int internalformat,
int width,
int height,
int depth)
DSA version of
TexStorage3D. |
public static final int GL_TEXTURE_IMMUTABLE_FORMAT
value parameter of GetTexParameter{if}v.public static void glTexStorage1D(int target,
int levels,
int internalformat,
int width)
target - the target of the operation. One of:TEXTURE_1D | PROXY_TEXTURE_1D |
levels - the number of texture levelsinternalformat - the sized internal format to be used to store texture image datawidth - the width of the texture, in texelspublic static void glTexStorage2D(int target,
int levels,
int internalformat,
int width,
int height)
target - the target of the operation. One of:TEXTURE_2D | TEXTURE_1D_ARRAY | TEXTURE_RECTANGLE | TEXTURE_CUBE_MAP |
PROXY_TEXTURE_2D | PROXY_TEXTURE_1D_ARRAY | PROXY_TEXTURE_RECTANGLE | PROXY_TEXTURE_CUBE_MAP |
levels - the number of texture levelsinternalformat - the sized internal format to be used to store texture image datawidth - the width of the texture, in texelsheight - the height of the texture, in texelspublic static void glTexStorage3D(int target,
int levels,
int internalformat,
int width,
int height,
int depth)
target - the target of the operation. One of:TEXTURE_3D | TEXTURE_2D_ARRAY | TEXTURE_CUBE_MAP_ARRAY | PROXY_TEXTURE_3D |
PROXY_TEXTURE_2D_ARRAY | PROXY_TEXTURE_CUBE_MAP_ARRAY |
levels - the number of texture levelsinternalformat - the sized internal format to be used to store texture image datawidth - the width of the texture, in texelsheight - the height of the texture, in texelsdepth - the depth of the texture, in texelspublic static void glTextureStorage1DEXT(int texture,
int target,
int levels,
int internalformat,
int width)
TexStorage1D.texture - the texture object to updatetarget - the target of the operation. One of:TEXTURE_1D | PROXY_TEXTURE_1D |
levels - the number of texture levelsinternalformat - the sized internal format to be used to store texture image datawidth - the width of the texture, in texelspublic static void glTextureStorage2DEXT(int texture,
int target,
int levels,
int internalformat,
int width,
int height)
TexStorage2D.texture - the texture object to updatetarget - the target of the operation. One of:TEXTURE_2D | TEXTURE_1D_ARRAY | TEXTURE_RECTANGLE | TEXTURE_CUBE_MAP |
PROXY_TEXTURE_2D | PROXY_TEXTURE_1D_ARRAY | PROXY_TEXTURE_RECTANGLE | PROXY_TEXTURE_CUBE_MAP |
levels - the number of texture levelsinternalformat - the sized internal format to be used to store texture image datawidth - the width of the texture, in texelsheight - the height of the texture, in texelspublic static void glTextureStorage3DEXT(int texture,
int target,
int levels,
int internalformat,
int width,
int height,
int depth)
TexStorage3D.texture - the texture object to updatetarget - the target of the operation. One of:TEXTURE_3D | TEXTURE_2D_ARRAY | TEXTURE_CUBE_MAP_ARRAY | PROXY_TEXTURE_3D |
PROXY_TEXTURE_2D_ARRAY | PROXY_TEXTURE_CUBE_MAP_ARRAY |
levels - the number of texture levelsinternalformat - the sized internal format to be used to store texture image datawidth - the width of the texture, in texelsheight - the height of the texture, in texelsdepth - the depth of the texture, in texelsCopyright LWJGL. All Rights Reserved. License terms.