Package org.lwjgl.openvr
Class RenderModelTextureMap
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.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.NativeResourceA texture map for use on a render model.Member documentation
unHeight– width and height of the texture map in pixelsrubTextureMapData– 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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRenderModelTextureMap.BufferAn array ofRenderModelTextureMapstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intRUBTEXTUREMAPDATAThe struct member offsets.static intSIZEOFThe struct size in bytes.static intUNHEIGHT
UNWIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description RenderModelTextureMap(java.nio.ByteBuffer container)Creates aRenderModelTextureMapinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RenderModelTextureMapcalloc()Returns a newRenderModelTextureMapinstance allocated withmemCalloc.static RenderModelTextureMap.Buffercalloc(int capacity)Returns a newRenderModelTextureMap.Bufferinstance allocated withmemCalloc.static RenderModelTextureMapcallocStack()Returns a newRenderModelTextureMapinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RenderModelTextureMap.BuffercallocStack(int capacity)Returns a newRenderModelTextureMap.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RenderModelTextureMap.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRenderModelTextureMap.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RenderModelTextureMapcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRenderModelTextureMapinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RenderModelTextureMapcreate()Returns a newRenderModelTextureMapinstance allocated withBufferUtils.static RenderModelTextureMap.Buffercreate(int capacity)Returns a newRenderModelTextureMap.Bufferinstance allocated withBufferUtils.static RenderModelTextureMapcreate(long address)Returns a newRenderModelTextureMapinstance for the specified memory address.static RenderModelTextureMap.Buffercreate(long address, int capacity)Create aRenderModelTextureMap.Bufferinstance at the specified memory.static RenderModelTextureMapcreateSafe(long address)static RenderModelTextureMap.BuffercreateSafe(long address, int capacity)static RenderModelTextureMapmalloc()Returns a newRenderModelTextureMapinstance allocated withmemAlloc.static RenderModelTextureMap.Buffermalloc(int capacity)Returns a newRenderModelTextureMap.Bufferinstance allocated withmemAlloc.static RenderModelTextureMapmallocStack()Returns a newRenderModelTextureMapinstance allocated on the thread-localMemoryStack.static RenderModelTextureMap.BuffermallocStack(int capacity)Returns a newRenderModelTextureMap.Bufferinstance allocated on the thread-localMemoryStack.static RenderModelTextureMap.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRenderModelTextureMap.Bufferinstance allocated on the specifiedMemoryStack.static RenderModelTextureMapmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRenderModelTextureMapinstance allocated on the specifiedMemoryStack.static java.nio.ByteBuffernrubTextureMapData(long struct, int capacity)Unsafe version ofrubTextureMapData.static shortnunHeight(long struct)Unsafe version ofunHeight().static shortnunWidth(long struct)Unsafe version ofunWidth().java.nio.ByteBufferrubTextureMapData(int capacity)Returns aByteBufferview of the data pointed to by therubTextureMapDatafield.intsizeof()shortunHeight()Returns the value of theunHeightfield.shortunWidth()Returns the value of theunWidthfield.
-
-
-
Constructor Detail
-
RenderModelTextureMap
public RenderModelTextureMap(java.nio.ByteBuffer container)
Creates aRenderModelTextureMapinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
unWidth
public short unWidth()
Returns the value of theunWidthfield.
-
unHeight
public short unHeight()
Returns the value of theunHeightfield.
-
rubTextureMapData
public java.nio.ByteBuffer rubTextureMapData(int capacity)
Returns aByteBufferview of the data pointed to by therubTextureMapDatafield.- Parameters:
capacity- the number of elements in the returned buffer
-
malloc
public static RenderModelTextureMap malloc()
Returns a newRenderModelTextureMapinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static RenderModelTextureMap calloc()
Returns a newRenderModelTextureMapinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static RenderModelTextureMap create()
Returns a newRenderModelTextureMapinstance allocated withBufferUtils.
-
create
public static RenderModelTextureMap create(long address)
Returns a newRenderModelTextureMapinstance for the specified memory address.
-
createSafe
@Nullable public static RenderModelTextureMap createSafe(long address)
-
malloc
public static RenderModelTextureMap.Buffer malloc(int capacity)
Returns a newRenderModelTextureMap.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static RenderModelTextureMap.Buffer calloc(int capacity)
Returns a newRenderModelTextureMap.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static RenderModelTextureMap.Buffer create(int capacity)
Returns a newRenderModelTextureMap.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static RenderModelTextureMap.Buffer create(long address, int capacity)
Create aRenderModelTextureMap.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static RenderModelTextureMap.Buffer createSafe(long address, int capacity)
-
mallocStack
public static RenderModelTextureMap mallocStack()
Returns a newRenderModelTextureMapinstance allocated on the thread-localMemoryStack.
-
callocStack
public static RenderModelTextureMap callocStack()
Returns a newRenderModelTextureMapinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static RenderModelTextureMap mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMapinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static RenderModelTextureMap callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMapinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static RenderModelTextureMap.Buffer mallocStack(int capacity)
Returns a newRenderModelTextureMap.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static RenderModelTextureMap.Buffer callocStack(int capacity)
Returns a newRenderModelTextureMap.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static RenderModelTextureMap.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static RenderModelTextureMap.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nunWidth
public static short nunWidth(long struct)
Unsafe version ofunWidth().
-
nunHeight
public static short nunHeight(long struct)
Unsafe version ofunHeight().
-
nrubTextureMapData
public static java.nio.ByteBuffer nrubTextureMapData(long struct, int capacity)Unsafe version ofrubTextureMapData.
-
-