public class ShadercIncludeResult
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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.
content – the text contents of the source file in the normal case. For a failed inclusion, this contains the error message.user_data – user data to be passed along with this request
struct shaderc_include_result {
char const * source_name;
size_t source_name_length;
char const * content;
size_t content_length;
void * user_data;
}| Modifier and Type | Class and Description |
|---|---|
static class |
ShadercIncludeResult.Buffer
An array of
ShadercIncludeResult structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
CONTENT
The struct member offsets.
|
static int |
CONTENT_LENGTH
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SOURCE_NAME
The struct member offsets.
|
static int |
SOURCE_NAME_LENGTH
The struct member offsets.
|
static int |
USER_DATA
The struct member offsets.
|
| Constructor and Description |
|---|
ShadercIncludeResult(java.nio.ByteBuffer container)
Creates a
ShadercIncludeResult instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static ShadercIncludeResult |
calloc()
Returns a new
ShadercIncludeResult instance allocated with memCalloc. |
static ShadercIncludeResult.Buffer |
calloc(int capacity)
Returns a new
ShadercIncludeResult.Buffer instance allocated with memCalloc. |
static ShadercIncludeResult |
callocStack()
Returns a new
ShadercIncludeResult instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static ShadercIncludeResult.Buffer |
callocStack(int capacity)
Returns a new
ShadercIncludeResult.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static ShadercIncludeResult.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
ShadercIncludeResult.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static ShadercIncludeResult |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
ShadercIncludeResult instance allocated on the specified MemoryStack and initializes all its bits to zero. |
long |
content_length()
Returns the value of the
content_length field. |
java.nio.ByteBuffer |
content()
Returns a
ByteBuffer view of the null-terminated string pointed to by the content field. |
ShadercIncludeResult |
content(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
content field. |
java.lang.String |
contentString()
Decodes the null-terminated string pointed to by the
content field. |
static ShadercIncludeResult |
create()
Returns a new
ShadercIncludeResult instance allocated with BufferUtils. |
static ShadercIncludeResult.Buffer |
create(int capacity)
Returns a new
ShadercIncludeResult.Buffer instance allocated with BufferUtils. |
static ShadercIncludeResult |
create(long address)
Returns a new
ShadercIncludeResult instance for the specified memory address. |
static ShadercIncludeResult.Buffer |
create(long address,
int capacity)
Create a
ShadercIncludeResult.Buffer instance at the specified memory. |
static ShadercIncludeResult |
createSafe(long address)
|
static ShadercIncludeResult.Buffer |
createSafe(long address,
int capacity)
|
static ShadercIncludeResult |
malloc()
Returns a new
ShadercIncludeResult instance allocated with memAlloc. |
static ShadercIncludeResult.Buffer |
malloc(int capacity)
Returns a new
ShadercIncludeResult.Buffer instance allocated with memAlloc. |
static ShadercIncludeResult |
mallocStack()
Returns a new
ShadercIncludeResult instance allocated on the thread-local MemoryStack. |
static ShadercIncludeResult.Buffer |
mallocStack(int capacity)
Returns a new
ShadercIncludeResult.Buffer instance allocated on the thread-local MemoryStack. |
static ShadercIncludeResult.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
ShadercIncludeResult.Buffer instance allocated on the specified MemoryStack. |
static ShadercIncludeResult |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
ShadercIncludeResult instance allocated on the specified MemoryStack. |
static long |
ncontent_length(long struct)
Unsafe version of
content_length(). |
static void |
ncontent_length(long struct,
long value)
Sets the specified value to the
content_length field of the specified struct. |
static java.nio.ByteBuffer |
ncontent(long struct)
Unsafe version of
content(). |
static void |
ncontent(long struct,
java.nio.ByteBuffer value)
Unsafe version of
content. |
static java.lang.String |
ncontentString(long struct)
Unsafe version of
contentString(). |
static long |
nsource_name_length(long struct)
Unsafe version of
source_name_length(). |
static void |
nsource_name_length(long struct,
long value)
Sets the specified value to the
source_name_length field of the specified struct. |
static java.nio.ByteBuffer |
nsource_name(long struct)
Unsafe version of
source_name(). |
static void |
nsource_name(long struct,
java.nio.ByteBuffer value)
Unsafe version of
source_name. |
static java.lang.String |
nsource_nameString(long struct)
Unsafe version of
source_nameString(). |
static long |
nuser_data(long struct)
Unsafe version of
user_data(). |
static void |
nuser_data(long struct,
long value)
Unsafe version of
user_data. |
ShadercIncludeResult |
set(java.nio.ByteBuffer source_name,
java.nio.ByteBuffer content,
long user_data)
Initializes this struct with the specified values.
|
ShadercIncludeResult |
set(ShadercIncludeResult src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
long |
source_name_length()
Returns the value of the
source_name_length field. |
java.nio.ByteBuffer |
source_name()
Returns a
ByteBuffer view of the null-terminated string pointed to by the source_name field. |
ShadercIncludeResult |
source_name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
source_name field. |
java.lang.String |
source_nameString()
Decodes the null-terminated string pointed to by the
source_name field. |
long |
user_data()
Returns the value of the
user_data field. |
ShadercIncludeResult |
user_data(long value)
Sets the specified value to the
user_data 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 SOURCE_NAME
public static final int SOURCE_NAME_LENGTH
public static final int CONTENT
public static final int CONTENT_LENGTH
public static final int USER_DATA
public ShadercIncludeResult(java.nio.ByteBuffer container)
ShadercIncludeResult 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 java.nio.ByteBuffer source_name()
ByteBuffer view of the null-terminated string pointed to by the source_name field.public java.lang.String source_nameString()
source_name field.public long source_name_length()
source_name_length field.public java.nio.ByteBuffer content()
ByteBuffer view of the null-terminated string pointed to by the content field.public java.lang.String contentString()
content field.public long content_length()
content_length field.public long user_data()
user_data field.public ShadercIncludeResult source_name(java.nio.ByteBuffer value)
source_name field.public ShadercIncludeResult content(java.nio.ByteBuffer value)
content field.public ShadercIncludeResult user_data(long value)
user_data field.public ShadercIncludeResult set(java.nio.ByteBuffer source_name, java.nio.ByteBuffer content, long user_data)
public ShadercIncludeResult set(ShadercIncludeResult src)
src - the source structpublic static ShadercIncludeResult malloc()
ShadercIncludeResult instance allocated with memAlloc. The instance must be explicitly freed.public static ShadercIncludeResult calloc()
ShadercIncludeResult instance allocated with memCalloc. The instance must be explicitly freed.public static ShadercIncludeResult create()
ShadercIncludeResult instance allocated with BufferUtils.public static ShadercIncludeResult create(long address)
ShadercIncludeResult instance for the specified memory address.@Nullable public static ShadercIncludeResult createSafe(long address)
public static ShadercIncludeResult.Buffer malloc(int capacity)
ShadercIncludeResult.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static ShadercIncludeResult.Buffer calloc(int capacity)
ShadercIncludeResult.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static ShadercIncludeResult.Buffer create(int capacity)
ShadercIncludeResult.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static ShadercIncludeResult.Buffer create(long address, int capacity)
ShadercIncludeResult.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static ShadercIncludeResult.Buffer createSafe(long address, int capacity)
public static ShadercIncludeResult mallocStack()
ShadercIncludeResult instance allocated on the thread-local MemoryStack.public static ShadercIncludeResult callocStack()
ShadercIncludeResult instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static ShadercIncludeResult mallocStack(org.lwjgl.system.MemoryStack stack)
ShadercIncludeResult instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static ShadercIncludeResult callocStack(org.lwjgl.system.MemoryStack stack)
ShadercIncludeResult instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static ShadercIncludeResult.Buffer mallocStack(int capacity)
ShadercIncludeResult.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static ShadercIncludeResult.Buffer callocStack(int capacity)
ShadercIncludeResult.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static ShadercIncludeResult.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
ShadercIncludeResult.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static ShadercIncludeResult.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
ShadercIncludeResult.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 java.nio.ByteBuffer nsource_name(long struct)
source_name().public static java.lang.String nsource_nameString(long struct)
source_nameString().public static long nsource_name_length(long struct)
source_name_length().public static java.nio.ByteBuffer ncontent(long struct)
content().public static java.lang.String ncontentString(long struct)
contentString().public static long ncontent_length(long struct)
content_length().public static long nuser_data(long struct)
user_data().public static void nsource_name(long struct,
java.nio.ByteBuffer value)
source_name.public static void nsource_name_length(long struct,
long value)
source_name_length field of the specified struct.public static void ncontent(long struct,
java.nio.ByteBuffer value)
content.public static void ncontent_length(long struct,
long value)
content_length field of the specified struct.public static void nuser_data(long struct,
long value)
user_data.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.