Class VkClearDepthStencilValue

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

    public class VkClearDepthStencilValue
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying a clear depth stencil value.
    Valid Usage
    See Also

    VkClearValue, CmdClearDepthStencilImage

    Member documentation

    • depth – the clear value for the depth aspect of the depth/stencil attachment. It is a floating-point value which is automatically converted to the attachment’s format.
    • stencil – the clear value for the stencil aspect of the depth/stencil attachment. It is a 32-bit integer value which is converted to the attachment’s format by taking the appropriate number of LSBs.

    Layout

    
     struct VkClearDepthStencilValue {
         float depth;
         uint32_t stencil;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DEPTH, STENCIL

        The struct member offsets.
    • Constructor Detail

      • VkClearDepthStencilValue

        public VkClearDepthStencilValue​(java.nio.ByteBuffer container)
        Creates a VkClearDepthStencilValue 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • depth

        public float depth()
        Returns the value of the depth field.
      • stencil

        public int stencil()
        Returns the value of the stencil field.
      • set

        public VkClearDepthStencilValue set​(float depth,
                                            int stencil)
        Initializes this struct with the specified values.
      • malloc

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

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

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

        public static VkClearDepthStencilValue create​(long address)
        Returns a new VkClearDepthStencilValue instance for the specified memory address.
      • mallocStack

        public static VkClearDepthStencilValue mallocStack()
        Returns a new VkClearDepthStencilValue instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkClearDepthStencilValue callocStack()
        Returns a new VkClearDepthStencilValue instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkClearDepthStencilValue mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkClearDepthStencilValue instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

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

        public static float ndepth​(long struct)
        Unsafe version of depth().
      • nstencil

        public static int nstencil​(long struct)
        Unsafe version of stencil().
      • ndepth

        public static void ndepth​(long struct,
                                  float value)
        Unsafe version of depth.
      • nstencil

        public static void nstencil​(long struct,
                                    int value)
        Unsafe version of stencil.