Class ARBTextureStorage
- java.lang.Object
-
- org.lwjgl.opengl.ARBTextureStorage
-
public class ARBTextureStorage extends java.lang.Object
Native bindings to the ARB_texture_storage extension.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 inOpenGL 4.2
.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
GL_TEXTURE_IMMUTABLE_FORMAT
Accepted by thevalue
parameter of GetTexParameter{if}v.
-
Method Summary
All Methods Static Methods Concrete Methods 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 ofTexStorage1D
.static void
glTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, int height)
DSA version ofTexStorage2D
.static void
glTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, int height, int depth)
DSA version ofTexStorage3D
.
-
-
-
Field Detail
-
GL_TEXTURE_IMMUTABLE_FORMAT
public static final int GL_TEXTURE_IMMUTABLE_FORMAT
Accepted by thevalue
parameter of GetTexParameter{if}v.- See Also:
- Constant Field Values
-
-
Method Detail
-
glTexStorage1D
public static void glTexStorage1D(int target, int levels, int internalformat, int width)
Simultaneously specifies storage for all levels of a one-dimensional texture.- Parameters:
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 texels
-
glTexStorage2D
public 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.- Parameters:
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 texels
-
glTexStorage3D
public 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.- Parameters:
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 texels
-
glTextureStorage1DEXT
public static void glTextureStorage1DEXT(int texture, int target, int levels, int internalformat, int width)
DSA version ofTexStorage1D
.- Parameters:
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 texels
-
glTextureStorage2DEXT
public static void glTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, int height)
DSA version ofTexStorage2D
.- Parameters:
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 texels
-
glTextureStorage3DEXT
public static void glTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, int height, int depth)
DSA version ofTexStorage3D
.- Parameters:
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 texels
-
-