Package org.lwjgl.vulkan
Class VkDisplaySurfaceCreateInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDisplaySurfaceCreateInfoKHR
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkDisplaySurfaceCreateInfoKHR extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a display surface should be created.
Valid Usage
sType
must beSTRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR
pNext
must beNULL
flags
must be 0displayMode
must be a validVkDisplayModeKHR
handletransform
must be a validVkSurfaceTransformFlagBitsKHR
valuealphaMode
must be a validVkDisplayPlaneAlphaFlagBitsKHR
valueplaneIndex
must be less than the number of display planes supported by the device as determined by callingGetPhysicalDeviceDisplayPlanePropertiesKHR
- If the
planeReorderPossible
member of theVkDisplayPropertiesKHR
structure returned byGetPhysicalDeviceDisplayPropertiesKHR
for the display corresponding todisplayMode
isTRUE
thenplaneStackIndex
must be less than the number of display planes supported by the device as determined by callingGetPhysicalDeviceDisplayPlanePropertiesKHR
; otherwiseplaneStackIndex
must equal thecurrentStackIndex
member ofVkDisplayPlanePropertiesKHR
returned byGetPhysicalDeviceDisplayPlanePropertiesKHR
for the display plane corresponding todisplayMode
- If
alphaMode
isDISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
thenglobalAlpha
must be between 0 and 1, inclusive alphaMode
must be 0 or one of the bits present in thesupportedAlpha
member ofVkDisplayPlaneCapabilitiesKHR
returned byGetDisplayPlaneCapabilitiesKHR
for the display plane corresponding todisplayMode
- The
width
andheight
members ofimageExtent
must be less than themaxImageDimensions2D
member ofVkPhysicalDeviceLimits
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR
pNext
– reserved for use by extensionsflags
– reserved for future use, and must be zerodisplayMode
– the mode to use when displaying this surfaceplaneIndex
– the plane on which this surface appearsplaneStackIndex
– the z-order of the planetransform
– the transform to apply to the images as part of the scannout operation. One of:globalAlpha
– the global alpha value. This value is ignored ifalphaMode
is notDISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
.alphaMode
– the type of alpha blending to use. One of:DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR
DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR
imageExtent
– the size of the presentable images to use with the surface
Layout
struct VkDisplaySurfaceCreateInfoKHR { VkStructureType sType; const void * pNext; VkDisplaySurfaceCreateFlagsKHR flags; VkDisplayModeKHR displayMode; uint32_t planeIndex; uint32_t planeStackIndex; VkSurfaceTransformFlagBitsKHR transform; float globalAlpha; VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
VkExtent2D
imageExtent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkDisplaySurfaceCreateInfoKHR.Buffer
An array ofVkDisplaySurfaceCreateInfoKHR
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 VkDisplaySurfaceCreateInfoKHR(java.nio.ByteBuffer container)
Creates aVkDisplaySurfaceCreateInfoKHR
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 int
alphaMode()
Returns the value of thealphaMode
field.VkDisplaySurfaceCreateInfoKHR
alphaMode(int value)
Sets the specified value to thealphaMode
field.static VkDisplaySurfaceCreateInfoKHR
calloc()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated withmemCalloc
.static VkDisplaySurfaceCreateInfoKHR.Buffer
calloc(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated withmemCalloc
.static VkDisplaySurfaceCreateInfoKHR
callocStack()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplaySurfaceCreateInfoKHR.Buffer
callocStack(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplaySurfaceCreateInfoKHR.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplaySurfaceCreateInfoKHR
callocStack(MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplaySurfaceCreateInfoKHR
create()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated withBufferUtils
.static VkDisplaySurfaceCreateInfoKHR.Buffer
create(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated withBufferUtils
.static VkDisplaySurfaceCreateInfoKHR
create(long address)
Returns a newVkDisplaySurfaceCreateInfoKHR
instance for the specified memory address ornull
if the address isNULL
.static VkDisplaySurfaceCreateInfoKHR.Buffer
create(long address, int capacity)
Create aVkDisplaySurfaceCreateInfoKHR.Buffer
instance at the specified memory.long
displayMode()
Returns the value of thedisplayMode
field.VkDisplaySurfaceCreateInfoKHR
displayMode(long value)
Sets the specified value to thedisplayMode
field.int
flags()
Returns the value of theflags
field.VkDisplaySurfaceCreateInfoKHR
flags(int value)
Sets the specified value to theflags
field.float
globalAlpha()
Returns the value of theglobalAlpha
field.VkDisplaySurfaceCreateInfoKHR
globalAlpha(float value)
Sets the specified value to theglobalAlpha
field.VkExtent2D
imageExtent()
Returns aVkExtent2D
view of theimageExtent
field.VkDisplaySurfaceCreateInfoKHR
imageExtent(VkExtent2D value)
Copies the specifiedVkExtent2D
to theimageExtent
field.static VkDisplaySurfaceCreateInfoKHR
malloc()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated withmemAlloc
.static VkDisplaySurfaceCreateInfoKHR.Buffer
malloc(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated withmemAlloc
.static VkDisplaySurfaceCreateInfoKHR
mallocStack()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the thread-localMemoryStack
.static VkDisplaySurfaceCreateInfoKHR.Buffer
mallocStack(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkDisplaySurfaceCreateInfoKHR.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkDisplaySurfaceCreateInfoKHR
mallocStack(MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the specifiedMemoryStack
.VkDisplaySurfaceCreateInfoKHR
nset(long struct)
Unsafe version ofset
.int
planeIndex()
Returns the value of theplaneIndex
field.VkDisplaySurfaceCreateInfoKHR
planeIndex(int value)
Sets the specified value to theplaneIndex
field.int
planeStackIndex()
Returns the value of theplaneStackIndex
field.VkDisplaySurfaceCreateInfoKHR
planeStackIndex(int value)
Sets the specified value to theplaneStackIndex
field.long
pNext()
Returns the value of thepNext
field.VkDisplaySurfaceCreateInfoKHR
pNext(long value)
Sets the specified value to thepNext
field.VkDisplaySurfaceCreateInfoKHR
set(int sType, long pNext, int flags, long displayMode, int planeIndex, int planeStackIndex, int transform, float globalAlpha, int alphaMode, VkExtent2D imageExtent)
Initializes this struct with the specified values.VkDisplaySurfaceCreateInfoKHR
set(VkDisplaySurfaceCreateInfoKHR src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkDisplaySurfaceCreateInfoKHR
sType(int value)
Sets the specified value to thesType
field.int
transform()
Returns the value of thetransform
field.VkDisplaySurfaceCreateInfoKHR
transform(int value)
Sets the specified value to thetransform
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
-
VkDisplaySurfaceCreateInfoKHR
public VkDisplaySurfaceCreateInfoKHR(java.nio.ByteBuffer container)
Creates aVkDisplaySurfaceCreateInfoKHR
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)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
displayMode
public long displayMode()
Returns the value of thedisplayMode
field.
-
planeIndex
public int planeIndex()
Returns the value of theplaneIndex
field.
-
planeStackIndex
public int planeStackIndex()
Returns the value of theplaneStackIndex
field.
-
transform
public int transform()
Returns the value of thetransform
field.
-
globalAlpha
public float globalAlpha()
Returns the value of theglobalAlpha
field.
-
alphaMode
public int alphaMode()
Returns the value of thealphaMode
field.
-
imageExtent
public VkExtent2D imageExtent()
Returns aVkExtent2D
view of theimageExtent
field.
-
sType
public VkDisplaySurfaceCreateInfoKHR sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkDisplaySurfaceCreateInfoKHR pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkDisplaySurfaceCreateInfoKHR flags(int value)
Sets the specified value to theflags
field.
-
displayMode
public VkDisplaySurfaceCreateInfoKHR displayMode(long value)
Sets the specified value to thedisplayMode
field.
-
planeIndex
public VkDisplaySurfaceCreateInfoKHR planeIndex(int value)
Sets the specified value to theplaneIndex
field.
-
planeStackIndex
public VkDisplaySurfaceCreateInfoKHR planeStackIndex(int value)
Sets the specified value to theplaneStackIndex
field.
-
transform
public VkDisplaySurfaceCreateInfoKHR transform(int value)
Sets the specified value to thetransform
field.
-
globalAlpha
public VkDisplaySurfaceCreateInfoKHR globalAlpha(float value)
Sets the specified value to theglobalAlpha
field.
-
alphaMode
public VkDisplaySurfaceCreateInfoKHR alphaMode(int value)
Sets the specified value to thealphaMode
field.
-
imageExtent
public VkDisplaySurfaceCreateInfoKHR imageExtent(VkExtent2D value)
Copies the specifiedVkExtent2D
to theimageExtent
field.
-
set
public VkDisplaySurfaceCreateInfoKHR set(int sType, long pNext, int flags, long displayMode, int planeIndex, int planeStackIndex, int transform, float globalAlpha, int alphaMode, VkExtent2D imageExtent)
Initializes this struct with the specified values.
-
nset
public VkDisplaySurfaceCreateInfoKHR nset(long struct)
Unsafe version ofset
.
-
set
public VkDisplaySurfaceCreateInfoKHR set(VkDisplaySurfaceCreateInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkDisplaySurfaceCreateInfoKHR malloc()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDisplaySurfaceCreateInfoKHR calloc()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDisplaySurfaceCreateInfoKHR create()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated withBufferUtils
.
-
create
public static VkDisplaySurfaceCreateInfoKHR create(long address)
Returns a newVkDisplaySurfaceCreateInfoKHR
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkDisplaySurfaceCreateInfoKHR.Buffer malloc(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDisplaySurfaceCreateInfoKHR.Buffer calloc(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplaySurfaceCreateInfoKHR.Buffer create(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplaySurfaceCreateInfoKHR.Buffer create(long address, int capacity)
Create aVkDisplaySurfaceCreateInfoKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkDisplaySurfaceCreateInfoKHR mallocStack()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDisplaySurfaceCreateInfoKHR callocStack()
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDisplaySurfaceCreateInfoKHR mallocStack(MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDisplaySurfaceCreateInfoKHR callocStack(MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkDisplaySurfaceCreateInfoKHR.Buffer mallocStack(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDisplaySurfaceCreateInfoKHR.Buffer callocStack(int capacity)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDisplaySurfaceCreateInfoKHR.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkDisplaySurfaceCreateInfoKHR.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkDisplaySurfaceCreateInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-