Class CLImageFormat

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CLImageFormat>
org.lwjgl.opencl.CLImageFormat
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class CLImageFormat extends org.lwjgl.system.Struct<CLImageFormat> implements org.lwjgl.system.NativeResource
The image format descriptor struct.

Layout


 struct cl_image_format {
     cl_channel_order image_channel_order();
     cl_channel_type image_channel_data_type();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • IMAGE_CHANNEL_ORDER

      public static final int IMAGE_CHANNEL_ORDER
      The struct member offsets.
    • IMAGE_CHANNEL_DATA_TYPE

      public static final int IMAGE_CHANNEL_DATA_TYPE
      The struct member offsets.
  • Constructor Details

    • CLImageFormat

      public CLImageFormat(ByteBuffer container)
      Creates a CLImageFormat 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.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<CLImageFormat>
    • image_channel_order

      public int image_channel_order()
      specifies the number of channels and the channel layout i.e. the memory layout in which channels are stored in the image
    • image_channel_data_type

      public int image_channel_data_type()
      describes the size of the channel data type. The number of bits per element determined by the image_channel_data_type and image_channel_order must be a power of two.
    • image_channel_order

      public CLImageFormat image_channel_order(int value)
      Sets the specified value to the image_channel_order() field.
    • image_channel_data_type

      public CLImageFormat image_channel_data_type(int value)
      Sets the specified value to the image_channel_data_type() field.
    • set

      public CLImageFormat set(int image_channel_order, int image_channel_data_type)
      Initializes this struct with the specified values.
    • set

      public CLImageFormat set(CLImageFormat src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static CLImageFormat malloc()
      Returns a new CLImageFormat instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static CLImageFormat calloc()
      Returns a new CLImageFormat instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static CLImageFormat create()
      Returns a new CLImageFormat instance allocated with BufferUtils.
    • create

      public static CLImageFormat create(long address)
      Returns a new CLImageFormat instance for the specified memory address.
    • createSafe

      public static @Nullable CLImageFormat createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static CLImageFormat.Buffer malloc(int capacity)
      Returns a new CLImageFormat.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static CLImageFormat.Buffer calloc(int capacity)
      Returns a new CLImageFormat.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CLImageFormat.Buffer create(int capacity)
      Returns a new CLImageFormat.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CLImageFormat.Buffer create(long address, int capacity)
      Create a CLImageFormat.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable CLImageFormat.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static CLImageFormat mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static CLImageFormat callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static CLImageFormat mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static CLImageFormat callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static CLImageFormat.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static CLImageFormat.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static CLImageFormat.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static CLImageFormat.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static CLImageFormat malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CLImageFormat instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static CLImageFormat calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CLImageFormat instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static CLImageFormat.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CLImageFormat.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static CLImageFormat.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CLImageFormat.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nimage_channel_order

      public static int nimage_channel_order(long struct)
      Unsafe version of image_channel_order().
    • nimage_channel_data_type

      public static int nimage_channel_data_type(long struct)
      Unsafe version of image_channel_data_type().
    • nimage_channel_order

      public static void nimage_channel_order(long struct, int value)
      Unsafe version of image_channel_order.
    • nimage_channel_data_type

      public static void nimage_channel_data_type(long struct, int value)
      Unsafe version of image_channel_data_type.