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.NativeResourceMember 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_tconst * 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 classRenderModel.BufferAn array ofRenderModelstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDIFFUSETEXTUREID
INDEXDATA
RVERTEXDATAThe struct member offsets.static intSIZEOFThe struct size in bytes.static intUNTRIANGLECOUNT
UNVERTEXCOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description RenderModel(java.nio.ByteBuffer container)Creates aRenderModelinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RenderModelcalloc()Returns a newRenderModelinstance allocated withmemCalloc.static RenderModel.Buffercalloc(int capacity)Returns a newRenderModel.Bufferinstance allocated withmemCalloc.static RenderModelcallocStack()Returns a newRenderModelinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RenderModel.BuffercallocStack(int capacity)Returns a newRenderModel.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RenderModel.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRenderModel.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RenderModelcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRenderModelinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RenderModelcreate()Returns a newRenderModelinstance allocated withBufferUtils.static RenderModel.Buffercreate(int capacity)Returns a newRenderModel.Bufferinstance allocated withBufferUtils.static RenderModelcreate(long address)Returns a newRenderModelinstance for the specified memory address.static RenderModel.Buffercreate(long address, int capacity)Create aRenderModel.Bufferinstance at the specified memory.static RenderModelcreateSafe(long address)static RenderModel.BuffercreateSafe(long address, int capacity)intdiffuseTextureId()Returns the value of thediffuseTextureIdfield.java.nio.ShortBufferIndexData()Returns aShortBufferview of the data pointed to by theIndexDatafield.static RenderModelmalloc()Returns a newRenderModelinstance allocated withmemAlloc.static RenderModel.Buffermalloc(int capacity)Returns a newRenderModel.Bufferinstance allocated withmemAlloc.static RenderModelmallocStack()Returns a newRenderModelinstance allocated on the thread-localMemoryStack.static RenderModel.BuffermallocStack(int capacity)Returns a newRenderModel.Bufferinstance allocated on the thread-localMemoryStack.static RenderModel.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newRenderModel.Bufferinstance allocated on the specifiedMemoryStack.static RenderModelmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newRenderModelinstance allocated on the specifiedMemoryStack.static intndiffuseTextureId(long struct)Unsafe version ofdiffuseTextureId().static java.nio.ShortBuffernIndexData(long struct)Unsafe version ofIndexData.static RenderModelVertex.BuffernrVertexData(long struct)Unsafe version ofrVertexData().static intnunTriangleCount(long struct)Unsafe version ofunTriangleCount().static intnunVertexCount(long struct)Unsafe version ofunVertexCount().RenderModelVertex.BufferrVertexData()Returns aRenderModelVertex.Bufferview of the struct array pointed to by therVertexDatafield.intsizeof()intunTriangleCount()Returns the value of theunTriangleCountfield.intunVertexCount()Returns the value of theunVertexCountfield.
-
-
-
Constructor Detail
-
RenderModel
public RenderModel(java.nio.ByteBuffer container)
Creates aRenderModelinstance 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
-
rVertexData
public RenderModelVertex.Buffer rVertexData()
Returns aRenderModelVertex.Bufferview of the struct array pointed to by therVertexDatafield.
-
unVertexCount
public int unVertexCount()
Returns the value of theunVertexCountfield.
-
IndexData
public java.nio.ShortBuffer IndexData()
Returns aShortBufferview of the data pointed to by theIndexDatafield.
-
unTriangleCount
public int unTriangleCount()
Returns the value of theunTriangleCountfield.
-
diffuseTextureId
public int diffuseTextureId()
Returns the value of thediffuseTextureIdfield.
-
malloc
public static RenderModel malloc()
Returns a newRenderModelinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static RenderModel calloc()
Returns a newRenderModelinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static RenderModel create()
Returns a newRenderModelinstance allocated withBufferUtils.
-
create
public static RenderModel create(long address)
Returns a newRenderModelinstance for the specified memory address.
-
createSafe
@Nullable public static RenderModel createSafe(long address)
-
malloc
public static RenderModel.Buffer malloc(int capacity)
Returns a newRenderModel.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static RenderModel.Buffer calloc(int capacity)
Returns a newRenderModel.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static RenderModel.Buffer create(int capacity)
Returns a newRenderModel.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static RenderModel.Buffer create(long address, int capacity)
Create aRenderModel.Bufferinstance 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 newRenderModelinstance allocated on the thread-localMemoryStack.
-
callocStack
public static RenderModel callocStack()
Returns a newRenderModelinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static RenderModel mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static RenderModel callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newRenderModelinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static RenderModel.Buffer callocStack(int capacity)
Returns a newRenderModel.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-