ShaderUtil

object ShaderUtil

Shader helper functions.

Functions

Link copied to clipboard
fun checkGLError(tag: String, label: String?)

Checks if we've had an error inside of OpenGL ES, and if so what that error is.

Link copied to clipboard
fun loadGLShader(tag: String, context: Context, type: Int, filename: String): Int

Overload of loadGLShader that assumes no additional #define values to add.

fun loadGLShader(tag: String, context: Context, type: Int, filename: String, defineValuesMap: MutableMap<String?, Int?>): Int

Converts a raw text file, saved as a resource, into an OpenGL ES shader.