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.NativeResourceStructure describing a supported swapchain format-color space pair.Member documentation
format– aVkFormatthat is compatible with the specified surface.colorSpace– a presentationVkColorSpaceKHRthat is compatible with the surface.
Layout
struct VkSurfaceFormatKHR { VkFormat format; VkColorSpaceKHR colorSpace; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkSurfaceFormatKHR.BufferAn array ofVkSurfaceFormatKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCOLORSPACE
FORMATThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkSurfaceFormatKHR(java.nio.ByteBuffer container)Creates aVkSurfaceFormatKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkSurfaceFormatKHRcalloc()Returns a newVkSurfaceFormatKHRinstance allocated withmemCalloc.static VkSurfaceFormatKHR.Buffercalloc(int capacity)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated withmemCalloc.static VkSurfaceFormatKHRcallocStack()Returns a newVkSurfaceFormatKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSurfaceFormatKHR.BuffercallocStack(int capacity)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSurfaceFormatKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSurfaceFormatKHRcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSurfaceFormatKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcolorSpace()Returns the value of thecolorSpacefield.static VkSurfaceFormatKHRcreate()Returns a newVkSurfaceFormatKHRinstance allocated withBufferUtils.static VkSurfaceFormatKHR.Buffercreate(int capacity)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated withBufferUtils.static VkSurfaceFormatKHRcreate(long address)Returns a newVkSurfaceFormatKHRinstance for the specified memory address.static VkSurfaceFormatKHR.Buffercreate(long address, int capacity)Create aVkSurfaceFormatKHR.Bufferinstance at the specified memory.static VkSurfaceFormatKHRcreateSafe(long address)static VkSurfaceFormatKHR.BuffercreateSafe(long address, int capacity)intformat()Returns the value of theformatfield.static VkSurfaceFormatKHRmalloc()Returns a newVkSurfaceFormatKHRinstance allocated withmemAlloc.static VkSurfaceFormatKHR.Buffermalloc(int capacity)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated withmemAlloc.static VkSurfaceFormatKHRmallocStack()Returns a newVkSurfaceFormatKHRinstance allocated on the thread-localMemoryStack.static VkSurfaceFormatKHR.BuffermallocStack(int capacity)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated on the thread-localMemoryStack.static VkSurfaceFormatKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSurfaceFormatKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkSurfaceFormatKHRmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSurfaceFormatKHRinstance allocated on the specifiedMemoryStack.static intncolorSpace(long struct)Unsafe version ofcolorSpace().static intnformat(long struct)Unsafe version offormat().intsizeof()
-
-
-
Constructor Detail
-
VkSurfaceFormatKHR
public VkSurfaceFormatKHR(java.nio.ByteBuffer container)
Creates aVkSurfaceFormatKHRinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
format
public int format()
Returns the value of theformatfield.
-
colorSpace
public int colorSpace()
Returns the value of thecolorSpacefield.
-
malloc
public static VkSurfaceFormatKHR malloc()
Returns a newVkSurfaceFormatKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSurfaceFormatKHR calloc()
Returns a newVkSurfaceFormatKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSurfaceFormatKHR create()
Returns a newVkSurfaceFormatKHRinstance allocated withBufferUtils.
-
create
public static VkSurfaceFormatKHR create(long address)
Returns a newVkSurfaceFormatKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkSurfaceFormatKHR createSafe(long address)
-
malloc
public static VkSurfaceFormatKHR.Buffer malloc(int capacity)
Returns a newVkSurfaceFormatKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSurfaceFormatKHR.Buffer calloc(int capacity)
Returns a newVkSurfaceFormatKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSurfaceFormatKHR.Buffer create(int capacity)
Returns a newVkSurfaceFormatKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSurfaceFormatKHR.Buffer create(long address, int capacity)
Create aVkSurfaceFormatKHR.Bufferinstance 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 newVkSurfaceFormatKHRinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSurfaceFormatKHR callocStack()
Returns a newVkSurfaceFormatKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSurfaceFormatKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSurfaceFormatKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSurfaceFormatKHRinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSurfaceFormatKHR.Buffer callocStack(int capacity)
Returns a newVkSurfaceFormatKHR.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-