Package org.lwjgl.vulkan
Class VkSurfaceFormatKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSurfaceFormatKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkSurfaceFormatKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure describing a supported swapchain format-color space pair.Member documentation
format
– aVkFormat
that is compatible with the specified surface.colorSpace
– a presentationVkColorSpaceKHR
that is compatible with the surface.
Layout
struct VkSurfaceFormatKHR { VkFormat format; VkColorSpaceKHR colorSpace; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkSurfaceFormatKHR.Buffer
An array ofVkSurfaceFormatKHR
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
COLORSPACE
FORMATThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkSurfaceFormatKHR(java.nio.ByteBuffer container)
Creates aVkSurfaceFormatKHR
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 VkSurfaceFormatKHR
calloc()
Returns a newVkSurfaceFormatKHR
instance allocated withmemCalloc
.static VkSurfaceFormatKHR.Buffer
calloc(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated withmemCalloc
.static VkSurfaceFormatKHR
callocStack()
Returns a newVkSurfaceFormatKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSurfaceFormatKHR.Buffer
callocStack(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSurfaceFormatKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSurfaceFormatKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
colorSpace()
Returns the value of thecolorSpace
field.static VkSurfaceFormatKHR
create()
Returns a newVkSurfaceFormatKHR
instance allocated withBufferUtils
.static VkSurfaceFormatKHR.Buffer
create(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated withBufferUtils
.static VkSurfaceFormatKHR
create(long address)
Returns a newVkSurfaceFormatKHR
instance for the specified memory address.static VkSurfaceFormatKHR.Buffer
create(long address, int capacity)
Create aVkSurfaceFormatKHR.Buffer
instance at the specified memory.static VkSurfaceFormatKHR
createSafe(long address)
static VkSurfaceFormatKHR.Buffer
createSafe(long address, int capacity)
int
format()
Returns the value of theformat
field.static VkSurfaceFormatKHR
malloc()
Returns a newVkSurfaceFormatKHR
instance allocated withmemAlloc
.static VkSurfaceFormatKHR.Buffer
malloc(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated withmemAlloc
.static VkSurfaceFormatKHR
mallocStack()
Returns a newVkSurfaceFormatKHR
instance allocated on the thread-localMemoryStack
.static VkSurfaceFormatKHR.Buffer
mallocStack(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkSurfaceFormatKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkSurfaceFormatKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR
instance allocated on the specifiedMemoryStack
.static int
ncolorSpace(long struct)
Unsafe version ofcolorSpace()
.static int
nformat(long struct)
Unsafe version offormat()
.int
sizeof()
-
-
-
Constructor Detail
-
VkSurfaceFormatKHR
public VkSurfaceFormatKHR(java.nio.ByteBuffer container)
Creates aVkSurfaceFormatKHR
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
-
format
public int format()
Returns the value of theformat
field.
-
colorSpace
public int colorSpace()
Returns the value of thecolorSpace
field.
-
malloc
public static VkSurfaceFormatKHR malloc()
Returns a newVkSurfaceFormatKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSurfaceFormatKHR calloc()
Returns a newVkSurfaceFormatKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSurfaceFormatKHR create()
Returns a newVkSurfaceFormatKHR
instance allocated withBufferUtils
.
-
create
public static VkSurfaceFormatKHR create(long address)
Returns a newVkSurfaceFormatKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkSurfaceFormatKHR createSafe(long address)
-
malloc
public static VkSurfaceFormatKHR.Buffer malloc(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSurfaceFormatKHR.Buffer calloc(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSurfaceFormatKHR.Buffer create(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSurfaceFormatKHR.Buffer create(long address, int capacity)
Create aVkSurfaceFormatKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkSurfaceFormatKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkSurfaceFormatKHR mallocStack()
Returns a newVkSurfaceFormatKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSurfaceFormatKHR callocStack()
Returns a newVkSurfaceFormatKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSurfaceFormatKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSurfaceFormatKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkSurfaceFormatKHR.Buffer mallocStack(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSurfaceFormatKHR.Buffer callocStack(int capacity)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkSurfaceFormatKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkSurfaceFormatKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nformat
public static int nformat(long struct)
Unsafe version offormat()
.
-
ncolorSpace
public static int ncolorSpace(long struct)
Unsafe version ofcolorSpace()
.
-
-