All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.VkBufferCreateInfo Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 * Structure specifying the parameters of a newly created buffer object.
 * 
 * 
Description
* *

Bits which can be set in {@code usage} are:

* *
typedef enum VkBufferUsageFlagBits {
    VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
    VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
    VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
    VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
    VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010,
    VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020,
    VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
    VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
    VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100,
} VkBufferUsageFlagBits;
* *
    *
  • {@link VK10#VK_BUFFER_USAGE_TRANSFER_SRC_BIT BUFFER_USAGE_TRANSFER_SRC_BIT} indicates that the buffer can be used as the source of a transfer command (see the definition of {@link VK10#VK_PIPELINE_STAGE_TRANSFER_BIT PIPELINE_STAGE_TRANSFER_BIT}).
  • *
  • {@link VK10#VK_BUFFER_USAGE_TRANSFER_DST_BIT BUFFER_USAGE_TRANSFER_DST_BIT} indicates that the buffer can be used as the destination of a transfer command.
  • *
  • {@link VK10#VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT} indicates that the buffer can be used to create a {@code VkBufferView} suitable for occupying a {@code VkDescriptorSet} slot of type {@link VK10#VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER}.
  • *
  • {@link VK10#VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT} indicates that the buffer can be used to create a {@code VkBufferView} suitable for occupying a {@code VkDescriptorSet} slot of type {@link VK10#VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER}.
  • *
  • {@link VK10#VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT BUFFER_USAGE_UNIFORM_BUFFER_BIT} indicates that the buffer can be used in a {@link VkDescriptorBufferInfo} suitable for occupying a {@code VkDescriptorSet} slot either of type {@link VK10#VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER DESCRIPTOR_TYPE_UNIFORM_BUFFER} or {@link VK10#VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC}.
  • *
  • {@link VK10#VK_BUFFER_USAGE_STORAGE_BUFFER_BIT BUFFER_USAGE_STORAGE_BUFFER_BIT} indicates that the buffer can be used in a {@link VkDescriptorBufferInfo} suitable for occupying a {@code VkDescriptorSet} slot either of type {@link VK10#VK_DESCRIPTOR_TYPE_STORAGE_BUFFER DESCRIPTOR_TYPE_STORAGE_BUFFER} or {@link VK10#VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC}.
  • *
  • {@link VK10#VK_BUFFER_USAGE_INDEX_BUFFER_BIT BUFFER_USAGE_INDEX_BUFFER_BIT} indicates that the buffer is suitable for passing as the {@code buffer} parameter to {@link VK10#vkCmdBindIndexBuffer CmdBindIndexBuffer}.
  • *
  • {@link VK10#VK_BUFFER_USAGE_VERTEX_BUFFER_BIT BUFFER_USAGE_VERTEX_BUFFER_BIT} indicates that the buffer is suitable for passing as an element of the {@code pBuffers} array to {@link VK10#vkCmdBindVertexBuffers CmdBindVertexBuffers}.
  • *
  • {@link VK10#VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT BUFFER_USAGE_INDIRECT_BUFFER_BIT} indicates that the buffer is suitable for passing as the {@code buffer} parameter to {@link VK10#vkCmdDrawIndirect CmdDrawIndirect}, {@link VK10#vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect}, or {@link VK10#vkCmdDispatchIndirect CmdDispatchIndirect}. It is also suitable for passing as the {@code buffer} member of {@link VkIndirectCommandsTokenNVX}, or {@code sequencesCountBuffer} or {@code sequencesIndexBuffer} member of {@link VkCmdProcessCommandsInfoNVX}
  • *
* *

Any combination of bits can be specified for {@code usage}, but at least one of the bits must be set in order to create a valid buffer.

* *

Bits which can be set in {@code flags} are:

* *
typedef enum VkBufferCreateFlagBits {
    VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
    VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
    VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
} VkBufferCreateFlagBits;
* *

These bits have the following meanings:

* *
    *
  • {@link VK10#VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT} indicates that the buffer will be backed using sparse memory binding.
  • *
  • {@link VK10#VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} indicates that the buffer can be partially backed using sparse memory binding. Buffers created with this flag must also be created with the {@link VK10#VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT} flag.
  • *
  • {@link VK10#VK_BUFFER_CREATE_SPARSE_ALIASED_BIT BUFFER_CREATE_SPARSE_ALIASED_BIT} indicates that the buffer will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another buffer (or another portion of the same buffer). Buffers created with this flag must also be created with the {@link VK10#VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT} flag.
  • *
* *

See Sparse Resource Features and Physical Device Features for details of the sparse memory features supported on a device.

* *
Valid Usage
* *
    *
  • {@code size} must be greater than 0
  • *
  • If {@code sharingMode} is {@link VK10#VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT}, {@code pQueueFamilyIndices} must be a pointer to an array of {@code queueFamilyIndexCount} {@code uint32_t} values
  • *
  • If {@code sharingMode} is {@link VK10#VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT}, {@code queueFamilyIndexCount} must be greater than 1
  • *
  • If the sparse bindings feature is not enabled, {@code flags} must not contain {@link VK10#VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT}
  • *
  • If the sparse buffer residency feature is not enabled, {@code flags} must not contain {@link VK10#VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT}
  • *
  • If the sparse aliased residency feature is not enabled, {@code flags} must not contain {@link VK10#VK_BUFFER_CREATE_SPARSE_ALIASED_BIT BUFFER_CREATE_SPARSE_ALIASED_BIT}
  • *
  • If {@code flags} contains {@link VK10#VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT BUFFER_CREATE_SPARSE_RESIDENCY_BIT} or {@link VK10#VK_BUFFER_CREATE_SPARSE_ALIASED_BIT BUFFER_CREATE_SPARSE_ALIASED_BIT}, it must also contain {@link VK10#VK_BUFFER_CREATE_SPARSE_BINDING_BIT BUFFER_CREATE_SPARSE_BINDING_BIT}
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code sType} must be {@link VK10#VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO STRUCTURE_TYPE_BUFFER_CREATE_INFO}
  • *
  • {@code pNext} must be {@code NULL}, or a pointer to a valid instance of {@link VkDedicatedAllocationBufferCreateInfoNV}
  • *
  • {@code flags} must be a valid combination of {@code VkBufferCreateFlagBits} values
  • *
  • {@code usage} must be a valid combination of {@code VkBufferUsageFlagBits} values
  • *
  • {@code usage} must not be 0
  • *
  • {@code sharingMode} must be a valid {@code VkSharingMode} value
  • *
* *
See Also
* *

{@link VK10#vkCreateBuffer CreateBuffer}

* *

Member documentation

* *
    *
  • {@code sType} – the type of this structure.
  • *
  • {@code pNext} – {@code NULL} or a pointer to an extension-specific structure.
  • *
  • {@code flags} – a bitmask describing additional parameters of the buffer. See {@code VkBufferCreateFlagBits} below for a description of the supported bits.
  • *
  • {@code size} – the size in bytes of the buffer to be created.
  • *
  • {@code usage} – a bitmask describing the allowed usages of the buffer. See {@code VkBufferUsageFlagBits} below for a description of the supported bits.
  • *
  • {@code sharingMode} – the sharing mode of the buffer when it will be accessed by multiple queue families, see {@code VkSharingMode} in the Resource Sharing section below for supported values.
  • *
  • {@code queueFamilyIndexCount} – the number of entries in the {@code pQueueFamilyIndices} array.
  • *
  • {@code pQueueFamilyIndices} – a list of queue families that will access this buffer (ignored if {@code sharingMode} is not {@link VK10#VK_SHARING_MODE_CONCURRENT SHARING_MODE_CONCURRENT}).
  • *
* *

Layout

* *
struct VkBufferCreateInfo {
    VkStructureType sType;
    const void * pNext;
    VkBufferCreateFlags flags;
    VkDeviceSize size;
    VkBufferUsageFlags usage;
    VkSharingMode sharingMode;
    uint32_t queueFamilyIndexCount;
    const uint32_t * pQueueFamilyIndices;
}
*/ public class VkBufferCreateInfo extends Struct implements NativeResource { /** The struct size in bytes. */ public static final int SIZEOF; public static final int ALIGNOF; /** The struct member offsets. */ public static final int STYPE, PNEXT, FLAGS, SIZE, USAGE, SHARINGMODE, QUEUEFAMILYINDEXCOUNT, PQUEUEFAMILYINDICES; static { Layout layout = __struct( __member(4), __member(POINTER_SIZE), __member(4), __member(8), __member(4), __member(4), __member(4), __member(POINTER_SIZE) ); SIZEOF = layout.getSize(); ALIGNOF = layout.getAlignment(); STYPE = layout.offsetof(0); PNEXT = layout.offsetof(1); FLAGS = layout.offsetof(2); SIZE = layout.offsetof(3); USAGE = layout.offsetof(4); SHARINGMODE = layout.offsetof(5); QUEUEFAMILYINDEXCOUNT = layout.offsetof(6); PQUEUEFAMILYINDICES = layout.offsetof(7); } VkBufferCreateInfo(long address, ByteBuffer container) { super(address, container); } /** * Creates a {@link VkBufferCreateInfo} instance at the current position of the specified {@link ByteBuffer} 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.

*/ public VkBufferCreateInfo(ByteBuffer container) { this(memAddress(container), checkContainer(container, SIZEOF)); } @Override public int sizeof() { return SIZEOF; } /** Returns the value of the {@code sType} field. */ public int sType() { return nsType(address()); } /** Returns the value of the {@code pNext} field. */ public long pNext() { return npNext(address()); } /** Returns the value of the {@code flags} field. */ public int flags() { return nflags(address()); } /** Returns the value of the {@code size} field. */ public long size() { return nsize(address()); } /** Returns the value of the {@code usage} field. */ public int usage() { return nusage(address()); } /** Returns the value of the {@code sharingMode} field. */ public int sharingMode() { return nsharingMode(address()); } /** Returns the value of the {@code queueFamilyIndexCount} field. */ public int queueFamilyIndexCount() { return nqueueFamilyIndexCount(address()); } /** Returns a {@link IntBuffer} view of the data pointed to by the {@code pQueueFamilyIndices} field. */ public IntBuffer pQueueFamilyIndices() { return npQueueFamilyIndices(address()); } /** Sets the specified value to the {@code sType} field. */ public VkBufferCreateInfo sType(int value) { nsType(address(), value); return this; } /** Sets the specified value to the {@code pNext} field. */ public VkBufferCreateInfo pNext(long value) { npNext(address(), value); return this; } /** Sets the specified value to the {@code flags} field. */ public VkBufferCreateInfo flags(int value) { nflags(address(), value); return this; } /** Sets the specified value to the {@code size} field. */ public VkBufferCreateInfo size(long value) { nsize(address(), value); return this; } /** Sets the specified value to the {@code usage} field. */ public VkBufferCreateInfo usage(int value) { nusage(address(), value); return this; } /** Sets the specified value to the {@code sharingMode} field. */ public VkBufferCreateInfo sharingMode(int value) { nsharingMode(address(), value); return this; } /** Sets the address of the specified {@link IntBuffer} to the {@code pQueueFamilyIndices} field. */ public VkBufferCreateInfo pQueueFamilyIndices(IntBuffer value) { npQueueFamilyIndices(address(), value); return this; } /** Initializes this struct with the specified values. */ public VkBufferCreateInfo set( int sType, long pNext, int flags, long size, int usage, int sharingMode, IntBuffer pQueueFamilyIndices ) { sType(sType); pNext(pNext); flags(flags); size(size); usage(usage); sharingMode(sharingMode); pQueueFamilyIndices(pQueueFamilyIndices); return this; } /** Unsafe version of {@link #set(VkBufferCreateInfo) set}. */ public VkBufferCreateInfo nset(long struct) { memCopy(struct, address(), SIZEOF); return this; } /** * Copies the specified struct data to this struct. * * @param src the source struct * * @return this struct */ public VkBufferCreateInfo set(VkBufferCreateInfo src) { return nset(src.address()); } // ----------------------------------- /** Returns a new {@link VkBufferCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ public static VkBufferCreateInfo malloc() { return create(nmemAlloc(SIZEOF)); } /** Returns a new {@link VkBufferCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ public static VkBufferCreateInfo calloc() { return create(nmemCalloc(1, SIZEOF)); } /** Returns a new {@link VkBufferCreateInfo} instance allocated with {@link BufferUtils}. */ public static VkBufferCreateInfo create() { return new VkBufferCreateInfo(BufferUtils.createByteBuffer(SIZEOF)); } /** Returns a new {@link VkBufferCreateInfo} instance for the specified memory address or {@code null} if the address is {@code NULL}. */ public static VkBufferCreateInfo create(long address) { return address == NULL ? null : new VkBufferCreateInfo(address, null); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. * * @param capacity the buffer capacity */ public static Buffer malloc(int capacity) { return create(nmemAlloc(capacity * SIZEOF), capacity); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. * * @param capacity the buffer capacity */ public static Buffer calloc(int capacity) { return create(nmemCalloc(capacity, SIZEOF), capacity); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated with {@link BufferUtils}. * * @param capacity the buffer capacity */ public static Buffer create(int capacity) { return new Buffer(BufferUtils.createByteBuffer(capacity * SIZEOF)); } /** * Create a {@link VkBufferCreateInfo.Buffer} instance at the specified memory. * * @param address the memory address * @param capacity the buffer capacity */ public static Buffer create(long address, int capacity) { return address == NULL ? null : new Buffer(address, null, -1, 0, capacity, capacity); } // ----------------------------------- /** Returns a new {@link VkBufferCreateInfo} instance allocated on the thread-local {@link MemoryStack}. */ public static VkBufferCreateInfo mallocStack() { return mallocStack(stackGet()); } /** Returns a new {@link VkBufferCreateInfo} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero. */ public static VkBufferCreateInfo callocStack() { return callocStack(stackGet()); } /** * Returns a new {@link VkBufferCreateInfo} instance allocated on the specified {@link MemoryStack}. * * @param stack the stack from which to allocate */ public static VkBufferCreateInfo mallocStack(MemoryStack stack) { return create(stack.nmalloc(ALIGNOF, SIZEOF)); } /** * Returns a new {@link VkBufferCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. * * @param stack the stack from which to allocate */ public static VkBufferCreateInfo callocStack(MemoryStack stack) { return create(stack.ncalloc(ALIGNOF, 1, SIZEOF)); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated on the thread-local {@link MemoryStack}. * * @param capacity the buffer capacity */ public static Buffer mallocStack(int capacity) { return mallocStack(capacity, stackGet()); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero. * * @param capacity the buffer capacity */ public static Buffer callocStack(int capacity) { return callocStack(capacity, stackGet()); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated on the specified {@link MemoryStack}. * * @param stack the stack from which to allocate * @param capacity the buffer capacity */ public static Buffer mallocStack(int capacity, MemoryStack stack) { return create(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); } /** * Returns a new {@link VkBufferCreateInfo.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. * * @param stack the stack from which to allocate * @param capacity the buffer capacity */ public static Buffer callocStack(int capacity, MemoryStack stack) { return create(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); } // ----------------------------------- /** Unsafe version of {@link #sType}. */ public static int nsType(long struct) { return memGetInt(struct + VkBufferCreateInfo.STYPE); } /** Unsafe version of {@link #pNext}. */ public static long npNext(long struct) { return memGetAddress(struct + VkBufferCreateInfo.PNEXT); } /** Unsafe version of {@link #flags}. */ public static int nflags(long struct) { return memGetInt(struct + VkBufferCreateInfo.FLAGS); } /** Unsafe version of {@link #size}. */ public static long nsize(long struct) { return memGetLong(struct + VkBufferCreateInfo.SIZE); } /** Unsafe version of {@link #usage}. */ public static int nusage(long struct) { return memGetInt(struct + VkBufferCreateInfo.USAGE); } /** Unsafe version of {@link #sharingMode}. */ public static int nsharingMode(long struct) { return memGetInt(struct + VkBufferCreateInfo.SHARINGMODE); } /** Unsafe version of {@link #queueFamilyIndexCount}. */ public static int nqueueFamilyIndexCount(long struct) { return memGetInt(struct + VkBufferCreateInfo.QUEUEFAMILYINDEXCOUNT); } /** Unsafe version of {@link #pQueueFamilyIndices() pQueueFamilyIndices}. */ public static IntBuffer npQueueFamilyIndices(long struct) { return memIntBuffer(memGetAddress(struct + VkBufferCreateInfo.PQUEUEFAMILYINDICES), nqueueFamilyIndexCount(struct)); } /** Unsafe version of {@link #sType(int) sType}. */ public static void nsType(long struct, int value) { memPutInt(struct + VkBufferCreateInfo.STYPE, value); } /** Unsafe version of {@link #pNext(long) pNext}. */ public static void npNext(long struct, long value) { memPutAddress(struct + VkBufferCreateInfo.PNEXT, value); } /** Unsafe version of {@link #flags(int) flags}. */ public static void nflags(long struct, int value) { memPutInt(struct + VkBufferCreateInfo.FLAGS, value); } /** Unsafe version of {@link #size(long) size}. */ public static void nsize(long struct, long value) { memPutLong(struct + VkBufferCreateInfo.SIZE, value); } /** Unsafe version of {@link #usage(int) usage}. */ public static void nusage(long struct, int value) { memPutInt(struct + VkBufferCreateInfo.USAGE, value); } /** Unsafe version of {@link #sharingMode(int) sharingMode}. */ public static void nsharingMode(long struct, int value) { memPutInt(struct + VkBufferCreateInfo.SHARINGMODE, value); } /** Sets the specified value to the {@code queueFamilyIndexCount} field of the specified {@code struct}. */ public static void nqueueFamilyIndexCount(long struct, int value) { memPutInt(struct + VkBufferCreateInfo.QUEUEFAMILYINDEXCOUNT, value); } /** Unsafe version of {@link #pQueueFamilyIndices(IntBuffer) pQueueFamilyIndices}. */ public static void npQueueFamilyIndices(long struct, IntBuffer value) { memPutAddress(struct + VkBufferCreateInfo.PQUEUEFAMILYINDICES, memAddressSafe(value)); nqueueFamilyIndexCount(struct, value == null ? 0 : value.remaining()); } /** * Validates pointer members that should not be {@code NULL}. * * @param struct the struct to validate */ public static void validate(long struct) { if ( nqueueFamilyIndexCount(struct) != 0 ) check(memGetAddress(struct + VkBufferCreateInfo.PQUEUEFAMILYINDICES)); } /** * Calls {@link #validate(long)} for each struct contained in the specified struct array. * * @param array the struct array to validate * @param count the number of structs in {@code array} */ public static void validate(long array, int count) { for ( int i = 0; i < count; i++ ) validate(array + i * SIZEOF); } // ----------------------------------- /** An array of {@link VkBufferCreateInfo} structs. */ public static class Buffer extends StructBuffer implements NativeResource { /** * Creates a new {@link VkBufferCreateInfo.Buffer} instance backed by the specified container. * * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided * by {@link VkBufferCreateInfo#SIZEOF}, and its mark will be undefined. * *

The created buffer instance holds a strong reference to the container object.

*/ public Buffer(ByteBuffer container) { super(container, container.remaining() / SIZEOF); } Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) { super(address, container, mark, pos, lim, cap); } @Override protected Buffer self() { return this; } @Override protected Buffer newBufferInstance(long address, ByteBuffer container, int mark, int pos, int lim, int cap) { return new Buffer(address, container, mark, pos, lim, cap); } @Override protected VkBufferCreateInfo newInstance(long address) { return new VkBufferCreateInfo(address, container); } @Override protected int sizeof() { return SIZEOF; } /** Returns the value of the {@code sType} field. */ public int sType() { return VkBufferCreateInfo.nsType(address()); } /** Returns the value of the {@code pNext} field. */ public long pNext() { return VkBufferCreateInfo.npNext(address()); } /** Returns the value of the {@code flags} field. */ public int flags() { return VkBufferCreateInfo.nflags(address()); } /** Returns the value of the {@code size} field. */ public long size() { return VkBufferCreateInfo.nsize(address()); } /** Returns the value of the {@code usage} field. */ public int usage() { return VkBufferCreateInfo.nusage(address()); } /** Returns the value of the {@code sharingMode} field. */ public int sharingMode() { return VkBufferCreateInfo.nsharingMode(address()); } /** Returns the value of the {@code queueFamilyIndexCount} field. */ public int queueFamilyIndexCount() { return VkBufferCreateInfo.nqueueFamilyIndexCount(address()); } /** Returns a {@link IntBuffer} view of the data pointed to by the {@code pQueueFamilyIndices} field. */ public IntBuffer pQueueFamilyIndices() { return VkBufferCreateInfo.npQueueFamilyIndices(address()); } /** Sets the specified value to the {@code sType} field. */ public VkBufferCreateInfo.Buffer sType(int value) { VkBufferCreateInfo.nsType(address(), value); return this; } /** Sets the specified value to the {@code pNext} field. */ public VkBufferCreateInfo.Buffer pNext(long value) { VkBufferCreateInfo.npNext(address(), value); return this; } /** Sets the specified value to the {@code flags} field. */ public VkBufferCreateInfo.Buffer flags(int value) { VkBufferCreateInfo.nflags(address(), value); return this; } /** Sets the specified value to the {@code size} field. */ public VkBufferCreateInfo.Buffer size(long value) { VkBufferCreateInfo.nsize(address(), value); return this; } /** Sets the specified value to the {@code usage} field. */ public VkBufferCreateInfo.Buffer usage(int value) { VkBufferCreateInfo.nusage(address(), value); return this; } /** Sets the specified value to the {@code sharingMode} field. */ public VkBufferCreateInfo.Buffer sharingMode(int value) { VkBufferCreateInfo.nsharingMode(address(), value); return this; } /** Sets the address of the specified {@link IntBuffer} to the {@code pQueueFamilyIndices} field. */ public VkBufferCreateInfo.Buffer pQueueFamilyIndices(IntBuffer value) { VkBufferCreateInfo.npQueueFamilyIndices(address(), value); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy