public class CLBufferRegion
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
origin – the region offset, in bytessize – the region size, in bytes
struct cl_buffer_region {
size_t origin;
size_t size;
}| Modifier and Type | Class and Description |
|---|---|
static class |
CLBufferRegion.Buffer
An array of
CLBufferRegion structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
ORIGIN
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
CLBufferRegion(java.nio.ByteBuffer container)
Creates a
CLBufferRegion instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static CLBufferRegion |
calloc()
Returns a new
CLBufferRegion instance allocated with memCalloc. |
static CLBufferRegion.Buffer |
calloc(int capacity)
Returns a new
CLBufferRegion.Buffer instance allocated with memCalloc. |
static CLBufferRegion |
callocStack()
Returns a new
CLBufferRegion instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CLBufferRegion.Buffer |
callocStack(int capacity)
Returns a new
CLBufferRegion.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CLBufferRegion.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CLBufferRegion.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CLBufferRegion |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CLBufferRegion instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CLBufferRegion |
create()
Returns a new
CLBufferRegion instance allocated with BufferUtils. |
static CLBufferRegion.Buffer |
create(int capacity)
Returns a new
CLBufferRegion.Buffer instance allocated with BufferUtils. |
static CLBufferRegion |
create(long address)
Returns a new
CLBufferRegion instance for the specified memory address. |
static CLBufferRegion.Buffer |
create(long address,
int capacity)
Create a
CLBufferRegion.Buffer instance at the specified memory. |
static CLBufferRegion |
createSafe(long address)
|
static CLBufferRegion.Buffer |
createSafe(long address,
int capacity)
|
static CLBufferRegion |
malloc()
Returns a new
CLBufferRegion instance allocated with memAlloc. |
static CLBufferRegion.Buffer |
malloc(int capacity)
Returns a new
CLBufferRegion.Buffer instance allocated with memAlloc. |
static CLBufferRegion |
mallocStack()
Returns a new
CLBufferRegion instance allocated on the thread-local MemoryStack. |
static CLBufferRegion.Buffer |
mallocStack(int capacity)
Returns a new
CLBufferRegion.Buffer instance allocated on the thread-local MemoryStack. |
static CLBufferRegion.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CLBufferRegion.Buffer instance allocated on the specified MemoryStack. |
static CLBufferRegion |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CLBufferRegion instance allocated on the specified MemoryStack. |
static long |
norigin(long struct)
Unsafe version of
origin(). |
static void |
norigin(long struct,
long value)
Unsafe version of
origin. |
static long |
nsize(long struct)
Unsafe version of
size(). |
static void |
nsize(long struct,
long value)
Unsafe version of
size. |
long |
origin()
Returns the value of the
origin field. |
CLBufferRegion |
origin(long value)
Sets the specified value to the
origin field. |
CLBufferRegion |
set(CLBufferRegion src)
Copies the specified struct data to this struct.
|
CLBufferRegion |
set(long origin,
long size)
Initializes this struct with the specified values.
|
long |
size()
Returns the value of the
size field. |
CLBufferRegion |
size(long value)
Sets the specified value to the
size field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int ORIGIN
public static final int SIZE
public CLBufferRegion(java.nio.ByteBuffer container)
CLBufferRegion 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 long origin()
origin field.public long size()
size field.public CLBufferRegion origin(long value)
origin field.public CLBufferRegion size(long value)
size field.public CLBufferRegion set(long origin, long size)
public CLBufferRegion set(CLBufferRegion src)
src - the source structpublic static CLBufferRegion malloc()
CLBufferRegion instance allocated with memAlloc. The instance must be explicitly freed.public static CLBufferRegion calloc()
CLBufferRegion instance allocated with memCalloc. The instance must be explicitly freed.public static CLBufferRegion create()
CLBufferRegion instance allocated with BufferUtils.public static CLBufferRegion create(long address)
CLBufferRegion instance for the specified memory address.@Nullable public static CLBufferRegion createSafe(long address)
public static CLBufferRegion.Buffer malloc(int capacity)
CLBufferRegion.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CLBufferRegion.Buffer calloc(int capacity)
CLBufferRegion.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CLBufferRegion.Buffer create(int capacity)
CLBufferRegion.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static CLBufferRegion.Buffer create(long address, int capacity)
CLBufferRegion.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static CLBufferRegion.Buffer createSafe(long address, int capacity)
public static CLBufferRegion mallocStack()
CLBufferRegion instance allocated on the thread-local MemoryStack.public static CLBufferRegion callocStack()
CLBufferRegion instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static CLBufferRegion mallocStack(org.lwjgl.system.MemoryStack stack)
CLBufferRegion instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static CLBufferRegion callocStack(org.lwjgl.system.MemoryStack stack)
CLBufferRegion instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static CLBufferRegion.Buffer mallocStack(int capacity)
CLBufferRegion.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static CLBufferRegion.Buffer callocStack(int capacity)
CLBufferRegion.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static CLBufferRegion.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CLBufferRegion.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static CLBufferRegion.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CLBufferRegion.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 long norigin(long struct)
origin().public static long nsize(long struct)
size().public static void norigin(long struct,
long value)
origin.public static void nsize(long struct,
long value)
size.Copyright LWJGL. All Rights Reserved. License terms.