Package org.lwjgl.util.shaderc
Class ShadercIncludeResult
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.shaderc.ShadercIncludeResult
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ShadercIncludeResult extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceAn 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 Modifier and Type Class Description static classShadercIncludeResult.BufferAn array ofShadercIncludeResultstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCONTENT
CONTENT_LENGTHThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSOURCE_NAME
SOURCE_NAME_LENGTH
USER_DATAThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ShadercIncludeResult(java.nio.ByteBuffer container)Creates aShadercIncludeResultinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ShadercIncludeResultcalloc()Returns a newShadercIncludeResultinstance allocated withmemCalloc.static ShadercIncludeResult.Buffercalloc(int capacity)Returns a newShadercIncludeResult.Bufferinstance allocated withmemCalloc.static ShadercIncludeResult.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ShadercIncludeResultcalloc(org.lwjgl.system.MemoryStack stack)Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ShadercIncludeResultcallocStack()Deprecated.static ShadercIncludeResult.BuffercallocStack(int capacity)Deprecated.static ShadercIncludeResult.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static ShadercIncludeResultcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.java.nio.ByteBuffercontent()the text contents of the source file in the normal case.ShadercIncludeResultcontent(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thecontent()field.longcontent_length()java.lang.StringcontentString()the text contents of the source file in the normal case.static 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 ShadercIncludeResultcreateSafe(long address)static 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, org.lwjgl.system.MemoryStack stack)Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStack.static ShadercIncludeResultmalloc(org.lwjgl.system.MemoryStack stack)Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStack.static ShadercIncludeResultmallocStack()Deprecated.static ShadercIncludeResult.BuffermallocStack(int capacity)Deprecated.static ShadercIncludeResult.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static ShadercIncludeResultmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static java.nio.ByteBufferncontent(long struct)Unsafe version ofcontent().static voidncontent(long struct, java.nio.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 java.lang.StringncontentString(long struct)Unsafe version ofcontentString().static java.nio.ByteBuffernsource_name(long struct)Unsafe version ofsource_name().static voidnsource_name(long struct, java.nio.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 java.lang.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.ShadercIncludeResultset(java.nio.ByteBuffer source_name, java.nio.ByteBuffer content, long user_data)Initializes this struct with the specified values.ShadercIncludeResultset(ShadercIncludeResult src)Copies the specified struct data to this struct.intsizeof()java.nio.ByteBuffersource_name()the name of the source file.ShadercIncludeResultsource_name(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thesource_name()field.longsource_name_length()java.lang.Stringsource_nameString()the name of the source file.longuser_data()user data to be passed along with this requestShadercIncludeResultuser_data(long value)Sets the specified value to theuser_data()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
ShadercIncludeResult
public ShadercIncludeResult(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
source_name, source_nameString
public java.nio.ByteBuffer source_name() public java.lang.String 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_lengthfield.
-
content, contentString
public java.nio.ByteBuffer content() public java.lang.String 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_lengthfield.
-
user_data
public long user_data()
user data to be passed along with this request
-
source_name
public ShadercIncludeResult source_name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thesource_name()field.
-
content
public ShadercIncludeResult content(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thecontent()field.
-
user_data
public ShadercIncludeResult user_data(long value)
Sets the specified value to theuser_data()field.
-
set
public ShadercIncludeResult set(java.nio.ByteBuffer source_name, java.nio.ByteBuffer content, long user_data)
Initializes this struct with the specified values.
-
set
public ShadercIncludeResult set(ShadercIncludeResult src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static ShadercIncludeResult malloc()
Returns a newShadercIncludeResultinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ShadercIncludeResult calloc()
Returns a newShadercIncludeResultinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ShadercIncludeResult create()
Returns a newShadercIncludeResultinstance allocated withBufferUtils.
-
create
public static ShadercIncludeResult create(long address)
Returns a newShadercIncludeResultinstance for the specified memory address.
-
createSafe
@Nullable public static ShadercIncludeResult createSafe(long address)
-
malloc
public static ShadercIncludeResult.Buffer malloc(int capacity)
Returns a newShadercIncludeResult.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ShadercIncludeResult.Buffer calloc(int capacity)
Returns a newShadercIncludeResult.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ShadercIncludeResult.Buffer create(int capacity)
Returns a newShadercIncludeResult.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ShadercIncludeResult.Buffer create(long address, int capacity)
Create aShadercIncludeResult.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ShadercIncludeResult.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static ShadercIncludeResult mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static ShadercIncludeResult callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static ShadercIncludeResult mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static ShadercIncludeResult callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static ShadercIncludeResult.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static ShadercIncludeResult.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static ShadercIncludeResult.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static ShadercIncludeResult.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static ShadercIncludeResult malloc(org.lwjgl.system.MemoryStack stack)
Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static ShadercIncludeResult calloc(org.lwjgl.system.MemoryStack stack)
Returns a newShadercIncludeResultinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static ShadercIncludeResult.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static ShadercIncludeResult.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newShadercIncludeResult.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsource_name
public static java.nio.ByteBuffer nsource_name(long struct)
Unsafe version ofsource_name().
-
nsource_nameString
public static java.lang.String nsource_nameString(long struct)
Unsafe version ofsource_nameString().
-
nsource_name_length
public static long nsource_name_length(long struct)
Unsafe version ofsource_name_length().
-
ncontent
public static java.nio.ByteBuffer ncontent(long struct)
Unsafe version ofcontent().
-
ncontentString
public static java.lang.String ncontentString(long struct)
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
public static void nsource_name(long struct, java.nio.ByteBuffer value)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
public static void ncontent(long struct, java.nio.ByteBuffer value)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
-
-