Class LayeredRenderBuffer
java.lang.Object
dev.pfaff.altargui.render.LayeredRenderBuffer
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
GL31LayeredRenderBuffer
,GL31LayeredRenderBufferNew
,GL42DrawArraysIndirectLayeredRenderBuffer
,GL42DrawArraysInstancedBaseInstanceLayeredRenderBuffer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List
<BuiltInstanceLayout> protected final RawBuffer
protected final List
<Program<ShaderProg2D>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginUploading
(int capacity) final int
void
close()
final int
protected abstract void
drawEntry
(MemorySegment ms, int programId, Program<?> program) The VAO will be bound by the caller.drawer()
final boolean
final void
protected abstract VAO
getVAOForEntry
(MemorySegment ms, int programId) final void
iSpecUpload
(RenderObject object, int program) protected abstract void
protected abstract void
putDataForEntry
(MemorySegment ms, int programId, int start, int end) final void
upload
(RenderObject object)
-
Field Details
-
programs
-
instanceLayouts
-
instancesBuffer
-
-
Constructor Details
-
LayeredRenderBuffer
public LayeredRenderBuffer()
-
-
Method Details
-
currentProgram
public final int currentProgram() -
byteCount
public final int byteCount() -
onRecreate
protected abstract void onRecreate() -
beginUploading
public void beginUploading(int capacity) - Parameters:
capacity
- the maximum number of bytes that will be uploaded.
-
finishUploading
public final void finishUploading() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
putDataForEntry
- Parameters:
ms
- a buffer of 3 integers. Store whatever you need here.programId
- the shader program used for the layer.start
- the offset in units of instances of the start of the program's vertex data.end
- the offset in units of instances of the end of the program's vertex data.
-
getVAOForEntry
- Parameters:
ms
- a buffer of 3 integers.programId
-
-
drawEntry
The VAO will be bound by the caller.- Parameters:
ms
- a buffer of 3 integers.
-
endCurrentLayer
public final boolean endCurrentLayer() -
iSpecUpload
-
upload
-
drawer
-