Package icyllis.arc3d.engine
Interface Mesh
- All Known Implementing Classes:
CircularRRectOp
,MeshDrawOp
,RectOp
,RoundRectOp
public interface Mesh
The interface used to receive geometry buffers from
MeshDrawTarget
for mesh-drawing operations.-
Method Summary
Modifier and TypeMethodDescriptiondefault int
Returns the number of indices to draw in the mesh.default int
Returns the number of instances to draw in the batch.default int
Returns the size of an instance if enabled in the array.default int
Returns the number of vertices to draw in the batch.default int
Returns the size of a vertex if enabled in the array.default void
setIndexBuffer
(@RawPtr Buffer buffer, int baseIndex, int actualIndexCount) The callback method forMeshDrawTarget.makeIndexSpace(Mesh)
results.default void
setInstanceBuffer
(@RawPtr Buffer buffer, int baseInstance, int actualInstanceCount) The callback method forMeshDrawTarget.makeInstanceSpace(Mesh)
results.default void
setVertexBuffer
(@RawPtr Buffer buffer, int baseVertex, int actualVertexCount) The callback method forMeshDrawTarget.makeVertexSpace(Mesh)
results.
-
Method Details
-
getVertexSize
default int getVertexSize()Returns the size of a vertex if enabled in the array. -
getVertexCount
default int getVertexCount()Returns the number of vertices to draw in the batch. -
setVertexBuffer
The callback method forMeshDrawTarget.makeVertexSpace(Mesh)
results. The given GPU buffer will be kept byGpuBufferPool
and moved to command buffer when the frame ends.- Parameters:
buffer
- the raw ptr to the vertex buffer that will hold the verticesbaseVertex
- the offset into buffer of the first vertex, in units of the size of a vertex from layout paramactualVertexCount
- the actual number of vertices allocated
-
getInstanceSize
default int getInstanceSize()Returns the size of an instance if enabled in the array. -
getInstanceCount
default int getInstanceCount()Returns the number of instances to draw in the batch. -
setInstanceBuffer
default void setInstanceBuffer(@RawPtr @RawPtr Buffer buffer, int baseInstance, int actualInstanceCount) The callback method forMeshDrawTarget.makeInstanceSpace(Mesh)
results. The given GPU buffer will be kept byGpuBufferPool
and moved to command buffer when the frame ends.- Parameters:
buffer
- the raw ptr to the instance buffer that will hold the instancesbaseInstance
- the offset into buffer of the first instance, in units of the size of an instance from layout paramactualInstanceCount
- the actual number of instances allocated
-
getIndexCount
default int getIndexCount()Returns the number of indices to draw in the mesh. -
setIndexBuffer
The callback method forMeshDrawTarget.makeIndexSpace(Mesh)
results. The given GPU buffer will be kept byGpuBufferPool
and moved to command buffer when the frame ends.- Parameters:
buffer
- the raw ptr to the index buffer that will hold the indicesbaseIndex
- the offset into buffer of the first index, in units of the size of an index from layout paramactualIndexCount
- the actual number of indices allocated
-