Package foundry.veil.api.client.render
Class VeilShaderBufferLayout.Builder<T>
java.lang.Object
foundry.veil.api.client.render.VeilShaderBufferLayout.Builder<T>
- Type Parameters:
T
- The type of data the shader block will serialize
- Enclosing class:
VeilShaderBufferLayout<T>
Creates a new layout for a shader block. This automatically figures out what the size and offsets need to be to create the block.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Serializes a double field from the specified object.static interface
Serializes a float field from the specified object.static interface
Serializes an int field from the specified object. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbinding
(ShaderBlock.BufferBinding binding) build()
dvec2
(String name, VeilShaderBufferLayout.Builder.DoubleSerializer<T> x, VeilShaderBufferLayout.Builder.DoubleSerializer<T> y) dvec3
(String name, VeilShaderBufferLayout.Builder.DoubleSerializer<T> x, VeilShaderBufferLayout.Builder.DoubleSerializer<T> y, VeilShaderBufferLayout.Builder.DoubleSerializer<T> z) dvec4
(String name, VeilShaderBufferLayout.Builder.DoubleSerializer<T> x, VeilShaderBufferLayout.Builder.DoubleSerializer<T> y, VeilShaderBufferLayout.Builder.DoubleSerializer<T> z, VeilShaderBufferLayout.Builder.DoubleSerializer<T> w) f32
(String name, VeilShaderBufferLayout.Builder.FloatSerializer<T> serializer) f64
(String name, VeilShaderBufferLayout.Builder.DoubleSerializer<T> serializer) integer
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> serializer) ivec2
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y) ivec3
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y, VeilShaderBufferLayout.Builder.IntSerializer<T> z) ivec4
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y, VeilShaderBufferLayout.Builder.IntSerializer<T> z, VeilShaderBufferLayout.Builder.IntSerializer<T> w) memoryLayout
(ShaderBlock.MemoryLayout memoryLayout) uint
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> serializer) uvec2
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y) uvec3
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y, VeilShaderBufferLayout.Builder.IntSerializer<T> z) uvec4
(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y, VeilShaderBufferLayout.Builder.IntSerializer<T> z, VeilShaderBufferLayout.Builder.IntSerializer<T> w) vec2
(String name, VeilShaderBufferLayout.Builder.FloatSerializer<T> x, VeilShaderBufferLayout.Builder.FloatSerializer<T> y) vec3
(String name, VeilShaderBufferLayout.Builder.FloatSerializer<T> x, VeilShaderBufferLayout.Builder.FloatSerializer<T> y, VeilShaderBufferLayout.Builder.FloatSerializer<T> z) vec4
(String name, VeilShaderBufferLayout.Builder.FloatSerializer<T> x, VeilShaderBufferLayout.Builder.FloatSerializer<T> y, VeilShaderBufferLayout.Builder.FloatSerializer<T> z, VeilShaderBufferLayout.Builder.FloatSerializer<T> w)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
binding
-
memoryLayout
-
f32
public VeilShaderBufferLayout.Builder<T> f32(String name, VeilShaderBufferLayout.Builder.FloatSerializer<T> serializer) -
f64
public VeilShaderBufferLayout.Builder<T> f64(String name, VeilShaderBufferLayout.Builder.DoubleSerializer<T> serializer) -
integer
public VeilShaderBufferLayout.Builder<T> integer(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> serializer) -
uint
public VeilShaderBufferLayout.Builder<T> uint(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> serializer) -
vec2
public VeilShaderBufferLayout.Builder<T> vec2(String name, Function<T, org.joml.Vector2fc> serializer) -
vec2
public VeilShaderBufferLayout.Builder<T> vec2(String name, VeilShaderBufferLayout.Builder.FloatSerializer<T> x, VeilShaderBufferLayout.Builder.FloatSerializer<T> y) -
vec3
public VeilShaderBufferLayout.Builder<T> vec3(String name, Function<T, org.joml.Vector3fc> serializer) -
vec3
-
vec4
public VeilShaderBufferLayout.Builder<T> vec4(String name, Function<T, org.joml.Vector4fc> serializer) -
vec4
-
dvec2
public VeilShaderBufferLayout.Builder<T> dvec2(String name, Function<T, org.joml.Vector2dc> serializer) -
dvec2
public VeilShaderBufferLayout.Builder<T> dvec2(String name, VeilShaderBufferLayout.Builder.DoubleSerializer<T> x, VeilShaderBufferLayout.Builder.DoubleSerializer<T> y) -
dvec3
public VeilShaderBufferLayout.Builder<T> dvec3(String name, Function<T, org.joml.Vector3dc> serializer) -
dvec3
-
dvec4
public VeilShaderBufferLayout.Builder<T> dvec4(String name, Function<T, org.joml.Vector4dc> serializer) -
dvec4
-
ivec2
public VeilShaderBufferLayout.Builder<T> ivec2(String name, Function<T, org.joml.Vector2ic> serializer) -
ivec2
public VeilShaderBufferLayout.Builder<T> ivec2(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y) -
ivec3
public VeilShaderBufferLayout.Builder<T> ivec3(String name, Function<T, org.joml.Vector3ic> serializer) -
ivec3
-
ivec4
public VeilShaderBufferLayout.Builder<T> ivec4(String name, Function<T, org.joml.Vector4ic> serializer) -
ivec4
-
uvec2
public VeilShaderBufferLayout.Builder<T> uvec2(String name, Function<T, org.joml.Vector2ic> serializer) -
uvec2
public VeilShaderBufferLayout.Builder<T> uvec2(String name, VeilShaderBufferLayout.Builder.IntSerializer<T> x, VeilShaderBufferLayout.Builder.IntSerializer<T> y) -
uvec3
public VeilShaderBufferLayout.Builder<T> uvec3(String name, Function<T, org.joml.Vector3ic> serializer) -
uvec3
-
uvec4
public VeilShaderBufferLayout.Builder<T> uvec4(String name, Function<T, org.joml.Vector4ic> serializer) -
uvec4
-
mat2
public VeilShaderBufferLayout.Builder<T> mat2(String name, Function<T, org.joml.Matrix2fc> serializer) -
mat3
public VeilShaderBufferLayout.Builder<T> mat3(String name, Function<T, org.joml.Matrix3fc> serializer) -
mat4
public VeilShaderBufferLayout.Builder<T> mat4(String name, Function<T, org.joml.Matrix4fc> serializer) -
mat3x2
public VeilShaderBufferLayout.Builder<T> mat3x2(String name, Function<T, org.joml.Matrix3x2fc> serializer) -
mat4x3
public VeilShaderBufferLayout.Builder<T> mat4x3(String name, Function<T, org.joml.Matrix4x3fc> serializer) -
dmat2
public VeilShaderBufferLayout.Builder<T> dmat2(String name, Function<T, org.joml.Matrix2dc> serializer) -
dmat3
public VeilShaderBufferLayout.Builder<T> dmat3(String name, Function<T, org.joml.Matrix3dc> serializer) -
dmat4
public VeilShaderBufferLayout.Builder<T> dmat4(String name, Function<T, org.joml.Matrix4dc> serializer) -
dmat3x2
public VeilShaderBufferLayout.Builder<T> dmat3x2(String name, Function<T, org.joml.Matrix3x2dc> serializer) -
dmat4x3
public VeilShaderBufferLayout.Builder<T> dmat4x3(String name, Function<T, org.joml.Matrix4x3dc> serializer) -
build
- Returns:
- A new buffer layout from this builder
-