Class 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 in OpenGL 4.2.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int GL_TEXTURE_IMMUTABLE_FORMAT
      Accepted by the value 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 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GL_TEXTURE_IMMUTABLE_FORMAT

        public static final int GL_TEXTURE_IMMUTABLE_FORMAT
        Accepted by the value 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_1DPROXY_TEXTURE_1D
        levels - the number of texture levels
        internalformat - the sized internal format to be used to store texture image data
        width - the width 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_3DTEXTURE_2D_ARRAYTEXTURE_CUBE_MAP_ARRAYPROXY_TEXTURE_3D
        PROXY_TEXTURE_2D_ARRAYPROXY_TEXTURE_CUBE_MAP_ARRAY
        levels - the number of texture levels
        internalformat - the sized internal format to be used to store texture image data
        width - the width of the texture, in texels
        height - the height of the texture, in texels
        depth - the depth of the texture, in texels
      • glTextureStorage1DEXT

        public static void glTextureStorage1DEXT(int texture,
                                                 int target,
                                                 int levels,
                                                 int internalformat,
                                                 int width)
        DSA version of TexStorage1D.
        Parameters:
        texture - the texture object to update
        target - the target of the operation. One of:
        TEXTURE_1DPROXY_TEXTURE_1D
        levels - the number of texture levels
        internalformat - the sized internal format to be used to store texture image data
        width - the width 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 of TexStorage3D.
        Parameters:
        texture - the texture object to update
        target - the target of the operation. One of:
        TEXTURE_3DTEXTURE_2D_ARRAYTEXTURE_CUBE_MAP_ARRAYPROXY_TEXTURE_3D
        PROXY_TEXTURE_2D_ARRAYPROXY_TEXTURE_CUBE_MAP_ARRAY
        levels - the number of texture levels
        internalformat - the sized internal format to be used to store texture image data
        width - the width of the texture, in texels
        height - the height of the texture, in texels
        depth - the depth of the texture, in texels