Record Class CompiledShader
java.lang.Object
java.lang.Record
dev.engine.graphics.common.CompiledShader
public record CompiledShader(Handle<PipelineResource> pipeline, Map<String, CompiledShader.ParameterBinding> bindings)
extends Record
A compiled shader pipeline with reflection metadata.
The renderer uses reflection to bind UBOs and textures to the correct slots.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final recordA shader parameter binding — name, slot index, and type. -
Constructor Summary
ConstructorsConstructorDescriptionCompiledShader(Handle<PipelineResource> pipeline, Map<String, CompiledShader.ParameterBinding> bindings) Creates an instance of aCompiledShaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbindingIndex(String name) Gets the binding index for a named parameter, or -1.bindings()Returns the value of thebindingsrecord component.final booleanIndicates whether some other object is "equal to" this one.findBinding(String name) Finds a binding by name, or null.final inthashCode()Returns a hash code value for this object.pipeline()Returns the value of thepipelinerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompiledShader
public CompiledShader(Handle<PipelineResource> pipeline, Map<String, CompiledShader.ParameterBinding> bindings) Creates an instance of aCompiledShaderrecord class.- Parameters:
pipeline- the value for thepipelinerecord componentbindings- the value for thebindingsrecord component
-
-
Method Details
-
findBinding
Finds a binding by name, or null. -
bindingIndex
Gets the binding index for a named parameter, or -1. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
pipeline
Returns the value of thepipelinerecord component.- Returns:
- the value of the
pipelinerecord component
-
bindings
Returns the value of thebindingsrecord component.- Returns:
- the value of the
bindingsrecord component
-