Mesh

class Mesh(val gl: GL, val geometry: MeshGeometry, var autoBind: Boolean = true) : Disposable

Constructors

Link copied to clipboard
fun Mesh(gl: GL, geometry: MeshGeometry, autoBind: Boolean = true)

Functions

Link copied to clipboard
fun bind(shader: ShaderProgram<*, *>? = null, locations: IntArray? = null)

Binds the VertexBufferObject and will also bind the IndexBufferObject if the numIndices 0.

Link copied to clipboard
open override fun dispose()

Disposes the mesh and any buffers.

Link copied to clipboard
fun generate(generator: MeshBuilder.() -> Unit)
Link copied to clipboard
fun render(shader: ShaderProgram<*, *>? = null, drawMode: DrawMode = DrawMode.TRIANGLES, offset: Int = 0, count: Int = defaultCount)

Renders the mesh.

Link copied to clipboard
fun unbind(shader: ShaderProgram<*, *>? = null, locations: IntArray? = null)

Unbinds the VertexBufferObject and the IndexBufferObject if applicable.

Properties

Link copied to clipboard
var autoBind: Boolean = true
Link copied to clipboard

The default total count for rendering vertices. This will default to the numIndices, if greater than 0, else the numVertices

Link copied to clipboard
Link copied to clipboard
val gl: GL
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard