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, NativeResource, Pointer
public class VkSurfaceFormatKHR extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes a surface format.
Valid Usage
format
must be a validVkFormat
valuecolorSpace
must be a validVkColorSpaceKHR
value
Member documentation
format
– aVkFormat
that is compatible with the surfacecolorSpace
– a presentationVkColorSpaceKHR
that is compatible with the surface. Must be:COLOR_SPACE_SRGB_NONLINEAR_KHR
Layout
struct VkSurfaceFormatKHR { VkFormat format; VkColorSpaceKHR colorSpace; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkSurfaceFormatKHR.Buffer
An array ofVkSurfaceFormatKHR
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 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 and 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, MemoryStack stack)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSurfaceFormatKHR
callocStack(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 ornull
if the address isNULL
.static VkSurfaceFormatKHR.Buffer
create(long address, int capacity)
Create aVkSurfaceFormatKHR.Buffer
instance at the specified memory.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, MemoryStack stack)
Returns a newVkSurfaceFormatKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkSurfaceFormatKHR
mallocStack(MemoryStack stack)
Returns a newVkSurfaceFormatKHR
instance allocated on the specifiedMemoryStack
.int
sizeof()
Returns thesizeof(struct)
.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:Struct
Returns thesizeof(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 ornull
if the address isNULL
.
-
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
-
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(MemoryStack stack)
Returns a newVkSurfaceFormatKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSurfaceFormatKHR callocStack(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, 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, 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
-
-