Class VkClearColorValue

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VkClearColorValue
    extends Struct
    implements NativeResource
    Structure specifying a clear color value.
    Description

    The four array elements of the clear color map to R, G, B, and A components of image formats, in order.

    If the image has more than one sample, the same value is written to all samples for any pixels being cleared.

    See Also

    VkClearValue, CmdClearColorImage

    Member documentation

    • float32 – are the color clear values when the format of the image or attachment is one of the formats in the Interpretation of Numeric Format table other than signed integer (SINT) or unsigned integer (UINT). Floating point values are automatically converted to the format of the image, with the clear value being treated as linear if the image is sRGB.
    • int32 – are the color clear values when the format of the image or attachment is signed integer (SINT). Signed integer values are converted to the format of the image by casting to the smaller type (with negative 32-bit values mapping to negative values in the smaller type). If the integer clear value is not representable in the target type (e.g. would overflow in conversion to that type), the clear value is undefined.
    • uint32 – are the color clear values when the format of the image or attachment is unsigned integer (UINT). Unsigned integer values are converted to the format of the image by casting to the integer type with fewer bits.

    Layout

    
     union VkClearColorValue {
         float float32[4];
         int32_t int32[4];
         uint32_t uint32[4];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FLOAT32, INT32, UINT32

        The struct member offsets.
    • Constructor Detail

      • VkClearColorValue

        public VkClearColorValue​(java.nio.ByteBuffer container)
        Creates a VkClearColorValue 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • float32

        public java.nio.FloatBuffer float32()
        Returns a FloatBuffer view of the float32 field.
      • float32

        public float float32​(int index)
        Returns the value at the specified index of the float32 field.
      • int32

        public java.nio.IntBuffer int32()
        Returns a IntBuffer view of the int32 field.
      • int32

        public int int32​(int index)
        Returns the value at the specified index of the int32 field.
      • uint32

        public java.nio.IntBuffer uint32()
        Returns a IntBuffer view of the uint32 field.
      • uint32

        public int uint32​(int index)
        Returns the value at the specified index of the uint32 field.
      • float32

        public VkClearColorValue float32​(java.nio.FloatBuffer value)
        Copies the specified FloatBuffer to the float32 field.
      • float32

        public VkClearColorValue float32​(int index,
                                         float value)
        Sets the specified value at the specified index of the float32 field.
      • int32

        public VkClearColorValue int32​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the int32 field.
      • int32

        public VkClearColorValue int32​(int index,
                                       int value)
        Sets the specified value at the specified index of the int32 field.
      • uint32

        public VkClearColorValue uint32​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the uint32 field.
      • uint32

        public VkClearColorValue uint32​(int index,
                                        int value)
        Sets the specified value at the specified index of the uint32 field.
      • createSafe

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

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

        public static java.nio.FloatBuffer nfloat32​(long struct)
        Unsafe version of float32().
      • nfloat32

        public static float nfloat32​(long struct,
                                     int index)
        Unsafe version of float32.
      • nint32

        public static java.nio.IntBuffer nint32​(long struct)
        Unsafe version of int32().
      • nint32

        public static int nint32​(long struct,
                                 int index)
        Unsafe version of int32.
      • nuint32

        public static java.nio.IntBuffer nuint32​(long struct)
        Unsafe version of uint32().
      • nuint32

        public static int nuint32​(long struct,
                                  int index)
        Unsafe version of uint32.
      • nfloat32

        public static void nfloat32​(long struct,
                                    java.nio.FloatBuffer value)
        Unsafe version of float32.
      • nfloat32

        public static void nfloat32​(long struct,
                                    int index,
                                    float value)
        Unsafe version of float32.
      • nint32

        public static void nint32​(long struct,
                                  java.nio.IntBuffer value)
        Unsafe version of int32.
      • nint32

        public static void nint32​(long struct,
                                  int index,
                                  int value)
        Unsafe version of int32.
      • nuint32

        public static void nuint32​(long struct,
                                   java.nio.IntBuffer value)
        Unsafe version of uint32.
      • nuint32

        public static void nuint32​(long struct,
                                   int index,
                                   int value)
        Unsafe version of uint32.