Interface RenderObject
- All Superinterfaces:
AutoCloseable
,Uploadable
- All Known Subinterfaces:
IRectRenderObject
- All Known Implementing Classes:
DebugRectRenderObject
,OutlineRenderObject
,RectRenderObject
,StaticCPUBuffer
,StaticGPUBuffer
,TextCharRenderObject
,TextRenderObject
,TexturedRectRenderObject
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
-
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) void
close()
int
int
program()
default int
size()
The number of bytes that this consumer will provide the sink with uponUploadable.uploadTo(Sink)
.default void
uSpecUploadCanvas
(CanvasImpl canvas) default void
Methods inherited from interface dev.pfaff.altargui.uploadables.Uploadable
uploadTo, uSpecUploadAtUnchecked
-
Field Details
-
EMPTY_ARRAY
-
-
Method Details
-
instanceCount
int instanceCount() -
instanceLayout
MemoryLayout instanceLayout() -
size
default 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
int program() -
close
void close()- Specified by:
close
in interfaceAutoCloseable
-
buildStatic
static RenderObject buildStatic(int layer, MemoryLayout instanceStride, int instanceCount, Consumer<? super ByteBufferSink> builder) -
buildSingleStatic
-
uSpecUploadCanvas
-
uSpecUploadLayered
-