Class CustomTexture3DData

  • All Implemented Interfaces:
    Texture3DData

    public class CustomTexture3DData
    extends java.lang.Object
    implements Texture3DData
    A Texture3DData implementation that addresses 2 use cases : You can use it as a GL only texture (feed by a compute shader). In this case the texture is not managed. Or you can use it to upload pixels to GPU. In this case you should call getPixels() to fill the buffer prior to consuming it (eg. before new Texture3D(data)).
    • Constructor Detail

      • CustomTexture3DData

        public CustomTexture3DData​(int width,
                                   int height,
                                   int depth,
                                   int mipMapLevel,
                                   int glFormat,
                                   int glInternalFormat,
                                   int glType)
        See Also:
        "https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage3D.xhtml"
    • Method Detail

      • isPrepared

        public boolean isPrepared()
        Specified by:
        isPrepared in interface Texture3DData
        Returns:
        whether the TextureData is prepared or not.
      • getWidth

        public int getWidth()
        Specified by:
        getWidth in interface Texture3DData
        Returns:
        the width of this Texture3D
      • getHeight

        public int getHeight()
        Specified by:
        getHeight in interface Texture3DData
        Returns:
        the height of this Texture3D
      • getDepth

        public int getDepth()
        Specified by:
        getDepth in interface Texture3DData
        Returns:
        the depth of this Texture3D
      • useMipMaps

        public boolean useMipMaps()
        Specified by:
        useMipMaps in interface Texture3DData
        Returns:
        whether to generate mipmaps or not.
      • isManaged

        public boolean isManaged()
        Specified by:
        isManaged in interface Texture3DData
        Returns:
        whether this implementation can cope with a EGL context loss.
      • getInternalFormat

        public int getInternalFormat()
        Specified by:
        getInternalFormat in interface Texture3DData
        Returns:
        the internal format of this Texture3D
      • getGLType

        public int getGLType()
        Specified by:
        getGLType in interface Texture3DData
        Returns:
        the GL type of this Texture3D
      • getGLFormat

        public int getGLFormat()
      • getMipMapLevel

        public int getMipMapLevel()
      • getPixels

        public java.nio.ByteBuffer getPixels()