Package icyllis.arc3d.granite
Class MeshDrawWriter
java.lang.Object
icyllis.arc3d.granite.MeshDrawWriter
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorDescriptionMeshDrawWriter
(DrawBufferManager drawBufferManager, DrawCommandList commandList) -
Method Summary
Modifier and TypeMethodDescriptionlong
append
(int count) The caller must writecount * stride
bytes to the pointer.void
beginInstances
(BufferViewInfo vertexBufferInfo, BufferViewInfo indexBufferInfo, int vertexCount) Start writing instance data and bind static vertex buffer and index buffer.void
void
close()
void
void
flush()
void
void
newPipelineState
(int vertexBinding, int instanceBinding, int vertexStride, int instanceStride) void
reserve
(int count)
-
Constructor Details
-
MeshDrawWriter
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newPipelineState
public void newPipelineState(int vertexBinding, int instanceBinding, int vertexStride, int instanceStride) -
newDynamicState
public void newDynamicState() -
flush
public void flush() -
beginVertices
public void beginVertices() -
beginInstances
public void beginInstances(@Nullable BufferViewInfo vertexBufferInfo, @Nullable BufferViewInfo indexBufferInfo, int vertexCount) Start writing instance data and bind static vertex buffer and index buffer.- Parameters:
vertexBufferInfo
-indexBufferInfo
-vertexCount
-
-
reserve
public void reserve(int count) -
append
public long append(int count) The caller must writecount * stride
bytes to the pointer.- Parameters:
count
- vertex count or instance count
-
endAppender
public void endAppender()
-