Package org.lwjgl.util.shaderc
Class ShadercIncludeResult
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct shaderc_include_result {
char const * source_name;
size_t source_name_length;
char const * content;
size_t content_length;
void * user_data;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionShadercIncludeResult(ByteBuffer container) Creates aShadercIncludeResultinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShadercIncludeResultcalloc()Returns a newShadercIncludeResultinstance allocated withmemCalloc.static ShadercIncludeResult.Buffercalloc(int capacity) Returns a newShadercIncludeResult.Bufferinstance allocated withmemCalloc.static ShadercIncludeResult.Buffercalloc(int capacity, MemoryStack stack) Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ShadercIncludeResultcalloc(MemoryStack stack) Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ShadercIncludeResultDeprecated.static ShadercIncludeResult.BuffercallocStack(int capacity) Deprecated.static ShadercIncludeResult.BuffercallocStack(int capacity, MemoryStack stack) Deprecated.static ShadercIncludeResultcallocStack(MemoryStack stack) Deprecated.content()content(ByteBuffer value) Sets the address of the specified encoded string to thecontentfield.longstatic ShadercIncludeResultcreate()Returns a newShadercIncludeResultinstance allocated withBufferUtils.static ShadercIncludeResult.Buffercreate(int capacity) Returns a newShadercIncludeResult.Bufferinstance allocated withBufferUtils.static ShadercIncludeResultcreate(long address) Returns a newShadercIncludeResultinstance for the specified memory address.static ShadercIncludeResult.Buffercreate(long address, int capacity) Create aShadercIncludeResult.Bufferinstance at the specified memory.static @Nullable ShadercIncludeResultcreateSafe(long address) static @Nullable ShadercIncludeResult.BuffercreateSafe(long address, int capacity) static ShadercIncludeResultmalloc()Returns a newShadercIncludeResultinstance allocated withmemAlloc.static ShadercIncludeResult.Buffermalloc(int capacity) Returns a newShadercIncludeResult.Bufferinstance allocated withmemAlloc.static ShadercIncludeResult.Buffermalloc(int capacity, MemoryStack stack) Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStack.static ShadercIncludeResultmalloc(MemoryStack stack) Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStack.static ShadercIncludeResultDeprecated.static ShadercIncludeResult.BuffermallocStack(int capacity) Deprecated.static ShadercIncludeResult.BuffermallocStack(int capacity, MemoryStack stack) Deprecated.static ShadercIncludeResultmallocStack(MemoryStack stack) Deprecated.static ByteBufferncontent(long struct) Unsafe version ofcontent().static voidncontent(long struct, ByteBuffer value) Unsafe version ofcontent.static longncontent_length(long struct) Unsafe version ofcontent_length().static voidncontent_length(long struct, long value) Sets the specified value to thecontent_lengthfield of the specifiedstruct.static StringncontentString(long struct) Unsafe version ofcontentString().static ByteBuffernsource_name(long struct) Unsafe version ofsource_name().static voidnsource_name(long struct, ByteBuffer value) Unsafe version ofsource_name.static longnsource_name_length(long struct) Unsafe version ofsource_name_length().static voidnsource_name_length(long struct, long value) Sets the specified value to thesource_name_lengthfield of the specifiedstruct.static Stringnsource_nameString(long struct) Unsafe version ofsource_nameString().static longnuser_data(long struct) Unsafe version ofuser_data().static voidnuser_data(long struct, long value) Unsafe version ofuser_data.set(ByteBuffer source_name, ByteBuffer content, long user_data) Initializes this struct with the specified values.set(ShadercIncludeResult src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).source_name(ByteBuffer value) Sets the address of the specified encoded string to thesource_namefield.longlonguser_data(long value) Sets the specified value to theuser_datafield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SOURCE_NAME
public static final int SOURCE_NAMEThe struct member offsets. -
SOURCE_NAME_LENGTH
public static final int SOURCE_NAME_LENGTHThe struct member offsets. -
CONTENT
public static final int CONTENTThe struct member offsets. -
CONTENT_LENGTH
public static final int CONTENT_LENGTHThe struct member offsets. -
USER_DATA
public static final int USER_DATAThe struct member offsets.
-
-
Constructor Details
-
ShadercIncludeResult
Creates aShadercIncludeResultinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<ShadercIncludeResult>
-
source_name
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thesource_namefield.
-
source_nameString
- Returns:
- the null-terminated string pointed to by the
source_namefield.
-
source_name_length
public long source_name_length()- Returns:
- the value of the
source_name_lengthfield.
-
content
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thecontentfield.
-
contentString
- Returns:
- the null-terminated string pointed to by the
contentfield.
-
content_length
public long content_length()- Returns:
- the value of the
content_lengthfield.
-
user_data
public long user_data()- Returns:
- the value of the
user_datafield.
-
source_name
Sets the address of the specified encoded string to thesource_namefield. -
content
Sets the address of the specified encoded string to thecontentfield. -
user_data
Sets the specified value to theuser_datafield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newShadercIncludeResultinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newShadercIncludeResultinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newShadercIncludeResultinstance allocated withBufferUtils. -
create
Returns a newShadercIncludeResultinstance for the specified memory address. -
createSafe
-
malloc
Returns a newShadercIncludeResult.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newShadercIncludeResult.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newShadercIncludeResult.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aShadercIncludeResult.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsource_name
Unsafe version ofsource_name(). -
nsource_nameString
Unsafe version ofsource_nameString(). -
nsource_name_length
public static long nsource_name_length(long struct) Unsafe version ofsource_name_length(). -
ncontent
Unsafe version ofcontent(). -
ncontentString
Unsafe version ofcontentString(). -
ncontent_length
public static long ncontent_length(long struct) Unsafe version ofcontent_length(). -
nuser_data
public static long nuser_data(long struct) Unsafe version ofuser_data(). -
nsource_name
Unsafe version ofsource_name. -
nsource_name_length
public static void nsource_name_length(long struct, long value) Sets the specified value to thesource_name_lengthfield of the specifiedstruct. -
ncontent
Unsafe version ofcontent. -
ncontent_length
public static void ncontent_length(long struct, long value) Sets the specified value to thecontent_lengthfield of the specifiedstruct. -
nuser_data
public static void nuser_data(long struct, long value) Unsafe version ofuser_data. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-