abstract class GlProgram
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:
The vertex shader should then use the two to compute the gl_Position.
GlProgram(vertexShader: String, fragmentShader: String)GlProgram(handle: Int)GlProgram(handle: Int, ownsHandle: Boolean)
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. |
val handle: Int |
fun draw(drawable: GlDrawable, modelViewProjectionMatrix: FloatArray = drawable.modelMatrix): Unit |
|
fun getAttribHandle(name: String): GlProgramLocation |
|
fun getUniformHandle(name: String): GlProgramLocation |
|
open fun onDraw(drawable: GlDrawable): Unit |
|
open fun onPostDraw(drawable: GlDrawable): Unit |
|
open fun onPreDraw(drawable: GlDrawable, modelViewProjectionMatrix: FloatArray): Unit |
|
open fun release(): Unit |
fun create(vertexShaderSource: String, fragmentShaderSource: String): Int |
open class GlFlatProgram : GlProgram
An GlProgram that uses basic flat-shading rendering, based on FlatShadedProgram from grafika. |
|
open class GlTextureProgram : GlProgram
Base implementation for a GlProgram that draws textures. |