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
sType
must beSTRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
pNext
must beNULL
flags
must be 0buffer
must be a validVkBuffer
handleformat
must be a validVkFormat
valueoffset
must be less than the size ofbuffer
offset
must be a multiple ofVkPhysicalDeviceLimits
::minTexelBufferOffsetAlignment
- If
range
is not equal toWHOLE_SIZE
: buffer
must have been created with ausage
value containing at least one ofBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
orBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
- If
buffer
was created withusage
containingBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
,format
must be supported for uniform texel buffers, as specified by theFORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
flag inVkFormatProperties
::bufferFeatures
returned byGetPhysicalDeviceFormatProperties
- If
buffer
was created withusage
containingBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
,format
must be supported for storage texel buffers, as specified by theFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
flag inVkFormatProperties
::bufferFeatures
returned byGetPhysicalDeviceFormatProperties
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
pNext
– reserved for use by extensionsflags
– reserved for future usebuffer
– aVkBuffer
on which the view will be createdformat
– aVkFormat
describing 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 class
VkBufferViewCreateInfo.Buffer
An array ofVkBufferViewCreateInfo
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 VkBufferViewCreateInfo(java.nio.ByteBuffer container)
Creates aVkBufferViewCreateInfo
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 long
buffer()
Returns the value of thebuffer
field.VkBufferViewCreateInfo
buffer(long value)
Sets the specified value to thebuffer
field.static VkBufferViewCreateInfo
calloc()
Returns a newVkBufferViewCreateInfo
instance allocated withmemCalloc
.static VkBufferViewCreateInfo.Buffer
calloc(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated withmemCalloc
.static VkBufferViewCreateInfo
callocStack()
Returns a newVkBufferViewCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferViewCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferViewCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferViewCreateInfo
callocStack(MemoryStack stack)
Returns a newVkBufferViewCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferViewCreateInfo
create()
Returns a newVkBufferViewCreateInfo
instance allocated withBufferUtils
.static VkBufferViewCreateInfo.Buffer
create(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated withBufferUtils
.static VkBufferViewCreateInfo
create(long address)
Returns a newVkBufferViewCreateInfo
instance for the specified memory address ornull
if the address isNULL
.static VkBufferViewCreateInfo.Buffer
create(long address, int capacity)
Create aVkBufferViewCreateInfo.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkBufferViewCreateInfo
flags(int value)
Sets the specified value to theflags
field.int
format()
Returns the value of theformat
field.VkBufferViewCreateInfo
format(int value)
Sets the specified value to theformat
field.static VkBufferViewCreateInfo
malloc()
Returns a newVkBufferViewCreateInfo
instance allocated withmemAlloc
.static VkBufferViewCreateInfo.Buffer
malloc(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated withmemAlloc
.static VkBufferViewCreateInfo
mallocStack()
Returns a newVkBufferViewCreateInfo
instance allocated on the thread-localMemoryStack
.static VkBufferViewCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkBufferViewCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkBufferViewCreateInfo
mallocStack(MemoryStack stack)
Returns a newVkBufferViewCreateInfo
instance allocated on the specifiedMemoryStack
.VkBufferViewCreateInfo
nset(long struct)
Unsafe version ofset
.long
offset()
Returns the value of theoffset
field.VkBufferViewCreateInfo
offset(long value)
Sets the specified value to theoffset
field.long
pNext()
Returns the value of thepNext
field.VkBufferViewCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.long
range()
Returns the value of therange
field.VkBufferViewCreateInfo
range(long value)
Sets the specified value to therange
field.VkBufferViewCreateInfo
set(int sType, long pNext, int flags, long buffer, int format, long offset, long range)
Initializes this struct with the specified values.VkBufferViewCreateInfo
set(VkBufferViewCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkBufferViewCreateInfo
sType(int value)
Sets the specified value to thesType
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
-
VkBufferViewCreateInfo
public VkBufferViewCreateInfo(java.nio.ByteBuffer container)
Creates aVkBufferViewCreateInfo
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.
-
buffer
public long buffer()
Returns the value of thebuffer
field.
-
format
public int format()
Returns the value of theformat
field.
-
offset
public long offset()
Returns the value of theoffset
field.
-
range
public long range()
Returns the value of therange
field.
-
sType
public VkBufferViewCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkBufferViewCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkBufferViewCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
buffer
public VkBufferViewCreateInfo buffer(long value)
Sets the specified value to thebuffer
field.
-
format
public VkBufferViewCreateInfo format(int value)
Sets the specified value to theformat
field.
-
offset
public VkBufferViewCreateInfo offset(long value)
Sets the specified value to theoffset
field.
-
range
public VkBufferViewCreateInfo range(long value)
Sets the specified value to therange
field.
-
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 newVkBufferViewCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkBufferViewCreateInfo calloc()
Returns a newVkBufferViewCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkBufferViewCreateInfo create()
Returns a newVkBufferViewCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkBufferViewCreateInfo create(long address)
Returns a newVkBufferViewCreateInfo
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkBufferViewCreateInfo.Buffer malloc(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkBufferViewCreateInfo.Buffer calloc(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferViewCreateInfo.Buffer create(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferViewCreateInfo.Buffer create(long address, int capacity)
Create aVkBufferViewCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkBufferViewCreateInfo mallocStack()
Returns a newVkBufferViewCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkBufferViewCreateInfo callocStack()
Returns a newVkBufferViewCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkBufferViewCreateInfo mallocStack(MemoryStack stack)
Returns a newVkBufferViewCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkBufferViewCreateInfo callocStack(MemoryStack stack)
Returns a newVkBufferViewCreateInfo
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkBufferViewCreateInfo.Buffer callocStack(int capacity)
Returns a newVkBufferViewCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkBufferViewCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferViewCreateInfo.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-