Class TextureUtils

java.lang.Object
gaiasky.util.gdx.graphics.TextureUtils

public class TextureUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    texSubImage2D(com.badlogic.gdx.graphics.Texture tex, int mipmapLevel, int x, int y, int width, int height, int glFormat, int glType, Buffer pixels)
    Draw a two-dimensional buffer to a texture using glTexSubImage2D().

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TextureUtils

      public TextureUtils()
  • Method Details

    • texSubImage2D

      public static void texSubImage2D(com.badlogic.gdx.graphics.Texture tex, int mipmapLevel, int x, int y, int width, int height, int glFormat, int glType, Buffer pixels)
      Draw a two-dimensional buffer to a texture using glTexSubImage2D().
      Parameters:
      tex - The texture.
      mipmapLevel - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
      x - Specifies a texel offset in the x direction within the texture array.
      y - Specifies a texel offset in the y direction within the texture array.
      width - Specifies the width of the texture subimage.
      height - Specifies the height of the texture subimage.
      glFormat - Specifies the format of the pixel data. The following symbolic values are accepted: GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_DEPTH_COMPONENT, and GL_STENCIL_INDEX.
      glType - Specifies the data type of the pixel data. The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
      pixels - Specifies a pointer to the image data in memory as a Buffer.