Class RenderObject
java.lang.Object
dev.pfaff.altargui.render.RenderObject
- All Implemented Interfaces:
Uploadable
,AutoCloseable
- Direct Known Subclasses:
DebugRectRenderObject
,IRectRenderObject
,OutlineRenderObject
,StaticCPUBuffer
,StaticGPUBuffer
,TextCharRenderObject
,TextRenderObject
Most use cases should be satisfied by
buildSingleStatic(int, dev.pfaff.altargui.shader.InstanceLayout, java.util.function.Consumer<dev.pfaff.altargui.render.Sink>)
. However, if you require rapidly updating data that is
specific to each instance, rather than each program (in which case you should use a custom shader and uniforms
instead), then a custom implementation may be warranted.-
Field Summary
FieldsFields inherited from interface dev.pfaff.altargui.uploadables.Uploadable
POSITION_LAYOUT, POSITION_PACKED_LAYOUT, UV_LAYOUT, UV_PACKED_LAYOUT, VERTEX_LAYOUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderObject
buildSingleStatic
(int layer, InstanceLayout spec, Consumer<Sink> builder) static RenderObject
buildStatic
(int layer, MemoryLayout instanceStride, int instanceCount, Consumer<? super ByteBufferSink> builder) abstract void
close()
abstract int
abstract MemoryLayout
abstract int
program()
int
size()
The number of bytes that this consumer will provide the sink with uponUploadable.uploadTo(Sink)
.void
uSpecUploadCanvas
(CanvasImpl canvas) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.pfaff.altargui.uploadables.Uploadable
uploadTo, uSpecUploadAtUnchecked
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
RenderObject
public RenderObject()
-
-
Method Details
-
instanceCount
public abstract int instanceCount() -
instanceLayout
-
size
public int size()Description copied from interface:Uploadable
The number of bytes that this consumer will provide the sink with uponUploadable.uploadTo(Sink)
.- Specified by:
size
in interfaceUploadable
-
program
public abstract int program() -
close
public abstract void close()- Specified by:
close
in interfaceAutoCloseable
-
buildStatic
public static RenderObject buildStatic(int layer, MemoryLayout instanceStride, int instanceCount, Consumer<? super ByteBufferSink> builder) -
buildSingleStatic
public static RenderObject buildSingleStatic(int layer, InstanceLayout spec, Consumer<Sink> builder) -
uSpecUploadCanvas
-
uSpecUploadLayered
-