Package org.lwjgl.util.shaderc
Class ShadercIncludeResult
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
An include result.
Layout
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 classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionShadercIncludeResult
(ByteBuffer container) Creates aShadercIncludeResult
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShadercIncludeResult
calloc()
Returns a newShadercIncludeResult
instance allocated withmemCalloc
.static ShadercIncludeResult.Buffer
calloc
(int capacity) Returns a newShadercIncludeResult.Buffer
instance allocated withmemCalloc
.static ShadercIncludeResult.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newShadercIncludeResult.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ShadercIncludeResult
calloc
(MemoryStack stack) Returns a newShadercIncludeResult
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ShadercIncludeResult
Deprecated.static ShadercIncludeResult.Buffer
callocStack
(int capacity) Deprecated.static ShadercIncludeResult.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static ShadercIncludeResult
callocStack
(MemoryStack stack) Deprecated.content()
the text contents of the source file in the normal case.content
(ByteBuffer value) Sets the address of the specified encoded string to thecontent()
field.long
the text contents of the source file in the normal case.static ShadercIncludeResult
create()
Returns a newShadercIncludeResult
instance allocated withBufferUtils
.static ShadercIncludeResult.Buffer
create
(int capacity) Returns a newShadercIncludeResult.Buffer
instance allocated withBufferUtils
.static ShadercIncludeResult
create
(long address) Returns a newShadercIncludeResult
instance for the specified memory address.static ShadercIncludeResult.Buffer
create
(long address, int capacity) Create aShadercIncludeResult.Buffer
instance at the specified memory.static ShadercIncludeResult
createSafe
(long address) static ShadercIncludeResult.Buffer
createSafe
(long address, int capacity) static ShadercIncludeResult
malloc()
Returns a newShadercIncludeResult
instance allocated withmemAlloc
.static ShadercIncludeResult.Buffer
malloc
(int capacity) Returns a newShadercIncludeResult.Buffer
instance allocated withmemAlloc
.static ShadercIncludeResult.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newShadercIncludeResult.Buffer
instance allocated on the specifiedMemoryStack
.static ShadercIncludeResult
malloc
(MemoryStack stack) Returns a newShadercIncludeResult
instance allocated on the specifiedMemoryStack
.static ShadercIncludeResult
Deprecated.static ShadercIncludeResult.Buffer
mallocStack
(int capacity) Deprecated.static ShadercIncludeResult.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static ShadercIncludeResult
mallocStack
(MemoryStack stack) Deprecated.static ByteBuffer
ncontent
(long struct) Unsafe version ofcontent()
.static void
ncontent
(long struct, ByteBuffer value) Unsafe version ofcontent
.static long
ncontent_length
(long struct) Unsafe version ofcontent_length()
.static void
ncontent_length
(long struct, long value) Sets the specified value to thecontent_length
field of the specifiedstruct
.static String
ncontentString
(long struct) Unsafe version ofcontentString()
.static ByteBuffer
nsource_name
(long struct) Unsafe version ofsource_name()
.static void
nsource_name
(long struct, ByteBuffer value) Unsafe version ofsource_name
.static long
nsource_name_length
(long struct) Unsafe version ofsource_name_length()
.static void
nsource_name_length
(long struct, long value) Sets the specified value to thesource_name_length
field of the specifiedstruct
.static String
nsource_nameString
(long struct) Unsafe version ofsource_nameString()
.static long
nuser_data
(long struct) Unsafe version ofuser_data()
.static void
nuser_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.int
sizeof()
Returnssizeof(struct)
.the name of the source file.source_name
(ByteBuffer value) Sets the address of the specified encoded string to thesource_name()
field.long
the name of the source file.long
user data to be passed along with this requestuser_data
(long value) Sets the specified value to theuser_data()
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aShadercIncludeResult
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<ShadercIncludeResult>
-
source_name
the name of the source file.The name should be fully resolved in the sense that it should be a unique name in the context of the includer. For example, if the includer maps source names to files in a filesystem, then this name should be the absolute path of the file. For a failed inclusion, this string is empty.
-
source_nameString
the name of the source file.The name should be fully resolved in the sense that it should be a unique name in the context of the includer. For example, if the includer maps source names to files in a filesystem, then this name should be the absolute path of the file. For a failed inclusion, this string is empty.
-
source_name_length
public long source_name_length()- Returns:
- the value of the
source_name_length
field.
-
content
the text contents of the source file in the normal case. For a failed inclusion, this contains the error message. -
contentString
the text contents of the source file in the normal case. For a failed inclusion, this contains the error message. -
content_length
public long content_length()- Returns:
- the value of the
content_length
field.
-
user_data
public long user_data()user data to be passed along with this request -
source_name
Sets the address of the specified encoded string to thesource_name()
field. -
content
Sets the address of the specified encoded string to thecontent()
field. -
user_data
Sets the specified value to theuser_data()
field. -
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 newShadercIncludeResult
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newShadercIncludeResult
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newShadercIncludeResult
instance allocated withBufferUtils
. -
create
Returns a newShadercIncludeResult
instance for the specified memory address. -
createSafe
-
malloc
Returns a newShadercIncludeResult.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newShadercIncludeResult.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newShadercIncludeResult.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aShadercIncludeResult.Buffer
instance 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 newShadercIncludeResult
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newShadercIncludeResult
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newShadercIncludeResult.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newShadercIncludeResult.Buffer
instance allocated on the specifiedMemoryStack
and 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_length
field of the specifiedstruct
. -
ncontent
Unsafe version ofcontent
. -
ncontent_length
public static void ncontent_length(long struct, long value) Sets the specified value to thecontent_length
field 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
-