Package org.lwjgl.vulkan
Class VkSwapchainPresentScalingCreateInfoEXT
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkSwapchainPresentScalingCreateInfoEXT>
org.lwjgl.vulkan.VkSwapchainPresentScalingCreateInfoEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkSwapchainPresentScalingCreateInfoEXT
extends org.lwjgl.system.Struct<VkSwapchainPresentScalingCreateInfoEXT>
implements org.lwjgl.system.NativeResource
Scaling behavior when presenting to the surface.
Description
If scalingBehavior is 0, the result of presenting a swapchain image with dimensions that do not match the surface dimensions is implementation and platform-dependent. If presentGravityX or presentGravityY are 0, the presentation gravity must match that defined by the native platform surface on platforms which define surface gravity.
Valid Usage
- If
presentGravityXis 0,presentGravityYmust be 0 - If
presentGravityXis not 0,presentGravityYmust not be 0 scalingBehaviormust not have more than one bit setpresentGravityXmust not have more than one bit setpresentGravityYmust not have more than one bit setscalingBehaviormust be 0 or a valid scaling method for the surface as returned inVkSurfacePresentScalingCapabilitiesEXT::supportedPresentScaling, givenVkSwapchainCreateInfoKHR::presentModeinVkSurfacePresentModeEXT- If the swapchain is created with
VkSwapchainPresentModesCreateInfoEXT,scalingBehaviormust be 0 or a valid scaling method for the surface as returned inVkSurfacePresentScalingCapabilitiesEXT::supportedPresentScaling, given each present mode inVkSwapchainPresentModesCreateInfoEXT::pPresentModesinVkSurfacePresentModeEXT presentGravityXmust be 0 or a valid x-axis present gravity for the surface as returned inVkSurfacePresentScalingCapabilitiesEXT::supportedPresentGravityX, givenVkSwapchainCreateInfoKHR::presentModeinVkSurfacePresentModeEXT- If the swapchain is created with
VkSwapchainPresentModesCreateInfoEXT,presentGravityXmust be 0 or a valid x-axis present gravity for the surface as returned inVkSurfacePresentScalingCapabilitiesEXT::supportedPresentGravityX, given each present mode inVkSwapchainPresentModesCreateInfoEXT::pPresentModesinVkSurfacePresentModeEXT presentGravityYmust be 0 or a valid y-axis present gravity for the surface as returned inVkSurfacePresentScalingCapabilitiesEXT::supportedPresentGravityY, givenVkSwapchainCreateInfoKHR::presentModeinVkSurfacePresentModeEXT- If the swapchain is created with
VkSwapchainPresentModesCreateInfoEXT,presentGravityYmust be 0 or a valid y-axis present gravity for the surface as returned inVkSurfacePresentScalingCapabilitiesEXT::supportedPresentGravityY, given each present mode inVkSwapchainPresentModesCreateInfoEXT::pPresentModesinVkSurfacePresentModeEXT - If the
swapchainMaintenance1feature is not enabled, thenpresentScaling,presentGravityX, andpresentGravityYmust be 0
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXTscalingBehaviormust be a valid combination ofVkPresentScalingFlagBitsEXTvaluespresentGravityXmust be a valid combination ofVkPresentGravityFlagBitsEXTvaluespresentGravityYmust be a valid combination ofVkPresentGravityFlagBitsEXTvalues
Layout
struct VkSwapchainPresentScalingCreateInfoEXT {
VkStructureType sType();
void const * pNext();
VkPresentScalingFlagsEXT scalingBehavior();
VkPresentGravityFlagsEXT presentGravityX();
VkPresentGravityFlagsEXT presentGravityY();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkSwapchainPresentScalingCreateInfoEXTstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkSwapchainPresentScalingCreateInfoEXT(ByteBuffer container) Creates aVkSwapchainPresentScalingCreateInfoEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated withBufferUtils.create(int capacity) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance for the specified memory address.create(long address, int capacity) Create aVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance at the specified memory.static @Nullable VkSwapchainPresentScalingCreateInfoEXTcreateSafe(long address) static @Nullable VkSwapchainPresentScalingCreateInfoEXT.BuffercreateSafe(long address, int capacity) malloc()Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated on the specifiedMemoryStack.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnpresentGravityX(long struct) Unsafe version ofpresentGravityX().static voidnpresentGravityX(long struct, int value) Unsafe version ofpresentGravityX.static intnpresentGravityY(long struct) Unsafe version ofpresentGravityY().static voidnpresentGravityY(long struct, int value) Unsafe version ofpresentGravityY.static intnscalingBehavior(long struct) Unsafe version ofscalingBehavior().static voidnscalingBehavior(long struct, int value) Unsafe version ofscalingBehavior.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.int0 or the x-axis direction in which swapchain image pixels gravitate relative to the surface whenscalingBehaviordoes not result in a one-to-one pixel mapping between the scaled swapchain image and the surface.presentGravityX(int value) Sets the specified value to thepresentGravityX()field.int0 or the y-axis direction in which swapchain image pixels gravitate relative to the surface whenscalingBehaviordoes not result in a one-to-one pixel mapping between the scaled swapchain image and the surface.presentGravityY(int value) Sets the specified value to thepresentGravityY()field.int0 or the scaling method to use when the dimensions of the surface and swapchain images differ.scalingBehavior(int value) Sets the specified value to thescalingBehavior()field.set(int sType, long pNext, int scalingBehavior, int presentGravityX, int presentGravityY) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXTvalue to thesType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
SCALINGBEHAVIOR
public static final int SCALINGBEHAVIORThe struct member offsets. -
PRESENTGRAVITYX
public static final int PRESENTGRAVITYXThe struct member offsets. -
PRESENTGRAVITYY
public static final int PRESENTGRAVITYYThe struct member offsets.
-
-
Constructor Details
-
VkSwapchainPresentScalingCreateInfoEXT
Creates aVkSwapchainPresentScalingCreateInfoEXTinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkSwapchainPresentScalingCreateInfoEXT>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
scalingBehavior
public int scalingBehavior()0 or the scaling method to use when the dimensions of the surface and swapchain images differ. -
presentGravityX
public int presentGravityX()0 or the x-axis direction in which swapchain image pixels gravitate relative to the surface whenscalingBehaviordoes not result in a one-to-one pixel mapping between the scaled swapchain image and the surface. -
presentGravityY
public int presentGravityY()0 or the y-axis direction in which swapchain image pixels gravitate relative to the surface whenscalingBehaviordoes not result in a one-to-one pixel mapping between the scaled swapchain image and the surface. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXTvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
scalingBehavior
Sets the specified value to thescalingBehavior()field. -
presentGravityX
Sets the specified value to thepresentGravityX()field. -
presentGravityY
Sets the specified value to thepresentGravityY()field. -
set
public VkSwapchainPresentScalingCreateInfoEXT set(int sType, long pNext, int scalingBehavior, int presentGravityX, int presentGravityY) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated withBufferUtils. -
create
Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable VkSwapchainPresentScalingCreateInfoEXT.Buffer createSafe(long address, int capacity) -
malloc
Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkSwapchainPresentScalingCreateInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkSwapchainPresentScalingCreateInfoEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkSwapchainPresentScalingCreateInfoEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentScalingCreateInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nscalingBehavior
public static int nscalingBehavior(long struct) Unsafe version ofscalingBehavior(). -
npresentGravityX
public static int npresentGravityX(long struct) Unsafe version ofpresentGravityX(). -
npresentGravityY
public static int npresentGravityY(long struct) Unsafe version ofpresentGravityY(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nscalingBehavior
public static void nscalingBehavior(long struct, int value) Unsafe version ofscalingBehavior. -
npresentGravityX
public static void npresentGravityX(long struct, int value) Unsafe version ofpresentGravityX. -
npresentGravityY
public static void npresentGravityY(long struct, int value) Unsafe version ofpresentGravityY.
-