Gl Program
Base class for a program that accepts a vertex and a fragment shader in the constructor. The program will be created automatically and released when release is called.
Subclasses are required to do two things - typically, during the onPreDraw callback: 1 Inspect the GlDrawable properties:
GlDrawable.vertexStride These should be passed to the vertex shader. 2 Pass the MVP matrix to the vertex shader as well.
The vertex shader should then use the two to compute the gl_Position.
Constructors
Types
Functions
draw
Link copied to clipboard
@JvmOverloads()
Content copied to clipboard
onDraw
Link copied to clipboard
onPostDraw
Link copied to clipboard
onPreDraw
Link copied to clipboard
open fun onPreDraw(drawable: GlDrawable, modelViewProjectionMatrix: FloatArray)
Content copied to clipboard