Package org.lwjgl.openvr
Class RenderModel
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.RenderModel
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class RenderModel extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
rVertexData
– Vertex data for the meshunVertexCount
– Number of vertices in the vertex dataIndexData
– Indices into the vertex data for each triangleunTriangleCount
– Number of triangles in the mesh. Index count is 3 * TriangleCount.diffuseTextureId
– Session unique texture identifier. Rendermodels which share the same texture will have the same id. 0 == texture not present.
Layout
struct RenderModel_t {
RenderModel_Vertex_t
const * rVertexData; uint32_t unVertexCount; uint16_t const * IndexData; uint32_t unTriangleCount; TextureID_t diffuseTextureId; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RenderModel.Buffer
An array ofRenderModel
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DIFFUSETEXTUREID
INDEXDATA
RVERTEXDATAThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
UNTRIANGLECOUNT
UNVERTEXCOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description RenderModel(java.nio.ByteBuffer container)
Creates aRenderModel
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 RenderModel
calloc()
Returns a newRenderModel
instance allocated withmemCalloc
.static RenderModel.Buffer
calloc(int capacity)
Returns a newRenderModel.Buffer
instance allocated withmemCalloc
.static RenderModel
callocStack()
Returns a newRenderModel
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RenderModel.Buffer
callocStack(int capacity)
Returns a newRenderModel.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static RenderModel.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RenderModel
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static RenderModel
create()
Returns a newRenderModel
instance allocated withBufferUtils
.static RenderModel.Buffer
create(int capacity)
Returns a newRenderModel.Buffer
instance allocated withBufferUtils
.static RenderModel
create(long address)
Returns a newRenderModel
instance for the specified memory address.static RenderModel.Buffer
create(long address, int capacity)
Create aRenderModel.Buffer
instance at the specified memory.static RenderModel
createSafe(long address)
static RenderModel.Buffer
createSafe(long address, int capacity)
int
diffuseTextureId()
Returns the value of thediffuseTextureId
field.java.nio.ShortBuffer
IndexData()
Returns aShortBuffer
view of the data pointed to by theIndexData
field.static RenderModel
malloc()
Returns a newRenderModel
instance allocated withmemAlloc
.static RenderModel.Buffer
malloc(int capacity)
Returns a newRenderModel.Buffer
instance allocated withmemAlloc
.static RenderModel
mallocStack()
Returns a newRenderModel
instance allocated on the thread-localMemoryStack
.static RenderModel.Buffer
mallocStack(int capacity)
Returns a newRenderModel.Buffer
instance allocated on the thread-localMemoryStack
.static RenderModel.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel.Buffer
instance allocated on the specifiedMemoryStack
.static RenderModel
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel
instance allocated on the specifiedMemoryStack
.static int
ndiffuseTextureId(long struct)
Unsafe version ofdiffuseTextureId()
.static java.nio.ShortBuffer
nIndexData(long struct)
Unsafe version ofIndexData
.static RenderModelVertex.Buffer
nrVertexData(long struct)
Unsafe version ofrVertexData()
.static int
nunTriangleCount(long struct)
Unsafe version ofunTriangleCount()
.static int
nunVertexCount(long struct)
Unsafe version ofunVertexCount()
.RenderModelVertex.Buffer
rVertexData()
Returns aRenderModelVertex.Buffer
view of the struct array pointed to by therVertexData
field.int
sizeof()
int
unTriangleCount()
Returns the value of theunTriangleCount
field.int
unVertexCount()
Returns the value of theunVertexCount
field.
-
-
-
Constructor Detail
-
RenderModel
public RenderModel(java.nio.ByteBuffer container)
Creates aRenderModel
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
-
rVertexData
public RenderModelVertex.Buffer rVertexData()
Returns aRenderModelVertex.Buffer
view of the struct array pointed to by therVertexData
field.
-
unVertexCount
public int unVertexCount()
Returns the value of theunVertexCount
field.
-
IndexData
public java.nio.ShortBuffer IndexData()
Returns aShortBuffer
view of the data pointed to by theIndexData
field.
-
unTriangleCount
public int unTriangleCount()
Returns the value of theunTriangleCount
field.
-
diffuseTextureId
public int diffuseTextureId()
Returns the value of thediffuseTextureId
field.
-
malloc
public static RenderModel malloc()
Returns a newRenderModel
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static RenderModel calloc()
Returns a newRenderModel
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static RenderModel create()
Returns a newRenderModel
instance allocated withBufferUtils
.
-
create
public static RenderModel create(long address)
Returns a newRenderModel
instance for the specified memory address.
-
createSafe
@Nullable public static RenderModel createSafe(long address)
-
malloc
public static RenderModel.Buffer malloc(int capacity)
Returns a newRenderModel.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static RenderModel.Buffer calloc(int capacity)
Returns a newRenderModel.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static RenderModel.Buffer create(int capacity)
Returns a newRenderModel.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static RenderModel.Buffer create(long address, int capacity)
Create aRenderModel.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static RenderModel.Buffer createSafe(long address, int capacity)
-
mallocStack
public static RenderModel mallocStack()
Returns a newRenderModel
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static RenderModel callocStack()
Returns a newRenderModel
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static RenderModel mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static RenderModel callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static RenderModel.Buffer mallocStack(int capacity)
Returns a newRenderModel.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static RenderModel.Buffer callocStack(int capacity)
Returns a newRenderModel.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static RenderModel.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static RenderModel.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newRenderModel.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nrVertexData
public static RenderModelVertex.Buffer nrVertexData(long struct)
Unsafe version ofrVertexData()
.
-
nunVertexCount
public static int nunVertexCount(long struct)
Unsafe version ofunVertexCount()
.
-
nIndexData
public static java.nio.ShortBuffer nIndexData(long struct)
Unsafe version ofIndexData
.
-
nunTriangleCount
public static int nunTriangleCount(long struct)
Unsafe version ofunTriangleCount()
.
-
ndiffuseTextureId
public static int ndiffuseTextureId(long struct)
Unsafe version ofdiffuseTextureId()
.
-
-