Record Class Renderable
java.lang.Object
java.lang.Record
dev.engine.graphics.renderer.Renderable
public record Renderable(Handle<BufferResource> vertexBuffer, Handle<BufferResource> indexBuffer, Handle<VertexInputResource> vertexInput, Handle<PipelineResource> pipeline, int vertexCount, int indexCount, Map<String,Integer> bufferBindings)
extends Record
A resolved renderable: mesh GPU resources + pipeline + binding map.
The binding map maps buffer names (e.g. "CameraBuffer") to slot indices,
resolved from shader reflection after compilation.
-
Constructor Summary
ConstructorsConstructorDescriptionRenderable(Handle<BufferResource> vertexBuffer, Handle<BufferResource> indexBuffer, Handle<VertexInputResource> vertexInput, Handle<PipelineResource> pipeline, int vertexCount, int indexCount) Renderable without reflection bindings (legacy / headless).Renderable(Handle<BufferResource> vertexBuffer, Handle<BufferResource> indexBuffer, Handle<VertexInputResource> vertexInput, Handle<PipelineResource> pipeline, int vertexCount, int indexCount, Map<String, Integer> bufferBindings) Creates an instance of aRenderablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbindingFor(String bufferName, int fallback) Finds the binding slot for a named buffer, or the fallback if unknown.Returns the value of thebufferBindingsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theindexBufferrecord component.intReturns the value of theindexCountrecord component.pipeline()Returns the value of thepipelinerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevertexBufferrecord component.intReturns the value of thevertexCountrecord component.Returns the value of thevertexInputrecord component.
-
Constructor Details
-
Renderable
public Renderable(Handle<BufferResource> vertexBuffer, Handle<BufferResource> indexBuffer, Handle<VertexInputResource> vertexInput, Handle<PipelineResource> pipeline, int vertexCount, int indexCount) Renderable without reflection bindings (legacy / headless). -
Renderable
public Renderable(Handle<BufferResource> vertexBuffer, Handle<BufferResource> indexBuffer, Handle<VertexInputResource> vertexInput, Handle<PipelineResource> pipeline, int vertexCount, int indexCount, Map<String, Integer> bufferBindings) Creates an instance of aRenderablerecord class.- Parameters:
vertexBuffer- the value for thevertexBufferrecord componentindexBuffer- the value for theindexBufferrecord componentvertexInput- the value for thevertexInputrecord componentpipeline- the value for thepipelinerecord componentvertexCount- the value for thevertexCountrecord componentindexCount- the value for theindexCountrecord componentbufferBindings- the value for thebufferBindingsrecord component
-
-
Method Details
-
bindingFor
Finds the binding slot for a named buffer, or the fallback if unknown. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
vertexBuffer
Returns the value of thevertexBufferrecord component.- Returns:
- the value of the
vertexBufferrecord component
-
indexBuffer
Returns the value of theindexBufferrecord component.- Returns:
- the value of the
indexBufferrecord component
-
vertexInput
Returns the value of thevertexInputrecord component.- Returns:
- the value of the
vertexInputrecord component
-
pipeline
Returns the value of thepipelinerecord component.- Returns:
- the value of the
pipelinerecord component
-
vertexCount
public int vertexCount()Returns the value of thevertexCountrecord component.- Returns:
- the value of the
vertexCountrecord component
-
indexCount
public int indexCount()Returns the value of theindexCountrecord component.- Returns:
- the value of the
indexCountrecord component
-
bufferBindings
-