Class RenderModelTextureMap

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

    public class RenderModelTextureMap
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    A texture map for use on a render model.

    Member documentation

    • unHeight – width and height of the texture map in pixels
    • rubTextureMapData – Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub

    Layout

    
     struct RenderModel_TextureMap_t {
         uint16_t unWidth;
         uint16_t unHeight;
         uint8_t const * rubTextureMapData;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • UNWIDTH, UNHEIGHT, RUBTEXTUREMAPDATA

        The struct member offsets.
    • Constructor Detail

      • RenderModelTextureMap

        public RenderModelTextureMap​(java.nio.ByteBuffer container)
        Creates a RenderModelTextureMap 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • unWidth

        public short unWidth()
        Returns the value of the unWidth field.
      • unHeight

        public short unHeight()
        Returns the value of the unHeight field.
      • rubTextureMapData

        public java.nio.ByteBuffer rubTextureMapData​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the rubTextureMapData field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • malloc

        public static RenderModelTextureMap malloc()
        Returns a new RenderModelTextureMap instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static RenderModelTextureMap calloc()
        Returns a new RenderModelTextureMap instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static RenderModelTextureMap create()
        Returns a new RenderModelTextureMap instance allocated with BufferUtils.
      • create

        public static RenderModelTextureMap create​(long address)
        Returns a new RenderModelTextureMap instance for the specified memory address.
      • createSafe

        @Nullable
        public static RenderModelTextureMap createSafe​(long address)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static RenderModelTextureMap mallocStack()
        Returns a new RenderModelTextureMap instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

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

        public static RenderModelTextureMap.Buffer callocStack​(int capacity,
                                                               org.lwjgl.system.MemoryStack stack)
        Returns a new RenderModelTextureMap.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
      • nunWidth

        public static short nunWidth​(long struct)
        Unsafe version of unWidth().
      • nunHeight

        public static short nunHeight​(long struct)
        Unsafe version of unHeight().
      • nrubTextureMapData

        public static java.nio.ByteBuffer nrubTextureMapData​(long struct,
                                                             int capacity)
        Unsafe version of rubTextureMapData.