GlimpseAdapter

class GlimpseAdapter

Glimpse OpenGL adapter.

class GlimpseAdapter(gles: GL2ES2)

Glimpse OpenGL adapter for the given GL ES 2.0.

Constructors

GlimpseAdapter
Link copied to clipboard
fun GlimpseAdapter(gles: GL2ES2)

Functions

booleanOf
Link copied to clipboard
common
fun booleanOf(value: Int): Boolean
Returns a boolean value for the given integer value.
fun booleanOf(value: Int): Boolean
Returns a boolean value for the given integer value.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
open operator fun equals(other: Any?): Boolean
glActiveTexture
Link copied to clipboard
common
fun glActiveTexture(textureIndex: Int)
Selects active textureIndex starting with 0.
fun glActiveTexture(textureIndex: Int)
Selects active textureIndex starting with 0.
glAttachShader
Link copied to clipboard
common
fun glAttachShader(programHandle: Int, shaderHandle: Int)
Attaches shader identified by a given shaderHandle to program identified by a given programHandle.
fun glAttachShader(programHandle: Int, shaderHandle: Int)
Attaches shader identified by a given shaderHandle to program identified by a given programHandle.
glBindBuffer
Link copied to clipboard
common
fun glBindBuffer(type: BufferType, bufferHandle: Int)
Binds a given bufferHandle to a given buffer type.
fun glBindBuffer(type: BufferType, bufferHandle: Int)
Binds a given bufferHandle to a given buffer type.
glBindTexture
Link copied to clipboard
common
fun glBindTexture(type: TextureType, textureHandle: Int)
Binds a given textureHandle to a given texture type.
fun glBindTexture(type: TextureType, textureHandle: Int)
Binds a given textureHandle to a given texture type.
glBufferData
Link copied to clipboard
common
fun glBufferData(type: BufferType, data: FloatBufferData, usage: BufferUsage)
Creates a buffer of floating point values and fills it with data.
fun glBufferData(type: BufferType, data: FloatBufferData, usage: BufferUsage)
Creates a buffer of floating point values and fills it with data.
common
fun glBufferData(type: BufferType, data: IntBufferData, usage: BufferUsage)
Creates a buffer of integer values and fills it with data.
fun glBufferData(type: BufferType, data: IntBufferData, usage: BufferUsage)
Creates a buffer of integer values and fills it with data.
glClear
Link copied to clipboard
common
fun glClear(vararg buffers: ClearableBufferType)
Clears given buffers to the predefined clear values.
fun glClear(vararg buffers: ClearableBufferType)
Clears given buffers to the predefined clear values.
glClearColor
Link copied to clipboard
common
fun glClearColor(color: Vec3)
Sets clear values for color buffers to color with alpha channel set to fully opaque.
fun glClearColor(color: Vec3)
Sets clear values for color buffers to color with alpha channel set to fully opaque.
common
fun glClearColor(color: Vec4)
Sets clear values for color buffers to color.
fun glClearColor(color: Vec4)
Sets clear values for color buffers to color.
glClearDepth
Link copied to clipboard
common
fun glClearDepth(depth: Float)
Sets clear value for the depth buffer to depth.
fun glClearDepth(depth: Float)
Sets clear value for the depth buffer to depth.
glCompileShader
Link copied to clipboard
common
fun glCompileShader(shaderHandle: Int)
Compiles a shader identified by a given shaderHandle.
fun glCompileShader(shaderHandle: Int)
Compiles a shader identified by a given shaderHandle.
glCreateProgram
Link copied to clipboard
common
fun glCreateProgram(): Int
Creates a program and returns its handle.
fun glCreateProgram(): Int
Creates a program and returns its handle.
glCreateShader
Link copied to clipboard
common
fun glCreateShader(shaderType: ShaderType): Int
Creates a shader of a given shaderType and returns its handle.
fun glCreateShader(shaderType: ShaderType): Int
Creates a shader of a given shaderType and returns its handle.
glCullFace
Link copied to clipboard
common
fun glCullFace(faceCullingMode: FaceCullingMode)
Sets facets to be culled to faceCullingMode.
fun glCullFace(faceCullingMode: FaceCullingMode)
Sets facets to be culled to faceCullingMode.
glDeleteBuffers
Link copied to clipboard
common
fun glDeleteBuffers(bufferHandles: IntArray)
Deletes buffers represented by given bufferHandles.
fun glDeleteBuffers(bufferHandles: IntArray)
Deletes buffers represented by given bufferHandles.
glDeleteProgram
Link copied to clipboard
common
fun glDeleteProgram(programHandle: Int)
Deletes a program identified by a given programHandle.
fun glDeleteProgram(programHandle: Int)
Deletes a program identified by a given programHandle.
glDeleteShader
Link copied to clipboard
common
fun glDeleteShader(shaderHandle: Int)
Deletes a shader identified by a given shaderHandle.
fun glDeleteShader(shaderHandle: Int)
Deletes a shader identified by a given shaderHandle.
glDeleteTextures
Link copied to clipboard
common
fun glDeleteTextures(textureHandles: IntArray)
Deletes textures represented by given textureHandles.
fun glDeleteTextures(textureHandles: IntArray)
Deletes textures represented by given textureHandles.
glDepthTest
Link copied to clipboard
common
fun glDepthTest(depthTestFunction: DepthTestFunction)
Sets the given depthTestFunction.
fun glDepthTest(depthTestFunction: DepthTestFunction)
Sets the given depthTestFunction.
glDisableVertexAttribArray
Link copied to clipboard
common
fun glDisableVertexAttribArray(location: Int)
Disables vertex attributes array at a given location for current program.
fun glDisableVertexAttribArray(location: Int)
Disables vertex attributes array at a given location for current program.
glDrawArrays
Link copied to clipboard
common
fun glDrawArrays(mode: DrawingMode, count: Int, offset: Int = 0)
Draws a given number of primitives of type specified by mode, starting with offset.
fun glDrawArrays(mode: DrawingMode, count: Int, offset: Int = 0)
Draws a given number of primitives of type specified by mode, starting with offset.
glDrawElements
Link copied to clipboard
common
fun glDrawElements(mode: DrawingMode, count: Int, offset: Int = 0)
Draws a given number of primitives of type specified by mode, using a buffer of vertex array indices, starting with offset.
fun glDrawElements(mode: DrawingMode, count: Int, offset: Int = 0)
Draws a given number of primitives of type specified by mode, using a buffer of vertex array indices, starting with offset.
glEnableVertexAttribArray
Link copied to clipboard
common
fun glEnableVertexAttribArray(location: Int)
Enables vertex attributes array at a given location for current program.
fun glEnableVertexAttribArray(location: Int)
Enables vertex attributes array at a given location for current program.
glGenBuffers
Link copied to clipboard
common
fun glGenBuffers(bufferHandles: IntArray)
Generates buffer handles and writes them to a given bufferHandles array.
fun glGenBuffers(bufferHandles: IntArray)
Generates buffer handles and writes them to a given bufferHandles array.
glGenerateMipmap
Link copied to clipboard
common
fun glGenerateMipmap(type: TextureType)
Generates mipmaps for the currently selected texture of a given type.
fun glGenerateMipmap(type: TextureType)
Generates mipmaps for the currently selected texture of a given type.
glGenTextures
Link copied to clipboard
common
fun glGenTextures(textureHandles: IntArray)
Generates texture handles and writes them to a given textureHandles array.
fun glGenTextures(textureHandles: IntArray)
Generates texture handles and writes them to a given textureHandles array.
glGetAttributeLocation
Link copied to clipboard
common
fun glGetAttributeLocation(programHandle: Int, name: String): Int
Returns location of attribute variable with a given name from program identified by a given programHandle.
fun glGetAttributeLocation(programHandle: Int, name: String): Int
Returns location of attribute variable with a given name from program identified by a given programHandle.
glGetProgramDeleteStatus
Link copied to clipboard
common
fun glGetProgramDeleteStatus(programHandle: Int): Boolean
Returns true if program identified by a given programHandle has been marked for deletion.
fun glGetProgramDeleteStatus(programHandle: Int): Boolean
Returns true if program identified by a given programHandle has been marked for deletion.
glGetProgramInfoLog
Link copied to clipboard
common
fun glGetProgramInfoLog(programHandle: Int): String
Returns information log for the program identified by a given programHandle.
fun glGetProgramInfoLog(programHandle: Int): String
Returns information log for the program identified by a given programHandle.
glGetProgramLinkStatus
Link copied to clipboard
common
fun glGetProgramLinkStatus(programHandle: Int): Boolean
Returns true if program identified by a given programHandle has been successfully linked.
fun glGetProgramLinkStatus(programHandle: Int): Boolean
Returns true if program identified by a given programHandle has been successfully linked.
glGetProgramValidateStatus
Link copied to clipboard
common
fun glGetProgramValidateStatus(programHandle: Int): Boolean
Returns true if program identified by a given programHandle has been successfully validated.
fun glGetProgramValidateStatus(programHandle: Int): Boolean
Returns true if program identified by a given programHandle has been successfully validated.
glGetShaderCompileStatus
Link copied to clipboard
common
fun glGetShaderCompileStatus(shaderHandle: Int): Boolean
Returns true if shader identified by a given shaderHandle has been successfully compiled.
fun glGetShaderCompileStatus(shaderHandle: Int): Boolean
Returns true if shader identified by a given shaderHandle has been successfully compiled.
glGetShaderDeleteStatus
Link copied to clipboard
common
fun glGetShaderDeleteStatus(shaderHandle: Int): Boolean
Returns true if shader identified by a given shaderHandle has been marked for deletion.
fun glGetShaderDeleteStatus(shaderHandle: Int): Boolean
Returns true if shader identified by a given shaderHandle has been marked for deletion.
glGetShaderInfoLog
Link copied to clipboard
common
fun glGetShaderInfoLog(shaderHandle: Int): String
Returns information log for the shader identified by a given shaderHandle.
fun glGetShaderInfoLog(shaderHandle: Int): String
Returns information log for the shader identified by a given shaderHandle.
glGetUniformLocation
Link copied to clipboard
common
fun glGetUniformLocation(programHandle: Int, name: String): Int
Returns location of uniform variable with a given name from program identified by a given programHandle.
fun glGetUniformLocation(programHandle: Int, name: String): Int
Returns location of uniform variable with a given name from program identified by a given programHandle.
glLinkProgram
Link copied to clipboard
common
fun glLinkProgram(programHandle: Int)
Links program identified by a given programHandle.
fun glLinkProgram(programHandle: Int)
Links program identified by a given programHandle.
glMaxTextureSize
Link copied to clipboard
common
fun glMaxTextureSize(type: TextureType): Int
Gets maximum size of a texture of a given type.
fun glMaxTextureSize(type: TextureType): Int
Gets maximum size of a texture of a given type.
glReadPixels
Link copied to clipboard
common
fun glReadPixels(x: Int = 0, y: Int = 0, width: Int, height: Int, format: PixelFormat = PixelFormat.RGBA): ByteArray
Reads pixels from frame buffer.
fun glReadPixels(x: Int = 0, y: Int = 0, width: Int, height: Int, format: PixelFormat = PixelFormat.RGBA): ByteArray
Reads pixels from frame buffer.
glShaderSource
Link copied to clipboard
common
fun glShaderSource(shaderHandle: Int, source: String)
Sets source of the shader identified by a given shaderHandle.
fun glShaderSource(shaderHandle: Int, source: String)
Sets source of the shader identified by a given shaderHandle.
glTexParameterFilter
Link copied to clipboard
common
fun glTexParameterFilter(type: TextureType, minFilter: TextureMinFilter, magFilter: TextureMagFilter)
Sets texture minifying and magnifying filters for the currently selected texture of a given type.
fun glTexParameterFilter(type: TextureType, minFilter: TextureMinFilter, magFilter: TextureMagFilter)
Sets texture minifying and magnifying filters for the currently selected texture of a given type.
glTexParameterWrap
Link copied to clipboard
common
fun glTexParameterWrap(type: TextureType, wrapS: TextureWrap, wrapT: TextureWrap)
Sets wrap parameter for texture coordinates S and T for the currently selected texture of a given type.
fun glTexParameterWrap(type: TextureType, wrapS: TextureWrap, wrapT: TextureWrap)
Sets wrap parameter for texture coordinates S and T for the currently selected texture of a given type.
glTextureIndices
Link copied to clipboard
common
fun glTextureIndices(): IntRange
Returns a range of indices supported by glActiveTexture.
fun glTextureIndices(): IntRange
Returns a range of indices supported by glActiveTexture.
glUniform
Link copied to clipboard
common
fun glUniform(location: Int, value: Vec2)
Sets value of 2D vector uniform variable at a given location for current program.
fun glUniform(location: Int, value: Vec2)
Sets value of 2D vector uniform variable at a given location for current program.
common
fun glUniform(location: Int, value: Vec3)
Sets value of 3D vector uniform variable at a given location for current program.
fun glUniform(location: Int, value: Vec3)
Sets value of 3D vector uniform variable at a given location for current program.
common
fun glUniform(location: Int, value: Vec4)
Sets value of 4D vector uniform variable at a given location for current program.
fun glUniform(location: Int, value: Vec4)
Sets value of 4D vector uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Vec2)
Sets values of 2D vector array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Vec2)
Sets values of 2D vector array uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Vec3)
Sets values of 3D vector array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Vec3)
Sets values of 3D vector array uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Vec4)
Sets values of 4D vector array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Vec4)
Sets values of 4D vector array uniform variable at a given location for current program.
common
fun glUniform(location: Int, value: Float)
Sets value of floating point uniform variable at a given location for current program.
fun glUniform(location: Int, value: Float)
Sets value of floating point uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Float)
Sets values of floating point array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Float)
Sets values of floating point array uniform variable at a given location for current program.
common
fun glUniform(location: Int, value: Int)
Sets value of integer uniform variable at a given location for current program.
fun glUniform(location: Int, value: Int)
Sets value of integer uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Int)
Sets values of integer array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Int)
Sets values of integer array uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Mat2, transpose: Boolean = false)
Sets values of 2×2 matrix array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Mat2, transpose: Boolean = false)
Sets values of 2×2 matrix array uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Mat3, transpose: Boolean = false)
Sets values of 3×3 matrix array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Mat3, transpose: Boolean = false)
Sets values of 3×3 matrix array uniform variable at a given location for current program.
common
fun glUniform(location: Int, vararg values: Mat4, transpose: Boolean = false)
Sets values of 4×4 matrix array uniform variable at a given location for current program.
fun glUniform(location: Int, vararg values: Mat4, transpose: Boolean = false)
Sets values of 4×4 matrix array uniform variable at a given location for current program.
glUseProgram
Link copied to clipboard
common
fun glUseProgram(programHandle: Int)
Uses a program identified by a given programHandle.
fun glUseProgram(programHandle: Int)
Uses a program identified by a given programHandle.
glValidateProgram
Link copied to clipboard
common
fun glValidateProgram(programHandle: Int)
Validates program identified by a given programHandle.
fun glValidateProgram(programHandle: Int)
Validates program identified by a given programHandle.
glVertexAttribPointer
Link copied to clipboard
common
fun glVertexAttribPointer(location: Int, vectorSize: Int, normalized: Boolean = false, stride: Int = 0, offset: Int = 0)
Sets vertex attributes array at a given location for current program.
fun glVertexAttribPointer(location: Int, vectorSize: Int, normalized: Boolean = false, stride: Int = 0, offset: Int = 0)
Sets vertex attributes array at a given location for current program.
glViewport
Link copied to clipboard
common
fun glViewport(x: Int = 0, y: Int = 0, width: Int, height: Int)
Sets the viewport to have its bottom-left corner at (x, y), and a given width and height.
fun glViewport(x: Int = 0, y: Int = 0, width: Int, height: Int)
Sets the viewport to have its bottom-left corner at (x, y), and a given width and height.
hashCode
Link copied to clipboard
open fun hashCode(): Int
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String
open fun toString(): String

Extensions

createBitmap
Link copied to clipboard
fun GlimpseAdapter.createBitmap(x: Int = 0, y: Int = 0, width: Int, height: Int): Bitmap
Creates a new Bitmap from the rendered image.
createImage
Link copied to clipboard
fun GlimpseAdapter.createImage(x: Int = 0, y: Int = 0, width: Int, height: Int): Image
Creates a new Image from the rendered image.