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.NativeResource
A 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 class
RenderModelTextureMap.Buffer
An array ofRenderModelTextureMap
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
RUBTEXTUREMAPDATA
The struct member offsets.static int
SIZEOF
The struct size in bytes.static int
UNHEIGHT
UNWIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description RenderModelTextureMap(java.nio.ByteBuffer container)
Creates aRenderModelTextureMap
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RenderModelTextureMap
calloc()
Returns a newRenderModelTextureMap
instance allocated withmemCalloc
.static RenderModelTextureMap.Buffer
calloc(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated withmemCalloc
.static RenderModelTextureMap
callocStack()
Returns a newRenderModelTextureMap
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RenderModelTextureMap.Buffer
callocStack(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RenderModelTextureMap.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RenderModelTextureMap
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RenderModelTextureMap
create()
Returns a newRenderModelTextureMap
instance allocated withBufferUtils
.static RenderModelTextureMap.Buffer
create(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated withBufferUtils
.static RenderModelTextureMap
create(long address)
Returns a newRenderModelTextureMap
instance for the specified memory address.static RenderModelTextureMap.Buffer
create(long address, int capacity)
Create aRenderModelTextureMap.Buffer
instance at the specified memory.static RenderModelTextureMap
createSafe(long address)
static RenderModelTextureMap.Buffer
createSafe(long address, int capacity)
static RenderModelTextureMap
malloc()
Returns a newRenderModelTextureMap
instance allocated withmemAlloc
.static RenderModelTextureMap.Buffer
malloc(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated withmemAlloc
.static RenderModelTextureMap
mallocStack()
Returns a newRenderModelTextureMap
instance allocated on the thread-localMemoryStack
.static RenderModelTextureMap.Buffer
mallocStack(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated on the thread-localMemoryStack
.static RenderModelTextureMap.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap.Buffer
instance allocated on the specifiedMemoryStack
.static RenderModelTextureMap
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap
instance allocated on the specifiedMemoryStack
.static java.nio.ByteBuffer
nrubTextureMapData(long struct, int capacity)
Unsafe version ofrubTextureMapData
.static short
nunHeight(long struct)
Unsafe version ofunHeight()
.static short
nunWidth(long struct)
Unsafe version ofunWidth()
.java.nio.ByteBuffer
rubTextureMapData(int capacity)
Returns aByteBuffer
view of the data pointed to by therubTextureMapData
field.int
sizeof()
short
unHeight()
Returns the value of theunHeight
field.short
unWidth()
Returns the value of theunWidth
field.
-
-
-
Constructor Detail
-
RenderModelTextureMap
public RenderModelTextureMap(java.nio.ByteBuffer container)
Creates aRenderModelTextureMap
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
unWidth
public short unWidth()
Returns the value of theunWidth
field.
-
unHeight
public short unHeight()
Returns the value of theunHeight
field.
-
rubTextureMapData
public java.nio.ByteBuffer rubTextureMapData(int capacity)
Returns aByteBuffer
view of the data pointed to by therubTextureMapData
field.- Parameters:
capacity
- the number of elements in the returned buffer
-
malloc
public static RenderModelTextureMap malloc()
Returns a newRenderModelTextureMap
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static RenderModelTextureMap calloc()
Returns a newRenderModelTextureMap
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static RenderModelTextureMap create()
Returns a newRenderModelTextureMap
instance allocated withBufferUtils
.
-
create
public static RenderModelTextureMap create(long address)
Returns a newRenderModelTextureMap
instance for the specified memory address.
-
createSafe
@Nullable public static RenderModelTextureMap createSafe(long address)
-
malloc
public static RenderModelTextureMap.Buffer malloc(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static RenderModelTextureMap.Buffer calloc(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static RenderModelTextureMap.Buffer create(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static RenderModelTextureMap.Buffer create(long address, int capacity)
Create aRenderModelTextureMap.Buffer
instance 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 newRenderModelTextureMap
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static RenderModelTextureMap callocStack()
Returns a newRenderModelTextureMap
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static RenderModelTextureMap mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static RenderModelTextureMap callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelTextureMap
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static RenderModelTextureMap.Buffer callocStack(int capacity)
Returns a newRenderModelTextureMap.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-