Class GLTexture

All Implemented Interfaces:
Paintable, Icon, LoadableIcon, Proxy

@Generated("org.javagi.JavaGI") public class GLTexture extends Texture implements Paintable, Icon, LoadableIcon
A GdkTexture representing a GL texture object.
  • Constructor Details

    • GLTexture

      public GLTexture(MemorySegment address)
      Create a GLTexture instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • GLTexture

      @Deprecated public GLTexture(GLContext context, int id, int width, int height, @Nullable MemorySegment data)
      Deprecated.
      GLTextureBuilder supersedes this function and provides extended functionality for creating GL textures.

      Creates a new texture for an existing GL texture.

      Note that the GL texture must not be modified until destroy is called, which will happen when the GdkTexture object is finalized, or due to an explicit call of release().

      Parameters:
      context - a GdkGLContext
      id - the ID of a texture that was created with context
      width - the nominal width of the texture
      height - the nominal height of the texture
      data - data that gets passed to destroy
    • GLTexture

      public GLTexture()
      Create a new GLTexture.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the GLTexture class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected GLTexture asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Texture
      Returns:
      the instance as if it were its parent type
    • release

      public void release()

      Releases the GL resources held by a GdkGLTexture.

      The texture contents are still available via the Texture.download(byte[], long) function, after this function has been called.

    • builder

      public static GLTexture.Builder<? extends GLTexture.Builder> builder()
      A GLTexture.Builder object constructs a GLTexture with the specified properties. Use the various set...() methods to set properties, and finish construction with GLTexture.Builder.build().
      Returns:
      the builder object