public class VkImportMemoryWin32HandleInfoKHR
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Importing memory objects from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release ownership using the CloseHandle system call when the handle is no longer needed.
Applications can import the same underlying memory into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct VkDeviceMemory object.
handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatProperties or VkExternalBufferProperties.handle was exported, or the memory named by name must have been created on the same underlying physical device as device.handleType is not 0, it must be defined as an NT handle or a global share handle.handleType is not EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, or EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, name must be NULL.handleType is not 0 and handle is NULL, name must name a valid memory resource of the type specified by handleType.handleType is not 0 and name is NULL, handle must be a valid handle of the type specified by handleType.handle is not NULL, name must be NULL.handle is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility.name is not NULL, it must obey any requirements listed for handleType in external memory handle types compatibility.sType must be STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHRhandleType is not 0, handleType must be a valid VkExternalMemoryHandleTypeFlagBits valuesType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.handleType – specifies the type of handle or name.handle – the external handle to import, or NULL.name – a null-terminated UTF-16 string naming the underlying memory resource to import, or NULL.
struct VkImportMemoryWin32HandleInfoKHR {
VkStructureType sType;
void const * pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkImportMemoryWin32HandleInfoKHR.Buffer
An array of
VkImportMemoryWin32HandleInfoKHR structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
HANDLE
The struct member offsets.
|
static int |
HANDLETYPE
The struct member offsets.
|
static int |
NAME
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkImportMemoryWin32HandleInfoKHR(java.nio.ByteBuffer container)
Creates a
VkImportMemoryWin32HandleInfoKHR instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkImportMemoryWin32HandleInfoKHR |
calloc()
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated with memCalloc. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
calloc(int capacity)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated with memCalloc. |
static VkImportMemoryWin32HandleInfoKHR |
callocStack()
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
callocStack(int capacity)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImportMemoryWin32HandleInfoKHR |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImportMemoryWin32HandleInfoKHR |
create()
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated with BufferUtils. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
create(int capacity)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated with BufferUtils. |
static VkImportMemoryWin32HandleInfoKHR |
create(long address)
Returns a new
VkImportMemoryWin32HandleInfoKHR instance for the specified memory address. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
create(long address,
int capacity)
Create a
VkImportMemoryWin32HandleInfoKHR.Buffer instance at the specified memory. |
static VkImportMemoryWin32HandleInfoKHR |
createSafe(long address)
|
static VkImportMemoryWin32HandleInfoKHR.Buffer |
createSafe(long address,
int capacity)
|
long |
handle()
Returns the value of the
handle field. |
VkImportMemoryWin32HandleInfoKHR |
handle(long value)
Sets the specified value to the
handle field. |
int |
handleType()
Returns the value of the
handleType field. |
VkImportMemoryWin32HandleInfoKHR |
handleType(int value)
Sets the specified value to the
handleType field. |
static VkImportMemoryWin32HandleInfoKHR |
malloc()
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated with memAlloc. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
malloc(int capacity)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated with memAlloc. |
static VkImportMemoryWin32HandleInfoKHR |
mallocStack()
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated on the thread-local MemoryStack. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
mallocStack(int capacity)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the thread-local MemoryStack. |
static VkImportMemoryWin32HandleInfoKHR.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the specified MemoryStack. |
static VkImportMemoryWin32HandleInfoKHR |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryWin32HandleInfoKHR instance allocated on the specified MemoryStack. |
java.nio.ByteBuffer |
name()
Returns a
ByteBuffer view of the null-terminated string pointed to by the name field. |
VkImportMemoryWin32HandleInfoKHR |
name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
name field. |
java.lang.String |
nameString()
Decodes the null-terminated string pointed to by the
name field. |
static long |
nhandle(long struct)
Unsafe version of
handle(). |
static void |
nhandle(long struct,
long value)
Unsafe version of
handle. |
static int |
nhandleType(long struct)
Unsafe version of
handleType(). |
static void |
nhandleType(long struct,
int value)
Unsafe version of
handleType. |
static java.nio.ByteBuffer |
nname(long struct)
Unsafe version of
name(). |
static void |
nname(long struct,
java.nio.ByteBuffer value)
Unsafe version of
name. |
static java.lang.String |
nnameString(long struct)
Unsafe version of
nameString(). |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
long |
pNext()
Returns the value of the
pNext field. |
VkImportMemoryWin32HandleInfoKHR |
pNext(long value)
Sets the specified value to the
pNext field. |
VkImportMemoryWin32HandleInfoKHR |
set(int sType,
long pNext,
int handleType,
long handle,
java.nio.ByteBuffer name)
Initializes this struct with the specified values.
|
VkImportMemoryWin32HandleInfoKHR |
set(VkImportMemoryWin32HandleInfoKHR src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkImportMemoryWin32HandleInfoKHR |
sType(int value)
Sets the specified value to the
sType field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int HANDLETYPE
public static final int HANDLE
public static final int NAME
public VkImportMemoryWin32HandleInfoKHR(java.nio.ByteBuffer container)
VkImportMemoryWin32HandleInfoKHR instance at the current position of the specified 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 int sizeof()
sizeof in class org.lwjgl.system.Structpublic int sType()
sType field.public long pNext()
pNext field.public int handleType()
handleType field.public long handle()
handle field.public java.nio.ByteBuffer name()
ByteBuffer view of the null-terminated string pointed to by the name field.public java.lang.String nameString()
name field.public VkImportMemoryWin32HandleInfoKHR sType(int value)
sType field.public VkImportMemoryWin32HandleInfoKHR pNext(long value)
pNext field.public VkImportMemoryWin32HandleInfoKHR handleType(int value)
handleType field.public VkImportMemoryWin32HandleInfoKHR handle(long value)
handle field.public VkImportMemoryWin32HandleInfoKHR name(java.nio.ByteBuffer value)
name field.public VkImportMemoryWin32HandleInfoKHR set(int sType, long pNext, int handleType, long handle, java.nio.ByteBuffer name)
public VkImportMemoryWin32HandleInfoKHR set(VkImportMemoryWin32HandleInfoKHR src)
src - the source structpublic static VkImportMemoryWin32HandleInfoKHR malloc()
VkImportMemoryWin32HandleInfoKHR instance allocated with memAlloc. The instance must be explicitly freed.public static VkImportMemoryWin32HandleInfoKHR calloc()
VkImportMemoryWin32HandleInfoKHR instance allocated with memCalloc. The instance must be explicitly freed.public static VkImportMemoryWin32HandleInfoKHR create()
VkImportMemoryWin32HandleInfoKHR instance allocated with BufferUtils.public static VkImportMemoryWin32HandleInfoKHR create(long address)
VkImportMemoryWin32HandleInfoKHR instance for the specified memory address.@Nullable public static VkImportMemoryWin32HandleInfoKHR createSafe(long address)
public static VkImportMemoryWin32HandleInfoKHR.Buffer malloc(int capacity)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImportMemoryWin32HandleInfoKHR.Buffer calloc(int capacity)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImportMemoryWin32HandleInfoKHR.Buffer create(int capacity)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkImportMemoryWin32HandleInfoKHR.Buffer create(long address, int capacity)
VkImportMemoryWin32HandleInfoKHR.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkImportMemoryWin32HandleInfoKHR.Buffer createSafe(long address, int capacity)
public static VkImportMemoryWin32HandleInfoKHR mallocStack()
VkImportMemoryWin32HandleInfoKHR instance allocated on the thread-local MemoryStack.public static VkImportMemoryWin32HandleInfoKHR callocStack()
VkImportMemoryWin32HandleInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkImportMemoryWin32HandleInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
VkImportMemoryWin32HandleInfoKHR instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkImportMemoryWin32HandleInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
VkImportMemoryWin32HandleInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkImportMemoryWin32HandleInfoKHR.Buffer mallocStack(int capacity)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkImportMemoryWin32HandleInfoKHR.Buffer callocStack(int capacity)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkImportMemoryWin32HandleInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkImportMemoryWin32HandleInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImportMemoryWin32HandleInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nhandleType(long struct)
handleType().public static long nhandle(long struct)
handle().public static java.nio.ByteBuffer nname(long struct)
name().public static java.lang.String nnameString(long struct)
nameString().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nhandleType(long struct,
int value)
handleType.public static void nhandle(long struct,
long value)
handle.public static void nname(long struct,
java.nio.ByteBuffer value)
name.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.