public class MeshoptStream
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
glVertexPointer.
Each element takes size bytes, with stride controlling the spacing between successive elements.
struct meshopt_Stream {
void const * data;
size_t size;
size_t stride;
}| Modifier and Type | Class and Description |
|---|---|
static class |
MeshoptStream.Buffer
An array of
MeshoptStream structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DATA
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STRIDE
The struct member offsets.
|
| Constructor and Description |
|---|
MeshoptStream(java.nio.ByteBuffer container)
Creates a
MeshoptStream instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static MeshoptStream |
calloc()
Returns a new
MeshoptStream instance allocated with memCalloc. |
static MeshoptStream.Buffer |
calloc(int capacity)
Returns a new
MeshoptStream.Buffer instance allocated with memCalloc. |
static MeshoptStream |
callocStack()
Returns a new
MeshoptStream instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MeshoptStream.Buffer |
callocStack(int capacity)
Returns a new
MeshoptStream.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MeshoptStream.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptStream.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MeshoptStream |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptStream instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MeshoptStream |
create()
Returns a new
MeshoptStream instance allocated with BufferUtils. |
static MeshoptStream.Buffer |
create(int capacity)
Returns a new
MeshoptStream.Buffer instance allocated with BufferUtils. |
static MeshoptStream |
create(long address)
Returns a new
MeshoptStream instance for the specified memory address. |
static MeshoptStream.Buffer |
create(long address,
int capacity)
Create a
MeshoptStream.Buffer instance at the specified memory. |
static MeshoptStream |
createSafe(long address)
|
static MeshoptStream.Buffer |
createSafe(long address,
int capacity)
|
MeshoptStream |
data(java.nio.ByteBuffer value)
Sets the address of the specified
ByteBuffer to the data field. |
java.nio.ByteBuffer |
data(int capacity)
Returns a
ByteBuffer view of the data pointed to by the data field. |
static MeshoptStream |
malloc()
Returns a new
MeshoptStream instance allocated with memAlloc. |
static MeshoptStream.Buffer |
malloc(int capacity)
Returns a new
MeshoptStream.Buffer instance allocated with memAlloc. |
static MeshoptStream |
mallocStack()
Returns a new
MeshoptStream instance allocated on the thread-local MemoryStack. |
static MeshoptStream.Buffer |
mallocStack(int capacity)
Returns a new
MeshoptStream.Buffer instance allocated on the thread-local MemoryStack. |
static MeshoptStream.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptStream.Buffer instance allocated on the specified MemoryStack. |
static MeshoptStream |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MeshoptStream instance allocated on the specified MemoryStack. |
static void |
ndata(long struct,
java.nio.ByteBuffer value)
Unsafe version of
data. |
static java.nio.ByteBuffer |
ndata(long struct,
int capacity)
Unsafe version of
data. |
static long |
nsize(long struct)
Unsafe version of
size(). |
static void |
nsize(long struct,
long value)
Unsafe version of
size. |
static long |
nstride(long struct)
Unsafe version of
stride(). |
static void |
nstride(long struct,
long value)
Unsafe version of
stride. |
MeshoptStream |
set(java.nio.ByteBuffer data,
long size,
long stride)
Initializes this struct with the specified values.
|
MeshoptStream |
set(MeshoptStream src)
Copies the specified struct data to this struct.
|
long |
size()
Returns the value of the
size field. |
MeshoptStream |
size(long value)
Sets the specified value to the
size field. |
int |
sizeof() |
long |
stride()
Returns the value of the
stride field. |
MeshoptStream |
stride(long value)
Sets the specified value to the
stride field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int DATA
public static final int SIZE
public static final int STRIDE
public MeshoptStream(java.nio.ByteBuffer container)
MeshoptStream 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic java.nio.ByteBuffer data(int capacity)
ByteBuffer view of the data pointed to by the data field.capacity - the number of elements in the returned bufferpublic long size()
size field.public long stride()
stride field.public MeshoptStream data(java.nio.ByteBuffer value)
ByteBuffer to the data field.public MeshoptStream size(long value)
size field.public MeshoptStream stride(long value)
stride field.public MeshoptStream set(java.nio.ByteBuffer data, long size, long stride)
public MeshoptStream set(MeshoptStream src)
src - the source structpublic static MeshoptStream malloc()
MeshoptStream instance allocated with memAlloc. The instance must be explicitly freed.public static MeshoptStream calloc()
MeshoptStream instance allocated with memCalloc. The instance must be explicitly freed.public static MeshoptStream create()
MeshoptStream instance allocated with BufferUtils.public static MeshoptStream create(long address)
MeshoptStream instance for the specified memory address.@Nullable public static MeshoptStream createSafe(long address)
public static MeshoptStream.Buffer malloc(int capacity)
MeshoptStream.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MeshoptStream.Buffer calloc(int capacity)
MeshoptStream.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MeshoptStream.Buffer create(int capacity)
MeshoptStream.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static MeshoptStream.Buffer create(long address, int capacity)
MeshoptStream.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static MeshoptStream.Buffer createSafe(long address, int capacity)
public static MeshoptStream mallocStack()
MeshoptStream instance allocated on the thread-local MemoryStack.public static MeshoptStream callocStack()
MeshoptStream instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static MeshoptStream mallocStack(org.lwjgl.system.MemoryStack stack)
MeshoptStream instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static MeshoptStream callocStack(org.lwjgl.system.MemoryStack stack)
MeshoptStream instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static MeshoptStream.Buffer mallocStack(int capacity)
MeshoptStream.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static MeshoptStream.Buffer callocStack(int capacity)
MeshoptStream.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static MeshoptStream.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MeshoptStream.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static MeshoptStream.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MeshoptStream.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static java.nio.ByteBuffer ndata(long struct,
int capacity)
data.public static long nsize(long struct)
size().public static long nstride(long struct)
stride().public static void ndata(long struct,
java.nio.ByteBuffer value)
data.public static void nsize(long struct,
long value)
size.public static void nstride(long struct,
long value)
stride.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.