GlUtil

open class GlUtil

Some OpenGL utility functions.

Properties

Link copied to clipboard
Identity matrix for general use.
Link copied to clipboard
val TAG: String = "Grafika"

Functions

Link copied to clipboard
open fun checkGlError(op: String)
Checks to see if a GLES error has been raised.
Link copied to clipboard
open fun checkLocation(location: Int, label: String)
Checks to see if the location we obtained is valid.
Link copied to clipboard
Allocates a direct float buffer, and populates it with the float array data.
Link copied to clipboard
open fun createImageTexture(data: ByteBuffer, width: Int, height: Int, format: Int): Int
Creates a texture from raw data.
Link copied to clipboard
open fun createProgram(vertexSource: String, fragmentSource: String): Int
Creates a new program from the supplied vertex and fragment shaders.
Link copied to clipboard
open fun loadShader(shaderType: Int, source: String): Int
Compiles the provided shader source.
Link copied to clipboard
open fun logVersionInfo()
Writes GL version info to the log.