Class ARBClearTexture



  • public class ARBClearTexture
    extends java.lang.Object
    Native bindings to the ARB_clear_texture extension.

    Texture objects are fundamental to the operation of OpenGL. They are used as a source for texture sampling and destination for rendering as well as being accessed in shaders for image load/store operations. It is also possible to invalidate the contents of a texture. It is currently only possible to set texture image data to known values by uploading some or all of a image array from application memory or by attaching it to a framebuffer object and using Clear or the OpenGL 3.0 ClearBuffer commands.

    Both uploading initial texture data and clearing by attaching to a framebuffer have potential disadvantages when one simply wants to initialize texture data to a known value. Uploading initial data requires the application to allocate a (potentially large) chunk of memory and transferring that to the GL. This can be a costly operation both in terms of memory bandwidth and power usage. Alternatively, attaching a texture level to a framebuffer to clear it may not be possible if the texture format isn't supported for rendering, or even if it is, attaching the image to a framebuffer object may cause the texture to be allocated in certain types of memory, which it may otherwise not need to be placed in.

    This extension solves these problems by providing a mechanism whereby the contents of a texture image array can be set to known values by using the ClearTexImage or ClearTexSubImage commands. These commands can also be useful for initializing an image that will be used for atomic shader operations.

    Requires OpenGL 1.3. Promoted to core in OpenGL 4.4.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void glClearTexImage(int texture, int level, int format, int type, java.nio.ByteBuffer data)
      Is equivalent to calling ClearTexSubImage with xoffset, yoffset, and zoffset equal to -b and width, height, and depth equal to the dimensions of the texture image plus 2xb (or zero and one for dimensions the texture doesn't have).
      static void glClearTexImage(int texture, int level, int format, int type, double[] data)
      double[] version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, java.nio.DoubleBuffer data)
      DoubleBuffer version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, float[] data)
      float[] version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, java.nio.FloatBuffer data)
      FloatBuffer version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, int[] data)
      int[] version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, java.nio.IntBuffer data)
      IntBuffer version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, short[] data)
      short[] version of: ClearTexImage
      static void glClearTexImage(int texture, int level, int format, int type, java.nio.ShortBuffer data)
      ShortBuffer version of: ClearTexImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, java.nio.ByteBuffer data)
      Fills all or part of a texture image with a constant value.
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, double[] data)
      double[] version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, java.nio.DoubleBuffer data)
      DoubleBuffer version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, float[] data)
      float[] version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, java.nio.FloatBuffer data)
      FloatBuffer version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int[] data)
      int[] version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, java.nio.IntBuffer data)
      IntBuffer version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, short[] data)
      short[] version of: ClearTexSubImage
      static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, java.nio.ShortBuffer data)
      ShortBuffer version of: ClearTexSubImage
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait