public class CLImageDesc
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
image_type – describes the image typeimage_width –
the width of the image in pixels. For a 2D image and image array, the image width must be ≤ DEVICE_IMAGE2D_MAX_WIDTH. For a 3D image, the
image width must be ≤ DEVICE_IMAGE3D_MAX_WIDTH. For a 1D image buffer, the image width must be ≤ DEVICE_IMAGE_MAX_BUFFER_SIZE.
For a 1D image and 1D image array, the image width must be ≤ DEVICE_IMAGE2D_MAX_WIDTH.image_height –
the height of the image in pixels. This is only used if the image is a 2D, 3D or 2D image array. For a 2D image or image array, the image height must
be ≤ DEVICE_IMAGE2D_MAX_HEIGHT. For a 3D image, the image height must be ≤ DEVICE_IMAGE3D_MAX_HEIGHT.image_depth – the depth of the image in pixels. This is only used if the image is a 3D image and must be a value ≥ 1 and ≤ DEVICE_IMAGE3D_MAX_DEPTH.image_array_size –
the number of images in the image array. This is only used if the image is a 1D or 2D image array. The values for image_array_size, if
specified, must be a value ≥ 1 and ≤ DEVICE_IMAGE_MAX_ARRAY_SIZE.
Note that reading and writing 2D image arrays from a kernel with image_array_size = 1 may be lower performance than 2D images.
image_row_pitch –
the scan-line pitch in bytes. This must be 0 if host_ptr is NULL and can be either 0 or ≥ image_width * size of element in bytes if
host_ptr is not NULL. If host_ptr is not NULL and image_row_pitch = 0, image_row_pitch is calculated as
image_width * size of element in bytes. If image_row_pitch is not 0, it must be a multiple of the image element size in bytes.image_slice_pitch –
the size in bytes of each 2D slice in the 3D image or the size in bytes of each image in a 1D or 2D image array. This must be 0 if host_ptr is
NULL. If host_ptr is not NULL, image_slice_pitch can be either 0 or ≥ image_row_pitch * image_height for a 2D image array
or 3D image and can be either 0 or ≥ image_row_pitch for a 1D image array. If host_ptr is not NULL and
image_slice_pitch = 0, image_slice_pitch is calculated as image_row_pitch * image_height for a 2D image array or 3D image and
image_row_pitch for a 1D image array. If image_slice_pitch is not 0, it must be a multiple of the image_row_pitch.num_mip_levels – must be 0num_samples – must be 0buffer –
refers to a valid buffer memory object if image_type is MEM_OBJECT_IMAGE1D_BUFFER. Otherwise it must be NULL. For a 1D image buffer
object, the image pixels are taken from the buffer object's data store. When the contents of a buffer object's data store are modified, those changes
are reflected in the contents of the 1D image buffer object and vice-versa at corresponding sychronization points. The image_width * size of
element in bytes must be ≤ size of buffer object data store.
struct cl_image_desc {
cl_mem_object_type image_type;
size_t image_width;
size_t image_height;
size_t image_depth;
size_t image_array_size;
size_t image_row_pitch;
size_t image_slice_pitch;
cl_uint num_mip_levels;
cl_uint num_samples;
cl_mem buffer;
}| Modifier and Type | Class and Description |
|---|---|
static class |
CLImageDesc.Buffer
An array of
CLImageDesc structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BUFFER
The struct member offsets.
|
static int |
IMAGE_ARRAY_SIZE
The struct member offsets.
|
static int |
IMAGE_DEPTH
The struct member offsets.
|
static int |
IMAGE_HEIGHT
The struct member offsets.
|
static int |
IMAGE_ROW_PITCH
The struct member offsets.
|
static int |
IMAGE_SLICE_PITCH
The struct member offsets.
|
static int |
IMAGE_TYPE
The struct member offsets.
|
static int |
IMAGE_WIDTH
The struct member offsets.
|
static int |
NUM_MIP_LEVELS
The struct member offsets.
|
static int |
NUM_SAMPLES
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
CLImageDesc(java.nio.ByteBuffer container)
Creates a
CLImageDesc instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
buffer()
Returns the value of the
buffer field. |
CLImageDesc |
buffer(long value)
Sets the specified value to the
buffer field. |
static CLImageDesc |
calloc()
Returns a new
CLImageDesc instance allocated with memCalloc. |
static CLImageDesc.Buffer |
calloc(int capacity)
Returns a new
CLImageDesc.Buffer instance allocated with memCalloc. |
static CLImageDesc |
callocStack()
Returns a new
CLImageDesc instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CLImageDesc.Buffer |
callocStack(int capacity)
Returns a new
CLImageDesc.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CLImageDesc.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CLImageDesc.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CLImageDesc |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CLImageDesc instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CLImageDesc |
create()
Returns a new
CLImageDesc instance allocated with BufferUtils. |
static CLImageDesc.Buffer |
create(int capacity)
Returns a new
CLImageDesc.Buffer instance allocated with BufferUtils. |
static CLImageDesc |
create(long address)
Returns a new
CLImageDesc instance for the specified memory address. |
static CLImageDesc.Buffer |
create(long address,
int capacity)
Create a
CLImageDesc.Buffer instance at the specified memory. |
static CLImageDesc |
createSafe(long address)
|
static CLImageDesc.Buffer |
createSafe(long address,
int capacity)
|
long |
image_array_size()
Returns the value of the
image_array_size field. |
CLImageDesc |
image_array_size(long value)
Sets the specified value to the
image_array_size field. |
long |
image_depth()
Returns the value of the
image_depth field. |
CLImageDesc |
image_depth(long value)
Sets the specified value to the
image_depth field. |
long |
image_height()
Returns the value of the
image_height field. |
CLImageDesc |
image_height(long value)
Sets the specified value to the
image_height field. |
long |
image_row_pitch()
Returns the value of the
image_row_pitch field. |
CLImageDesc |
image_row_pitch(long value)
Sets the specified value to the
image_row_pitch field. |
long |
image_slice_pitch()
Returns the value of the
image_slice_pitch field. |
CLImageDesc |
image_slice_pitch(long value)
Sets the specified value to the
image_slice_pitch field. |
int |
image_type()
Returns the value of the
image_type field. |
CLImageDesc |
image_type(int value)
Sets the specified value to the
image_type field. |
long |
image_width()
Returns the value of the
image_width field. |
CLImageDesc |
image_width(long value)
Sets the specified value to the
image_width field. |
static CLImageDesc |
malloc()
Returns a new
CLImageDesc instance allocated with memAlloc. |
static CLImageDesc.Buffer |
malloc(int capacity)
Returns a new
CLImageDesc.Buffer instance allocated with memAlloc. |
static CLImageDesc |
mallocStack()
Returns a new
CLImageDesc instance allocated on the thread-local MemoryStack. |
static CLImageDesc.Buffer |
mallocStack(int capacity)
Returns a new
CLImageDesc.Buffer instance allocated on the thread-local MemoryStack. |
static CLImageDesc.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CLImageDesc.Buffer instance allocated on the specified MemoryStack. |
static CLImageDesc |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CLImageDesc instance allocated on the specified MemoryStack. |
static long |
nbuffer(long struct)
Unsafe version of
buffer(). |
static void |
nbuffer(long struct,
long value)
Unsafe version of
buffer. |
static long |
nimage_array_size(long struct)
Unsafe version of
image_array_size(). |
static void |
nimage_array_size(long struct,
long value)
Unsafe version of
image_array_size. |
static long |
nimage_depth(long struct)
Unsafe version of
image_depth(). |
static void |
nimage_depth(long struct,
long value)
Unsafe version of
image_depth. |
static long |
nimage_height(long struct)
Unsafe version of
image_height(). |
static void |
nimage_height(long struct,
long value)
Unsafe version of
image_height. |
static long |
nimage_row_pitch(long struct)
Unsafe version of
image_row_pitch(). |
static void |
nimage_row_pitch(long struct,
long value)
Unsafe version of
image_row_pitch. |
static long |
nimage_slice_pitch(long struct)
Unsafe version of
image_slice_pitch(). |
static void |
nimage_slice_pitch(long struct,
long value)
Unsafe version of
image_slice_pitch. |
static int |
nimage_type(long struct)
Unsafe version of
image_type(). |
static void |
nimage_type(long struct,
int value)
Unsafe version of
image_type. |
static long |
nimage_width(long struct)
Unsafe version of
image_width(). |
static void |
nimage_width(long struct,
long value)
Unsafe version of
image_width. |
static int |
nnum_mip_levels(long struct)
Unsafe version of
num_mip_levels(). |
static void |
nnum_mip_levels(long struct,
int value)
Unsafe version of
num_mip_levels. |
static int |
nnum_samples(long struct)
Unsafe version of
num_samples(). |
static void |
nnum_samples(long struct,
int value)
Unsafe version of
num_samples. |
int |
num_mip_levels()
Returns the value of the
num_mip_levels field. |
CLImageDesc |
num_mip_levels(int value)
Sets the specified value to the
num_mip_levels field. |
int |
num_samples()
Returns the value of the
num_samples field. |
CLImageDesc |
num_samples(int value)
Sets the specified value to the
num_samples field. |
CLImageDesc |
set(CLImageDesc src)
Copies the specified struct data to this struct.
|
CLImageDesc |
set(int image_type,
long image_width,
long image_height,
long image_depth,
long image_array_size,
long image_row_pitch,
long image_slice_pitch,
int num_mip_levels,
int num_samples,
long buffer)
Initializes this struct with the specified values.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int IMAGE_TYPE
public static final int IMAGE_WIDTH
public static final int IMAGE_HEIGHT
public static final int IMAGE_DEPTH
public static final int IMAGE_ARRAY_SIZE
public static final int IMAGE_ROW_PITCH
public static final int IMAGE_SLICE_PITCH
public static final int NUM_MIP_LEVELS
public static final int NUM_SAMPLES
public static final int BUFFER
public CLImageDesc(java.nio.ByteBuffer container)
CLImageDesc 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 int image_type()
image_type field.public long image_width()
image_width field.public long image_height()
image_height field.public long image_depth()
image_depth field.public long image_array_size()
image_array_size field.public long image_row_pitch()
image_row_pitch field.public long image_slice_pitch()
image_slice_pitch field.public int num_mip_levels()
num_mip_levels field.public int num_samples()
num_samples field.public long buffer()
buffer field.public CLImageDesc image_type(int value)
image_type field.public CLImageDesc image_width(long value)
image_width field.public CLImageDesc image_height(long value)
image_height field.public CLImageDesc image_depth(long value)
image_depth field.public CLImageDesc image_array_size(long value)
image_array_size field.public CLImageDesc image_row_pitch(long value)
image_row_pitch field.public CLImageDesc image_slice_pitch(long value)
image_slice_pitch field.public CLImageDesc num_mip_levels(int value)
num_mip_levels field.public CLImageDesc num_samples(int value)
num_samples field.public CLImageDesc buffer(long value)
buffer field.public CLImageDesc set(int image_type, long image_width, long image_height, long image_depth, long image_array_size, long image_row_pitch, long image_slice_pitch, int num_mip_levels, int num_samples, long buffer)
public CLImageDesc set(CLImageDesc src)
src - the source structpublic static CLImageDesc malloc()
CLImageDesc instance allocated with memAlloc. The instance must be explicitly freed.public static CLImageDesc calloc()
CLImageDesc instance allocated with memCalloc. The instance must be explicitly freed.public static CLImageDesc create()
CLImageDesc instance allocated with BufferUtils.public static CLImageDesc create(long address)
CLImageDesc instance for the specified memory address.@Nullable public static CLImageDesc createSafe(long address)
public static CLImageDesc.Buffer malloc(int capacity)
CLImageDesc.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CLImageDesc.Buffer calloc(int capacity)
CLImageDesc.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CLImageDesc.Buffer create(int capacity)
CLImageDesc.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static CLImageDesc.Buffer create(long address, int capacity)
CLImageDesc.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static CLImageDesc.Buffer createSafe(long address, int capacity)
public static CLImageDesc mallocStack()
CLImageDesc instance allocated on the thread-local MemoryStack.public static CLImageDesc callocStack()
CLImageDesc instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static CLImageDesc mallocStack(org.lwjgl.system.MemoryStack stack)
CLImageDesc instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static CLImageDesc callocStack(org.lwjgl.system.MemoryStack stack)
CLImageDesc instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static CLImageDesc.Buffer mallocStack(int capacity)
CLImageDesc.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static CLImageDesc.Buffer callocStack(int capacity)
CLImageDesc.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static CLImageDesc.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CLImageDesc.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static CLImageDesc.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CLImageDesc.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 int nimage_type(long struct)
image_type().public static long nimage_width(long struct)
image_width().public static long nimage_height(long struct)
image_height().public static long nimage_depth(long struct)
image_depth().public static long nimage_array_size(long struct)
image_array_size().public static long nimage_row_pitch(long struct)
image_row_pitch().public static long nimage_slice_pitch(long struct)
image_slice_pitch().public static int nnum_mip_levels(long struct)
num_mip_levels().public static int nnum_samples(long struct)
num_samples().public static long nbuffer(long struct)
buffer().public static void nimage_type(long struct,
int value)
image_type.public static void nimage_width(long struct,
long value)
image_width.public static void nimage_height(long struct,
long value)
image_height.public static void nimage_depth(long struct,
long value)
image_depth.public static void nimage_array_size(long struct,
long value)
image_array_size.public static void nimage_row_pitch(long struct,
long value)
image_row_pitch.public static void nimage_slice_pitch(long struct,
long value)
image_slice_pitch.public static void nnum_mip_levels(long struct,
int value)
num_mip_levels.public static void nnum_samples(long struct,
int value)
num_samples.public static void nbuffer(long struct,
long value)
buffer.Copyright LWJGL. All Rights Reserved. License terms.