Class SpvcReflectedResource
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.spvc.SpvcReflectedResource
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class SpvcReflectedResource extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct spvc_reflected_resource { spvc_variable_idid(); spvc_type_idbase_type_id(); spvc_type_idtype_id(); char const *name(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpvcReflectedResource.BufferAn array ofSpvcReflectedResourcestructs.
-
Constructor Summary
Constructors Constructor Description SpvcReflectedResource(java.nio.ByteBuffer container)Creates aSpvcReflectedResourceinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intbase_type_id()The base type of the declared resource.SpvcReflectedResourcebase_type_id(int value)Sets the specified value to thebase_type_id()field.static SpvcReflectedResourcecalloc()Returns a newSpvcReflectedResourceinstance allocated withmemCalloc.static SpvcReflectedResource.Buffercalloc(int capacity)Returns a newSpvcReflectedResource.Bufferinstance allocated withmemCalloc.static SpvcReflectedResource.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcReflectedResourcecalloc(org.lwjgl.system.MemoryStack stack)Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcReflectedResourcecreate()Returns a newSpvcReflectedResourceinstance allocated withBufferUtils.static SpvcReflectedResource.Buffercreate(int capacity)Returns a newSpvcReflectedResource.Bufferinstance allocated withBufferUtils.static SpvcReflectedResourcecreate(long address)Returns a newSpvcReflectedResourceinstance for the specified memory address.static SpvcReflectedResource.Buffercreate(long address, int capacity)Create aSpvcReflectedResource.Bufferinstance at the specified memory.static SpvcReflectedResourcecreateSafe(long address)static SpvcReflectedResource.BuffercreateSafe(long address, int capacity)intid()Resources are identified with their SPIR-V ID.SpvcReflectedResourceid(int value)Sets the specified value to theid()field.static SpvcReflectedResourcemalloc()Returns a newSpvcReflectedResourceinstance allocated withmemAlloc.static SpvcReflectedResource.Buffermalloc(int capacity)Returns a newSpvcReflectedResource.Bufferinstance allocated withmemAlloc.static SpvcReflectedResource.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStack.static SpvcReflectedResourcemalloc(org.lwjgl.system.MemoryStack stack)Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStack.java.nio.ByteBuffername()The declared name (OpName) of the resource.SpvcReflectedResourcename(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thename()field.java.lang.StringnameString()The declared name (OpName) of the resource.static intnbase_type_id(long struct)Unsafe version ofbase_type_id().static voidnbase_type_id(long struct, int value)Unsafe version ofbase_type_id.static intnid(long struct)Unsafe version ofid().static voidnid(long struct, int value)Unsafe version ofid.static java.nio.ByteBuffernname(long struct)Unsafe version ofname().static voidnname(long struct, java.nio.ByteBuffer value)Unsafe version ofname.static java.lang.StringnnameString(long struct)Unsafe version ofnameString().static intntype_id(long struct)Unsafe version oftype_id().static voidntype_id(long struct, int value)Unsafe version oftype_id.SpvcReflectedResourceset(int id, int base_type_id, int type_id, java.nio.ByteBuffer name)Initializes this struct with the specified values.SpvcReflectedResourceset(SpvcReflectedResource src)Copies the specified struct data to this struct.intsizeof()inttype_id()The type ID of the variable which includes arrays and all type modifications.SpvcReflectedResourcetype_id(int value)Sets the specified value to thetype_id()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
SpvcReflectedResource
public SpvcReflectedResource(java.nio.ByteBuffer container)
Creates aSpvcReflectedResourceinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
id
public int id()
Resources are identified with their SPIR-V ID. This is the ID of the OpVariable.
-
base_type_id
public int base_type_id()
The base type of the declared resource.This type is the base type which ignores pointers and arrays of the
type_id. This is mostly useful to parse decorations of the underlying type.base_type_idcan also be obtained withget_type(get_type(type_id).self).
-
type_id
public int type_id()
The type ID of the variable which includes arrays and all type modifications.This type ID is not suitable for parsing
OpMemberDecorationof a struct and other decorations in general since these modifications typically happen on thebase_type_id.
-
name, nameString
public java.nio.ByteBuffer name() public java.lang.String nameString()
The declared name (OpName) of the resource.For Buffer blocks, the name actually reflects the externally visible
Blockname. This name can be retrieved again by using eitherget_name(id)orget_name(base_type_id)depending if it's a buffer block or not. This name can be an empty string in which caseget_fallback_name(id)can be used which obtains a suitable fallback identifier for an ID.
-
id
public SpvcReflectedResource id(int value)
Sets the specified value to theid()field.
-
base_type_id
public SpvcReflectedResource base_type_id(int value)
Sets the specified value to thebase_type_id()field.
-
type_id
public SpvcReflectedResource type_id(int value)
Sets the specified value to thetype_id()field.
-
name
public SpvcReflectedResource name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thename()field.
-
set
public SpvcReflectedResource set(int id, int base_type_id, int type_id, java.nio.ByteBuffer name)
Initializes this struct with the specified values.
-
set
public SpvcReflectedResource set(SpvcReflectedResource src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static SpvcReflectedResource malloc()
Returns a newSpvcReflectedResourceinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static SpvcReflectedResource calloc()
Returns a newSpvcReflectedResourceinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static SpvcReflectedResource create()
Returns a newSpvcReflectedResourceinstance allocated withBufferUtils.
-
create
public static SpvcReflectedResource create(long address)
Returns a newSpvcReflectedResourceinstance for the specified memory address.
-
createSafe
@Nullable public static SpvcReflectedResource createSafe(long address)
-
malloc
public static SpvcReflectedResource.Buffer malloc(int capacity)
Returns a newSpvcReflectedResource.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static SpvcReflectedResource.Buffer calloc(int capacity)
Returns a newSpvcReflectedResource.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static SpvcReflectedResource.Buffer create(int capacity)
Returns a newSpvcReflectedResource.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static SpvcReflectedResource.Buffer create(long address, int capacity)
Create aSpvcReflectedResource.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static SpvcReflectedResource.Buffer createSafe(long address, int capacity)
-
malloc
public static SpvcReflectedResource malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static SpvcReflectedResource calloc(org.lwjgl.system.MemoryStack stack)
Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static SpvcReflectedResource.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static SpvcReflectedResource.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nid
public static int nid(long struct)
Unsafe version ofid().
-
nbase_type_id
public static int nbase_type_id(long struct)
Unsafe version ofbase_type_id().
-
ntype_id
public static int ntype_id(long struct)
Unsafe version oftype_id().
-
nname
public static java.nio.ByteBuffer nname(long struct)
Unsafe version ofname().
-
nnameString
public static java.lang.String nnameString(long struct)
Unsafe version ofnameString().
-
nid
public static void nid(long struct, int value)Unsafe version ofid.
-
nbase_type_id
public static void nbase_type_id(long struct, int value)Unsafe version ofbase_type_id.
-
ntype_id
public static void ntype_id(long struct, int value)Unsafe version oftype_id.
-
nname
public static void nname(long struct, java.nio.ByteBuffer value)Unsafe version ofname.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-