Top Description Inners Fields Constructors Methods
org.lwjgl.util.spvc

public Class SpvcReflectedBuiltinResource

extends Struct<SpvcReflectedBuiltinResource>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct spvc_reflected_builtin_resource
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Layout


struct spvc_reflected_builtin_resource {
    SpvBuiltIn builtin;
    spvc_type_id value_type_id;
    spvc_reflected_resource resource;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BUILTIN

The struct member offsets.

public static final int
RESOURCE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
VALUE_TYPE_ID

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
SpvcReflectedBuiltinResource(long address, ByteBuffer container)

public
SpvcReflectedBuiltinResource(ByteBuffer container)

Creates a SpvcReflectedBuiltinResource instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public int
builtin()

This is mostly here to support reflection of builtins such as Position/PointSize/CullDistance/ClipDistance.

public SpvcReflectedBuiltinResource
builtin(int value)

Sets the specified value to the builtin field.

public static SpvcReflectedBuiltinResource
calloc()

Returns a new SpvcReflectedBuiltinResource instance allocated with memCalloc.

public static SpvcReflectedBuiltinResource.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated with memCalloc.

public static SpvcReflectedBuiltinResource
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcReflectedBuiltinResource instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static SpvcReflectedBuiltinResource.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected SpvcReflectedBuiltinResource
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static SpvcReflectedBuiltinResource
create()

Returns a new SpvcReflectedBuiltinResource instance allocated with BufferUtils.

public static SpvcReflectedBuiltinResource
create(long address)

Returns a new SpvcReflectedBuiltinResource instance for the specified memory address.

public static SpvcReflectedBuiltinResource.Buffer
create(int
the buffer capacity
capacity
)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated with BufferUtils.

public static SpvcReflectedBuiltinResource.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a SpvcReflectedBuiltinResource.Buffer instance at the specified memory.

public static SpvcReflectedBuiltinResource
createSafe(long address)

Like create, but returns null if address is NULL.

public static SpvcReflectedBuiltinResource.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static SpvcReflectedBuiltinResource
malloc()

Returns a new SpvcReflectedBuiltinResource instance allocated with memAlloc.

public static SpvcReflectedBuiltinResource.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated with memAlloc.

public static SpvcReflectedBuiltinResource
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcReflectedBuiltinResource instance allocated on the specified MemoryStack.

public static SpvcReflectedBuiltinResource.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated on the specified MemoryStack.

public static int
nbuiltin(long struct)

Unsafe version of builtin.

public static void
nbuiltin(long struct, int value)

Unsafe version of builtin.

public static SpvcReflectedResource
nresource(long struct)

Unsafe version of resource.

public static void
nresource(long struct, SpvcReflectedResource value)

Unsafe version of resource.

public static int
nvalue_type_id(long struct)

Unsafe version of value_type_id.

public static void
nvalue_type_id(long struct, int value)

Unsafe version of value_type_id.

public SpvcReflectedResource
resource()

This refers to the base resource which contains the builtin.

public SpvcReflectedBuiltinResource
resource(SpvcReflectedResource value)

Copies the specified SpvcReflectedResource to the resource field.

public SpvcReflectedBuiltinResource
resource(Consumer<SpvcReflectedResource> consumer)

Passes the resource field to the specified Consumer.

public SpvcReflectedBuiltinResource
set(int builtin, int value_type_id, SpvcReflectedResource resource)

Initializes this struct with the specified values.

public SpvcReflectedBuiltinResource

Returns:

this struct
set
(SpvcReflectedBuiltinResource
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

public int
value_type_id()

This is the actual value type of the builtin.

public SpvcReflectedBuiltinResource
value_type_id(int value)

Sets the specified value to the value_type_id field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BUILTINback to summary
public static final int BUILTIN

The struct member offsets.

RESOURCEback to summary
public static final int RESOURCE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

VALUE_TYPE_IDback to summary
public static final int VALUE_TYPE_ID

The struct member offsets.

Constructor Detail

SpvcReflectedBuiltinResourceback to summary
protected SpvcReflectedBuiltinResource(long address, ByteBuffer container)
SpvcReflectedBuiltinResourceback to summary
public SpvcReflectedBuiltinResource(ByteBuffer container)

Creates a SpvcReflectedBuiltinResource 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.

Method Detail

builtinback to summary
public int builtin()

This is mostly here to support reflection of builtins such as Position/PointSize/CullDistance/ClipDistance.

This needs to be different from Resource since we can collect builtins from blocks. A builtin present here does not necessarily mean it's considered an active builtin, since variable ID "activeness" is only tracked on OpVariable level, not Block members. For that, compiler_update_active_builtins -> compiler_has_active_builtin can be used to further refine the reflection.

Annotations
@NativeType:SpvBuiltIn
builtinback to summary
public SpvcReflectedBuiltinResource builtin(int value)

Sets the specified value to the builtin field.

callocback to summary
public static SpvcReflectedBuiltinResource calloc()

Returns a new SpvcReflectedBuiltinResource instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static SpvcReflectedBuiltinResource.Buffer calloc(int capacity)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static SpvcReflectedBuiltinResource calloc(MemoryStack stack)

Returns a new SpvcReflectedBuiltinResource instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static SpvcReflectedBuiltinResource.Buffer calloc(int capacity, MemoryStack stack)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected SpvcReflectedBuiltinResource create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static SpvcReflectedBuiltinResource create()

Returns a new SpvcReflectedBuiltinResource instance allocated with BufferUtils.

createback to summary
public static SpvcReflectedBuiltinResource create(long address)

Returns a new SpvcReflectedBuiltinResource instance for the specified memory address.

createback to summary
public static SpvcReflectedBuiltinResource.Buffer create(int capacity)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static SpvcReflectedBuiltinResource.Buffer create(long address, int capacity)

Create a SpvcReflectedBuiltinResource.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static SpvcReflectedBuiltinResource createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static SpvcReflectedBuiltinResource.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static SpvcReflectedBuiltinResource malloc()

Returns a new SpvcReflectedBuiltinResource instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static SpvcReflectedBuiltinResource.Buffer malloc(int capacity)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static SpvcReflectedBuiltinResource malloc(MemoryStack stack)

Returns a new SpvcReflectedBuiltinResource instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static SpvcReflectedBuiltinResource.Buffer malloc(int capacity, MemoryStack stack)

Returns a new SpvcReflectedBuiltinResource.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nbuiltinback to summary
public static int nbuiltin(long struct)

Unsafe version of builtin.

nbuiltinback to summary
public static void nbuiltin(long struct, int value)

Unsafe version of builtin.

nresourceback to summary
public static SpvcReflectedResource nresource(long struct)

Unsafe version of resource.

nresourceback to summary
public static void nresource(long struct, SpvcReflectedResource value)

Unsafe version of resource.

nvalue_type_idback to summary
public static int nvalue_type_id(long struct)

Unsafe version of value_type_id.

nvalue_type_idback to summary
public static void nvalue_type_id(long struct, int value)

Unsafe version of value_type_id.

resourceback to summary
public SpvcReflectedResource resource()

This refers to the base resource which contains the builtin.

If resource is a Block, it can hold multiple builtins, or it might not be a block. For advanced reflection scenarios, all information in builtin/value_type_id can be deduced, it's just more convenient this way.

Annotations
@NativeType:spvc_reflected_resource
resourceback to summary
public SpvcReflectedBuiltinResource resource(SpvcReflectedResource value)

Copies the specified SpvcReflectedResource to the resource field.

resourceback to summary
public SpvcReflectedBuiltinResource resource(Consumer<SpvcReflectedResource> consumer)

Passes the resource field to the specified Consumer.

setback to summary
public SpvcReflectedBuiltinResource set(int builtin, int value_type_id, SpvcReflectedResource resource)

Initializes this struct with the specified values.

setback to summary
public SpvcReflectedBuiltinResource set(SpvcReflectedBuiltinResource src)

Copies the specified struct data to this struct.

Parameters
src:SpvcReflectedBuiltinResource

the source struct

Returns:SpvcReflectedBuiltinResource

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
validateback to summary
public static void validate(long struct)

Validates pointer members that should not be NULL.

Parameters
struct:long

the struct to validate

value_type_idback to summary
public int value_type_id()

This is the actual value type of the builtin.

Typically float4, float, array<float, N> for the gl_PerVertex builtins. If the builtin is a control point, the control point array type will be stripped away here as appropriate.

Annotations
@NativeType:spvc_type_id
value_type_idback to summary
public SpvcReflectedBuiltinResource value_type_id(int value)

Sets the specified value to the value_type_id field.

org.lwjgl.util.spvc back to summary

public Class SpvcReflectedBuiltinResource.Buffer

extends StructBuffer<SpvcReflectedBuiltinResource, SpvcReflectedBuiltinResource.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of SpvcReflectedBuiltinResource structs.

Field Summary

Modifier and TypeField and Description
private static final SpvcReflectedBuiltinResource

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new SpvcReflectedBuiltinResource.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the SpvcReflectedBuiltinResource#builtin field.
builtin
()

public SpvcReflectedBuiltinResource.Buffer
builtin(int value)

Sets the specified value to the SpvcReflectedBuiltinResource#builtin field.

protected SpvcReflectedBuiltinResource
public SpvcReflectedResource
public SpvcReflectedBuiltinResource.Buffer
public SpvcReflectedBuiltinResource.Buffer
protected SpvcReflectedBuiltinResource.Buffer
public int
public SpvcReflectedBuiltinResource.Buffer
value_type_id(int value)

Sets the specified value to the SpvcReflectedBuiltinResource#value_type_id field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final SpvcReflectedBuiltinResource ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new SpvcReflectedBuiltinResource.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by SpvcReflectedBuiltinResource#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

builtinback to summary
public int builtin()
Returns:int

the value of the SpvcReflectedBuiltinResource#builtin field.

Annotations
@NativeType:SpvBuiltIn
builtinback to summary
public SpvcReflectedBuiltinResource.Buffer builtin(int value)

Sets the specified value to the SpvcReflectedBuiltinResource#builtin field.

getElementFactoryback to summary
protected SpvcReflectedBuiltinResource getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
resourceback to summary
public SpvcReflectedResource resource()
Returns:SpvcReflectedResource

a SpvcReflectedResource view of the SpvcReflectedBuiltinResource#resource field.

Annotations
@NativeType:spvc_reflected_resource
resourceback to summary
public SpvcReflectedBuiltinResource.Buffer resource(SpvcReflectedResource value)

Copies the specified SpvcReflectedResource to the SpvcReflectedBuiltinResource#resource field.

resourceback to summary
public SpvcReflectedBuiltinResource.Buffer resource(Consumer<SpvcReflectedResource> consumer)

Passes the SpvcReflectedBuiltinResource#resource field to the specified Consumer.

selfback to summary
protected SpvcReflectedBuiltinResource.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
value_type_idback to summary
public int value_type_id()
Returns:int

the value of the SpvcReflectedBuiltinResource#value_type_id field.

Annotations
@NativeType:spvc_type_id
value_type_idback to summary
public SpvcReflectedBuiltinResource.Buffer value_type_id(int value)

Sets the specified value to the SpvcReflectedBuiltinResource#value_type_id field.