Package org.lwjgl.vulkan
Class VkStencilOpState
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkStencilOpState
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkStencilOpState extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about the stencil test as part of graphics pipeline creation.
Valid Usage
failOp
must be a validVkStencilOp
valuepassOp
must be a validVkStencilOp
valuedepthFailOp
must be a validVkStencilOp
valuecompareOp
must be a validVkCompareOp
value
Member documentation
failOp
– the action performed on samples that fail the stencil test. One of:STENCIL_OP_DECREMENT_AND_CLAMP
STENCIL_OP_DECREMENT_AND_WRAP
STENCIL_OP_INCREMENT_AND_CLAMP
STENCIL_OP_INCREMENT_AND_WRAP
STENCIL_OP_INVERT
STENCIL_OP_KEEP
STENCIL_OP_REPLACE
STENCIL_OP_ZERO
passOp
– the action performed on samples that pass both the depth and stencil testsdepthFailOp
– the action performed on samples that pass the stencil test and fail the depth testcompareOp
– the comparison operator used in the stencil test. One of:COMPARE_OP_ALWAYS
COMPARE_OP_EQUAL
COMPARE_OP_GREATER
COMPARE_OP_GREATER_OR_EQUAL
COMPARE_OP_LESS
COMPARE_OP_LESS_OR_EQUAL
COMPARE_OP_NEVER
COMPARE_OP_NOT_EQUAL
compareMask
– selects the bits of the unsigned integer stencil values participating in the stencil testwriteMask
– selects the bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachmentreference
– an integer reference value that is used in the unsigned stencil comparison
Layout
struct VkStencilOpState { VkStencilOp failOp; VkStencilOp passOp; VkStencilOp depthFailOp; VkCompareOp compareOp; uint32_t compareMask; uint32_t writeMask; uint32_t reference; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkStencilOpState.Buffer
An array ofVkStencilOpState
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkStencilOpState(java.nio.ByteBuffer container)
Creates aVkStencilOpState
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkStencilOpState
calloc()
Returns a newVkStencilOpState
instance allocated withmemCalloc
.static VkStencilOpState.Buffer
calloc(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated withmemCalloc
.static VkStencilOpState
callocStack()
Returns a newVkStencilOpState
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkStencilOpState.Buffer
callocStack(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkStencilOpState.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkStencilOpState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkStencilOpState
callocStack(MemoryStack stack)
Returns a newVkStencilOpState
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
compareMask()
Returns the value of thecompareMask
field.VkStencilOpState
compareMask(int value)
Sets the specified value to thecompareMask
field.int
compareOp()
Returns the value of thecompareOp
field.VkStencilOpState
compareOp(int value)
Sets the specified value to thecompareOp
field.static VkStencilOpState
create()
Returns a newVkStencilOpState
instance allocated withBufferUtils
.static VkStencilOpState.Buffer
create(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated withBufferUtils
.static VkStencilOpState
create(long address)
Returns a newVkStencilOpState
instance for the specified memory address ornull
if the address isNULL
.static VkStencilOpState.Buffer
create(long address, int capacity)
Create aVkStencilOpState.Buffer
instance at the specified memory.int
depthFailOp()
Returns the value of thedepthFailOp
field.VkStencilOpState
depthFailOp(int value)
Sets the specified value to thedepthFailOp
field.int
failOp()
Returns the value of thefailOp
field.VkStencilOpState
failOp(int value)
Sets the specified value to thefailOp
field.static VkStencilOpState
malloc()
Returns a newVkStencilOpState
instance allocated withmemAlloc
.static VkStencilOpState.Buffer
malloc(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated withmemAlloc
.static VkStencilOpState
mallocStack()
Returns a newVkStencilOpState
instance allocated on the thread-localMemoryStack
.static VkStencilOpState.Buffer
mallocStack(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated on the thread-localMemoryStack
.static VkStencilOpState.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkStencilOpState.Buffer
instance allocated on the specifiedMemoryStack
.static VkStencilOpState
mallocStack(MemoryStack stack)
Returns a newVkStencilOpState
instance allocated on the specifiedMemoryStack
.VkStencilOpState
nset(long struct)
Unsafe version ofset
.int
passOp()
Returns the value of thepassOp
field.VkStencilOpState
passOp(int value)
Sets the specified value to thepassOp
field.int
reference()
Returns the value of thereference
field.VkStencilOpState
reference(int value)
Sets the specified value to thereference
field.VkStencilOpState
set(int failOp, int passOp, int depthFailOp, int compareOp, int compareMask, int writeMask, int reference)
Initializes this struct with the specified values.VkStencilOpState
set(VkStencilOpState src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
writeMask()
Returns the value of thewriteMask
field.VkStencilOpState
writeMask(int value)
Sets the specified value to thewriteMask
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkStencilOpState
public VkStencilOpState(java.nio.ByteBuffer container)
Creates aVkStencilOpState
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
failOp
public int failOp()
Returns the value of thefailOp
field.
-
passOp
public int passOp()
Returns the value of thepassOp
field.
-
depthFailOp
public int depthFailOp()
Returns the value of thedepthFailOp
field.
-
compareOp
public int compareOp()
Returns the value of thecompareOp
field.
-
compareMask
public int compareMask()
Returns the value of thecompareMask
field.
-
writeMask
public int writeMask()
Returns the value of thewriteMask
field.
-
reference
public int reference()
Returns the value of thereference
field.
-
failOp
public VkStencilOpState failOp(int value)
Sets the specified value to thefailOp
field.
-
passOp
public VkStencilOpState passOp(int value)
Sets the specified value to thepassOp
field.
-
depthFailOp
public VkStencilOpState depthFailOp(int value)
Sets the specified value to thedepthFailOp
field.
-
compareOp
public VkStencilOpState compareOp(int value)
Sets the specified value to thecompareOp
field.
-
compareMask
public VkStencilOpState compareMask(int value)
Sets the specified value to thecompareMask
field.
-
writeMask
public VkStencilOpState writeMask(int value)
Sets the specified value to thewriteMask
field.
-
reference
public VkStencilOpState reference(int value)
Sets the specified value to thereference
field.
-
set
public VkStencilOpState set(int failOp, int passOp, int depthFailOp, int compareOp, int compareMask, int writeMask, int reference)
Initializes this struct with the specified values.
-
nset
public VkStencilOpState nset(long struct)
Unsafe version ofset
.
-
set
public VkStencilOpState set(VkStencilOpState src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkStencilOpState malloc()
Returns a newVkStencilOpState
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkStencilOpState calloc()
Returns a newVkStencilOpState
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkStencilOpState create()
Returns a newVkStencilOpState
instance allocated withBufferUtils
.
-
create
public static VkStencilOpState create(long address)
Returns a newVkStencilOpState
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkStencilOpState.Buffer malloc(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkStencilOpState.Buffer calloc(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkStencilOpState.Buffer create(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkStencilOpState.Buffer create(long address, int capacity)
Create aVkStencilOpState.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkStencilOpState mallocStack()
Returns a newVkStencilOpState
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkStencilOpState callocStack()
Returns a newVkStencilOpState
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkStencilOpState mallocStack(MemoryStack stack)
Returns a newVkStencilOpState
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkStencilOpState callocStack(MemoryStack stack)
Returns a newVkStencilOpState
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkStencilOpState.Buffer mallocStack(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkStencilOpState.Buffer callocStack(int capacity)
Returns a newVkStencilOpState.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkStencilOpState.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkStencilOpState.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkStencilOpState.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkStencilOpState.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-