library / com.otaliastudios.opengl.scene / GlScene

GlScene

open class GlScene : GlViewportAware

Scenes can be to draw GlDrawables through GlPrograms.

The advantage is that they contain information about the projectionMatrix and the viewMatrix, both of which can be accessed and modified and held by this single object.

The GlScene object will combine these two with the drawables GlDrawable.modelMatrix and pass the resulting model-view-projection matrix to the program.

Constructors

<init>

Scenes can be to draw GlDrawables through GlPrograms.

GlScene()

Properties

projectionMatrix

val projectionMatrix: FloatArray

viewMatrix

val viewMatrix: FloatArray

Functions

draw

fun draw(program: GlProgram, drawable: GlDrawable): Unit