library / com.otaliastudios.opengl.draw / GlDrawable

GlDrawable

abstract class GlDrawable : GlViewportAware

Constructors

<init>

GlDrawable()

Properties

coordsPerVertex

abstract val coordsPerVertex: Int

Returns the number of position coordinates per vertex. This will be 2 or 3.

modelMatrix

val modelMatrix: FloatArray

The model matrix for this object. Defaults to the identity matrix, but can be accessed and modified.

vertexArray

abstract var vertexArray: FloatBuffer

Returns the array of vertices. To avoid allocations, this returns internal state. The caller must not modify it.

vertexArrayVersion

var vertexArrayVersion: Int

vertexCount

open val vertexCount: Int

Returns the number of vertices stored in the vertex array.

vertexStride

open val vertexStride: Int

Returns the width, in bytes, of the data for each vertex.

Inherited Properties

viewportHeight

var viewportHeight: Int

viewportWidth

var viewportWidth: Int

Functions

draw

abstract fun draw(): Unit

Draws this drawable. This function should not be called directly. Instead, this drawable should be passed to some GlProgram.

notifyVertexArrayChange

fun notifyVertexArrayChange(): Unit

Inherited Functions

ensureViewportSize

fun ensureViewportSize(): Unit

onViewportSizeChanged

open fun onViewportSizeChanged(): Unit

setViewportSize

fun setViewportSize(width: Int, height: Int): Unit

Inheritors

Gl2dDrawable

abstract class Gl2dDrawable : GlDrawable

Gl3dDrawable

abstract class Gl3dDrawable : GlDrawable