Package org.lwjgl.vulkan
Class VkBufferViewCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBufferViewCreateInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkBufferViewCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a buffer view should be created.
Valid Usage
sTypemust beSTRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFOpNextmust beNULLflagsmust be 0buffermust be a validVkBufferhandleformatmust be a validVkFormatvalueoffsetmust be less than the size ofbufferoffsetmust be a multiple ofVkPhysicalDeviceLimits::minTexelBufferOffsetAlignment- If
rangeis not equal toWHOLE_SIZE: buffermust have been created with ausagevalue containing at least one ofBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITorBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT- If
bufferwas created withusagecontainingBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT,formatmust be supported for uniform texel buffers, as specified by theFORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BITflag inVkFormatProperties::bufferFeaturesreturned byGetPhysicalDeviceFormatProperties - If
bufferwas created withusagecontainingBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT,formatmust be supported for storage texel buffers, as specified by theFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BITflag inVkFormatProperties::bufferFeaturesreturned byGetPhysicalDeviceFormatProperties
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFOpNext– reserved for use by extensionsflags– reserved for future usebuffer– aVkBufferon which the view will be createdformat– aVkFormatdescribing the format of the data elements in the bufferoffset– an offset in bytes from the base address of the bufferrange– a size in bytes of the buffer view
Layout
struct VkBufferViewCreateInfo { VkStructureType sType; const void * pNext; VkBufferViewCreateFlags flags; VkBuffer buffer; VkFormat format; VkDeviceSize offset; VkDeviceSize range; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkBufferViewCreateInfo.BufferAn array ofVkBufferViewCreateInfostructs.-
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 VkBufferViewCreateInfo(java.nio.ByteBuffer container)Creates aVkBufferViewCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description longbuffer()Returns the value of thebufferfield.VkBufferViewCreateInfobuffer(long value)Sets the specified value to thebufferfield.static VkBufferViewCreateInfocalloc()Returns a newVkBufferViewCreateInfoinstance allocated withmemCalloc.static VkBufferViewCreateInfo.Buffercalloc(int capacity)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated withmemCalloc.static VkBufferViewCreateInfocallocStack()Returns a newVkBufferViewCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkBufferViewCreateInfo.BuffercallocStack(int capacity)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkBufferViewCreateInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferViewCreateInfocallocStack(MemoryStack stack)Returns a newVkBufferViewCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferViewCreateInfocreate()Returns a newVkBufferViewCreateInfoinstance allocated withBufferUtils.static VkBufferViewCreateInfo.Buffercreate(int capacity)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated withBufferUtils.static VkBufferViewCreateInfocreate(long address)Returns a newVkBufferViewCreateInfoinstance for the specified memory address ornullif the address isNULL.static VkBufferViewCreateInfo.Buffercreate(long address, int capacity)Create aVkBufferViewCreateInfo.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.VkBufferViewCreateInfoflags(int value)Sets the specified value to theflagsfield.intformat()Returns the value of theformatfield.VkBufferViewCreateInfoformat(int value)Sets the specified value to theformatfield.static VkBufferViewCreateInfomalloc()Returns a newVkBufferViewCreateInfoinstance allocated withmemAlloc.static VkBufferViewCreateInfo.Buffermalloc(int capacity)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated withmemAlloc.static VkBufferViewCreateInfomallocStack()Returns a newVkBufferViewCreateInfoinstance allocated on the thread-localMemoryStack.static VkBufferViewCreateInfo.BuffermallocStack(int capacity)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkBufferViewCreateInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkBufferViewCreateInfomallocStack(MemoryStack stack)Returns a newVkBufferViewCreateInfoinstance allocated on the specifiedMemoryStack.VkBufferViewCreateInfonset(long struct)Unsafe version ofset.longoffset()Returns the value of theoffsetfield.VkBufferViewCreateInfooffset(long value)Sets the specified value to theoffsetfield.longpNext()Returns the value of thepNextfield.VkBufferViewCreateInfopNext(long value)Sets the specified value to thepNextfield.longrange()Returns the value of therangefield.VkBufferViewCreateInforange(long value)Sets the specified value to therangefield.VkBufferViewCreateInfoset(int sType, long pNext, int flags, long buffer, int format, long offset, long range)Initializes this struct with the specified values.VkBufferViewCreateInfoset(VkBufferViewCreateInfo src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkBufferViewCreateInfosType(int value)Sets the specified value to thesTypefield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkBufferViewCreateInfo
public VkBufferViewCreateInfo(java.nio.ByteBuffer container)
Creates aVkBufferViewCreateInfoinstance 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.
-
buffer
public long buffer()
Returns the value of thebufferfield.
-
format
public int format()
Returns the value of theformatfield.
-
offset
public long offset()
Returns the value of theoffsetfield.
-
range
public long range()
Returns the value of therangefield.
-
sType
public VkBufferViewCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkBufferViewCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkBufferViewCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
buffer
public VkBufferViewCreateInfo buffer(long value)
Sets the specified value to thebufferfield.
-
format
public VkBufferViewCreateInfo format(int value)
Sets the specified value to theformatfield.
-
offset
public VkBufferViewCreateInfo offset(long value)
Sets the specified value to theoffsetfield.
-
range
public VkBufferViewCreateInfo range(long value)
Sets the specified value to therangefield.
-
set
public VkBufferViewCreateInfo set(int sType, long pNext, int flags, long buffer, int format, long offset, long range)
Initializes this struct with the specified values.
-
nset
public VkBufferViewCreateInfo nset(long struct)
Unsafe version ofset.
-
set
public VkBufferViewCreateInfo set(VkBufferViewCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkBufferViewCreateInfo malloc()
Returns a newVkBufferViewCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkBufferViewCreateInfo calloc()
Returns a newVkBufferViewCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkBufferViewCreateInfo create()
Returns a newVkBufferViewCreateInfoinstance allocated withBufferUtils.
-
create
public static VkBufferViewCreateInfo create(long address)
Returns a newVkBufferViewCreateInfoinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkBufferViewCreateInfo.Buffer malloc(int capacity)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkBufferViewCreateInfo.Buffer calloc(int capacity)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkBufferViewCreateInfo.Buffer create(int capacity)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkBufferViewCreateInfo.Buffer create(long address, int capacity)
Create aVkBufferViewCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkBufferViewCreateInfo mallocStack()
Returns a newVkBufferViewCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkBufferViewCreateInfo callocStack()
Returns a newVkBufferViewCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkBufferViewCreateInfo mallocStack(MemoryStack stack)
Returns a newVkBufferViewCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkBufferViewCreateInfo callocStack(MemoryStack stack)
Returns a newVkBufferViewCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkBufferViewCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkBufferViewCreateInfo.Buffer callocStack(int capacity)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkBufferViewCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkBufferViewCreateInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkBufferViewCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-