Package org.lwjgl.stb

Class STBTTPackContext

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer


    public class STBTTPackContext
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    An opaque structure which holds all the context needed from PackBegin to PackEnd.
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • STBTTPackContext

        public STBTTPackContext(java.nio.ByteBuffer container)
        Creates a STBTTPackContext instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: org.lwjgl.system.Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • create

        public static STBTTPackContext create(long address)
        Returns a new STBTTPackContext instance for the specified memory address or null if the address is NULL.
      • callocStack

        public static STBTTPackContext callocStack()
        Returns a new STBTTPackContext instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static STBTTPackContext mallocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTPackContext instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static STBTTPackContext callocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTPackContext instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static STBTTPackContext.Buffer callocStack(int capacity)
        Returns a new STBTTPackContext.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static STBTTPackContext.Buffer mallocStack(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTPackContext.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static STBTTPackContext.Buffer callocStack(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTPackContext.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity