Package org.lwjgl.vulkan
Class VkClearDepthStencilValue
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.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
- Unless the
VK_EXT_depth_range_unrestricted
extension is enableddepth
must be between0.0
and1.0
, inclusive
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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkClearDepthStencilValue.Buffer
An array ofVkClearDepthStencilValue
structs.
-
Constructor Summary
Constructors Constructor Description VkClearDepthStencilValue(java.nio.ByteBuffer container)
Creates aVkClearDepthStencilValue
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkClearDepthStencilValue
calloc()
Returns a newVkClearDepthStencilValue
instance allocated withmemCalloc
.static VkClearDepthStencilValue.Buffer
calloc(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated withmemCalloc
.static VkClearDepthStencilValue
callocStack()
Returns a newVkClearDepthStencilValue
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkClearDepthStencilValue.Buffer
callocStack(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkClearDepthStencilValue.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkClearDepthStencilValue
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkClearDepthStencilValue
create()
Returns a newVkClearDepthStencilValue
instance allocated withBufferUtils
.static VkClearDepthStencilValue.Buffer
create(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated withBufferUtils
.static VkClearDepthStencilValue
create(long address)
Returns a newVkClearDepthStencilValue
instance for the specified memory address.static VkClearDepthStencilValue.Buffer
create(long address, int capacity)
Create aVkClearDepthStencilValue.Buffer
instance at the specified memory.static VkClearDepthStencilValue
createSafe(long address)
static VkClearDepthStencilValue.Buffer
createSafe(long address, int capacity)
float
depth()
Returns the value of thedepth
field.VkClearDepthStencilValue
depth(float value)
Sets the specified value to thedepth
field.static VkClearDepthStencilValue
malloc()
Returns a newVkClearDepthStencilValue
instance allocated withmemAlloc
.static VkClearDepthStencilValue.Buffer
malloc(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated withmemAlloc
.static VkClearDepthStencilValue
mallocStack()
Returns a newVkClearDepthStencilValue
instance allocated on the thread-localMemoryStack
.static VkClearDepthStencilValue.Buffer
mallocStack(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the thread-localMemoryStack
.static VkClearDepthStencilValue.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the specifiedMemoryStack
.static VkClearDepthStencilValue
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue
instance allocated on the specifiedMemoryStack
.static float
ndepth(long struct)
Unsafe version ofdepth()
.static void
ndepth(long struct, float value)
Unsafe version ofdepth
.static int
nstencil(long struct)
Unsafe version ofstencil()
.static void
nstencil(long struct, int value)
Unsafe version ofstencil
.VkClearDepthStencilValue
set(float depth, int stencil)
Initializes this struct with the specified values.VkClearDepthStencilValue
set(VkClearDepthStencilValue src)
Copies the specified struct data to this struct.int
sizeof()
int
stencil()
Returns the value of thestencil
field.VkClearDepthStencilValue
stencil(int value)
Sets the specified value to thestencil
field.
-
-
-
Constructor Detail
-
VkClearDepthStencilValue
public VkClearDepthStencilValue(java.nio.ByteBuffer container)
Creates aVkClearDepthStencilValue
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
depth
public float depth()
Returns the value of thedepth
field.
-
stencil
public int stencil()
Returns the value of thestencil
field.
-
depth
public VkClearDepthStencilValue depth(float value)
Sets the specified value to thedepth
field.
-
stencil
public VkClearDepthStencilValue stencil(int value)
Sets the specified value to thestencil
field.
-
set
public VkClearDepthStencilValue set(float depth, int stencil)
Initializes this struct with the specified values.
-
set
public VkClearDepthStencilValue set(VkClearDepthStencilValue src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkClearDepthStencilValue malloc()
Returns a newVkClearDepthStencilValue
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkClearDepthStencilValue calloc()
Returns a newVkClearDepthStencilValue
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkClearDepthStencilValue create()
Returns a newVkClearDepthStencilValue
instance allocated withBufferUtils
.
-
create
public static VkClearDepthStencilValue create(long address)
Returns a newVkClearDepthStencilValue
instance for the specified memory address.
-
createSafe
@Nullable public static VkClearDepthStencilValue createSafe(long address)
-
malloc
public static VkClearDepthStencilValue.Buffer malloc(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkClearDepthStencilValue.Buffer calloc(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkClearDepthStencilValue.Buffer create(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkClearDepthStencilValue.Buffer create(long address, int capacity)
Create aVkClearDepthStencilValue.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkClearDepthStencilValue.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkClearDepthStencilValue mallocStack()
Returns a newVkClearDepthStencilValue
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkClearDepthStencilValue callocStack()
Returns a newVkClearDepthStencilValue
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkClearDepthStencilValue mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkClearDepthStencilValue callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkClearDepthStencilValue.Buffer mallocStack(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkClearDepthStencilValue.Buffer callocStack(int capacity)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkClearDepthStencilValue.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkClearDepthStencilValue.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkClearDepthStencilValue.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ndepth
public static float ndepth(long struct)
Unsafe version ofdepth()
.
-
nstencil
public static int nstencil(long struct)
Unsafe version ofstencil()
.
-
ndepth
public static void ndepth(long struct, float value)
Unsafe version ofdepth
.
-
nstencil
public static void nstencil(long struct, int value)
Unsafe version ofstencil
.
-
-