Package org.lwjgl.vulkan
Class VkSamplerCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSamplerCreateInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkSamplerCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a sampler object should be created.
Valid Usage
sTypemust beSTRUCTURE_TYPE_SAMPLER_CREATE_INFOpNextmust beNULLflagsmust be 0magFiltermust be a validVkFiltervalueminFiltermust be a validVkFiltervaluemipmapModemust be a validVkSamplerMipmapModevalueaddressModeUmust be a validVkSamplerAddressModevalueaddressModeVmust be a validVkSamplerAddressModevalueaddressModeWmust be a validVkSamplerAddressModevalue- The absolute value of
mipLodBiasmust be less than or equal toVkPhysicalDeviceLimits::maxSamplerLodBias - If the anisotropic sampling feature is not enabled,
anisotropyEnablemust beFALSE - If
anisotropyEnableisTRUE,maxAnisotropymust be between1.0andVkPhysicalDeviceLimits::maxSamplerAnisotropy, inclusive - If
unnormalizedCoordinatesisTRUE,minFilterandmagFiltermust be equal - If
unnormalizedCoordinatesisTRUE,mipmapModemust beSAMPLER_MIPMAP_MODE_NEAREST - If
unnormalizedCoordinatesisTRUE,minLodandmaxLodmust be zero - If
unnormalizedCoordinatesisTRUE,addressModeUandaddressModeVmust each be eitherSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGEorSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - If
unnormalizedCoordinatesisTRUE,anisotropyEnablemust beFALSE - If
unnormalizedCoordinatesisTRUE,compareEnablemust beFALSE - If any of
addressModeU,addressModeVoraddressModeWareSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,borderColormust be a validVkBorderColorvalue - If the VK_KHR_mirror_clamp_to_edge extension is not enabled,
addressModeU,addressModeVandaddressModeWmust not beSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE - If
compareEnableisTRUE,compareOpmust be a validVkCompareOpvalue
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_SAMPLER_CREATE_INFOpNext– reserved for use by extensionsflags– reserved for future usemagFilter– the magnification filter to apply to lookupsminFilter– the minification filter to apply to lookupsmipmapMode– the mipmap filter to apply to lookups. One of:SAMPLER_MIPMAP_MODE_LINEARSAMPLER_MIPMAP_MODE_NEARESTaddressModeU– the addressing mode for outside [0..1] range for U coordinate. One of:SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDERSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGESAMPLER_ADDRESS_MODE_MIRRORED_REPEATSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGESAMPLER_ADDRESS_MODE_REPEATaddressModeV– the addressing mode for outside [0..1] range for V coordinateaddressModeW– the addressing mode for outside [0..1] range for W coordinatemipLodBias– the bias to be added to mipmap LOD calculation and bias provided by image sampling functions in SPIR-VanisotropyEnable– isTRUEto enable anisotropic filtering, orFALSEotherwisemaxAnisotropy– the anisotropy value clampcompareEnable– isTRUEto enable comparison against a reference value during lookups, orFALSEotherwisecompareOp– the comparison function to apply to fetched data before filtering. One of:COMPARE_OP_ALWAYSCOMPARE_OP_EQUALCOMPARE_OP_GREATERCOMPARE_OP_GREATER_OR_EQUALCOMPARE_OP_LESSCOMPARE_OP_LESS_OR_EQUALCOMPARE_OP_NEVERCOMPARE_OP_NOT_EQUALminLod– the minimum value to which the computed level-of-detail value will be clampedmaxLod– the maximum value to which the computed level-of-detail value will be clampedborderColor– the predefined border color to use. One of:BORDER_COLOR_FLOAT_OPAQUE_BLACKBORDER_COLOR_FLOAT_OPAQUE_WHITEBORDER_COLOR_FLOAT_TRANSPARENT_BLACKBORDER_COLOR_INT_OPAQUE_BLACKBORDER_COLOR_INT_OPAQUE_WHITEBORDER_COLOR_INT_TRANSPARENT_BLACKunnormalizedCoordinates– controls whether to use unnormalized or normalized texel coordinates to address texels of the image
Layout
struct VkSamplerCreateInfo { VkStructureType sType; const void * pNext; VkSamplerCreateFlags flags; VkFilter magFilter; VkFilter minFilter; VkSamplerMipmapMode mipmapMode; VkSamplerAddressMode addressModeU; VkSamplerAddressMode addressModeV; VkSamplerAddressMode addressModeW; float mipLodBias; VkBool32 anisotropyEnable; float maxAnisotropy; VkBool32 compareEnable; VkCompareOp compareOp; float minLod; float maxLod; VkBorderColor borderColor; VkBool32 unnormalizedCoordinates; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkSamplerCreateInfo.BufferAn array ofVkSamplerCreateInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkSamplerCreateInfo(java.nio.ByteBuffer container)Creates aVkSamplerCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intaddressModeU()Returns the value of theaddressModeUfield.VkSamplerCreateInfoaddressModeU(int value)Sets the specified value to theaddressModeUfield.intaddressModeV()Returns the value of theaddressModeVfield.VkSamplerCreateInfoaddressModeV(int value)Sets the specified value to theaddressModeVfield.intaddressModeW()Returns the value of theaddressModeWfield.VkSamplerCreateInfoaddressModeW(int value)Sets the specified value to theaddressModeWfield.intanisotropyEnable()Returns the value of theanisotropyEnablefield.VkSamplerCreateInfoanisotropyEnable(int value)Sets the specified value to theanisotropyEnablefield.intborderColor()Returns the value of theborderColorfield.VkSamplerCreateInfoborderColor(int value)Sets the specified value to theborderColorfield.static VkSamplerCreateInfocalloc()Returns a newVkSamplerCreateInfoinstance allocated withmemCalloc.static VkSamplerCreateInfo.Buffercalloc(int capacity)Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemCalloc.static VkSamplerCreateInfocallocStack()Returns a newVkSamplerCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSamplerCreateInfo.BuffercallocStack(int capacity)Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSamplerCreateInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSamplerCreateInfocallocStack(MemoryStack stack)Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcompareEnable()Returns the value of thecompareEnablefield.VkSamplerCreateInfocompareEnable(int value)Sets the specified value to thecompareEnablefield.intcompareOp()Returns the value of thecompareOpfield.VkSamplerCreateInfocompareOp(int value)Sets the specified value to thecompareOpfield.static VkSamplerCreateInfocreate()Returns a newVkSamplerCreateInfoinstance allocated withBufferUtils.static VkSamplerCreateInfo.Buffercreate(int capacity)Returns a newVkSamplerCreateInfo.Bufferinstance allocated withBufferUtils.static VkSamplerCreateInfocreate(long address)Returns a newVkSamplerCreateInfoinstance for the specified memory address ornullif the address isNULL.static VkSamplerCreateInfo.Buffercreate(long address, int capacity)Create aVkSamplerCreateInfo.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.VkSamplerCreateInfoflags(int value)Sets the specified value to theflagsfield.intmagFilter()Returns the value of themagFilterfield.VkSamplerCreateInfomagFilter(int value)Sets the specified value to themagFilterfield.static VkSamplerCreateInfomalloc()Returns a newVkSamplerCreateInfoinstance allocated withmemAlloc.static VkSamplerCreateInfo.Buffermalloc(int capacity)Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemAlloc.static VkSamplerCreateInfomallocStack()Returns a newVkSamplerCreateInfoinstance allocated on the thread-localMemoryStack.static VkSamplerCreateInfo.BuffermallocStack(int capacity)Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkSamplerCreateInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkSamplerCreateInfomallocStack(MemoryStack stack)Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStack.floatmaxAnisotropy()Returns the value of themaxAnisotropyfield.VkSamplerCreateInfomaxAnisotropy(float value)Sets the specified value to themaxAnisotropyfield.floatmaxLod()Returns the value of themaxLodfield.VkSamplerCreateInfomaxLod(float value)Sets the specified value to themaxLodfield.intminFilter()Returns the value of theminFilterfield.VkSamplerCreateInfominFilter(int value)Sets the specified value to theminFilterfield.floatminLod()Returns the value of theminLodfield.VkSamplerCreateInfominLod(float value)Sets the specified value to theminLodfield.floatmipLodBias()Returns the value of themipLodBiasfield.VkSamplerCreateInfomipLodBias(float value)Sets the specified value to themipLodBiasfield.intmipmapMode()Returns the value of themipmapModefield.VkSamplerCreateInfomipmapMode(int value)Sets the specified value to themipmapModefield.VkSamplerCreateInfonset(long struct)Unsafe version ofset.longpNext()Returns the value of thepNextfield.VkSamplerCreateInfopNext(long value)Sets the specified value to thepNextfield.VkSamplerCreateInfoset(int sType, long pNext, int flags, int magFilter, int minFilter, int mipmapMode, int addressModeU, int addressModeV, int addressModeW, float mipLodBias, int anisotropyEnable, float maxAnisotropy, int compareEnable, int compareOp, float minLod, float maxLod, int borderColor, int unnormalizedCoordinates)Initializes this struct with the specified values.VkSamplerCreateInfoset(VkSamplerCreateInfo src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkSamplerCreateInfosType(int value)Sets the specified value to thesTypefield.intunnormalizedCoordinates()Returns the value of theunnormalizedCoordinatesfield.VkSamplerCreateInfounnormalizedCoordinates(int value)Sets the specified value to theunnormalizedCoordinatesfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkSamplerCreateInfo
public VkSamplerCreateInfo(java.nio.ByteBuffer container)
Creates aVkSamplerCreateInfoinstance 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()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
magFilter
public int magFilter()
Returns the value of themagFilterfield.
-
minFilter
public int minFilter()
Returns the value of theminFilterfield.
-
mipmapMode
public int mipmapMode()
Returns the value of themipmapModefield.
-
addressModeU
public int addressModeU()
Returns the value of theaddressModeUfield.
-
addressModeV
public int addressModeV()
Returns the value of theaddressModeVfield.
-
addressModeW
public int addressModeW()
Returns the value of theaddressModeWfield.
-
mipLodBias
public float mipLodBias()
Returns the value of themipLodBiasfield.
-
anisotropyEnable
public int anisotropyEnable()
Returns the value of theanisotropyEnablefield.
-
maxAnisotropy
public float maxAnisotropy()
Returns the value of themaxAnisotropyfield.
-
compareEnable
public int compareEnable()
Returns the value of thecompareEnablefield.
-
compareOp
public int compareOp()
Returns the value of thecompareOpfield.
-
minLod
public float minLod()
Returns the value of theminLodfield.
-
maxLod
public float maxLod()
Returns the value of themaxLodfield.
-
borderColor
public int borderColor()
Returns the value of theborderColorfield.
-
unnormalizedCoordinates
public int unnormalizedCoordinates()
Returns the value of theunnormalizedCoordinatesfield.
-
sType
public VkSamplerCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkSamplerCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkSamplerCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
magFilter
public VkSamplerCreateInfo magFilter(int value)
Sets the specified value to themagFilterfield.
-
minFilter
public VkSamplerCreateInfo minFilter(int value)
Sets the specified value to theminFilterfield.
-
mipmapMode
public VkSamplerCreateInfo mipmapMode(int value)
Sets the specified value to themipmapModefield.
-
addressModeU
public VkSamplerCreateInfo addressModeU(int value)
Sets the specified value to theaddressModeUfield.
-
addressModeV
public VkSamplerCreateInfo addressModeV(int value)
Sets the specified value to theaddressModeVfield.
-
addressModeW
public VkSamplerCreateInfo addressModeW(int value)
Sets the specified value to theaddressModeWfield.
-
mipLodBias
public VkSamplerCreateInfo mipLodBias(float value)
Sets the specified value to themipLodBiasfield.
-
anisotropyEnable
public VkSamplerCreateInfo anisotropyEnable(int value)
Sets the specified value to theanisotropyEnablefield.
-
maxAnisotropy
public VkSamplerCreateInfo maxAnisotropy(float value)
Sets the specified value to themaxAnisotropyfield.
-
compareEnable
public VkSamplerCreateInfo compareEnable(int value)
Sets the specified value to thecompareEnablefield.
-
compareOp
public VkSamplerCreateInfo compareOp(int value)
Sets the specified value to thecompareOpfield.
-
minLod
public VkSamplerCreateInfo minLod(float value)
Sets the specified value to theminLodfield.
-
maxLod
public VkSamplerCreateInfo maxLod(float value)
Sets the specified value to themaxLodfield.
-
borderColor
public VkSamplerCreateInfo borderColor(int value)
Sets the specified value to theborderColorfield.
-
unnormalizedCoordinates
public VkSamplerCreateInfo unnormalizedCoordinates(int value)
Sets the specified value to theunnormalizedCoordinatesfield.
-
set
public VkSamplerCreateInfo set(int sType, long pNext, int flags, int magFilter, int minFilter, int mipmapMode, int addressModeU, int addressModeV, int addressModeW, float mipLodBias, int anisotropyEnable, float maxAnisotropy, int compareEnable, int compareOp, float minLod, float maxLod, int borderColor, int unnormalizedCoordinates)
Initializes this struct with the specified values.
-
nset
public VkSamplerCreateInfo nset(long struct)
Unsafe version ofset.
-
set
public VkSamplerCreateInfo set(VkSamplerCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkSamplerCreateInfo malloc()
Returns a newVkSamplerCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSamplerCreateInfo calloc()
Returns a newVkSamplerCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSamplerCreateInfo create()
Returns a newVkSamplerCreateInfoinstance allocated withBufferUtils.
-
create
public static VkSamplerCreateInfo create(long address)
Returns a newVkSamplerCreateInfoinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkSamplerCreateInfo.Buffer malloc(int capacity)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSamplerCreateInfo.Buffer calloc(int capacity)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSamplerCreateInfo.Buffer create(int capacity)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSamplerCreateInfo.Buffer create(long address, int capacity)
Create aVkSamplerCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkSamplerCreateInfo mallocStack()
Returns a newVkSamplerCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSamplerCreateInfo callocStack()
Returns a newVkSamplerCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSamplerCreateInfo mallocStack(MemoryStack stack)
Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSamplerCreateInfo callocStack(MemoryStack stack)
Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkSamplerCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSamplerCreateInfo.Buffer callocStack(int capacity)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSamplerCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkSamplerCreateInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-