Android Programming Press on the image to return to the main documentation page.

OpenGL2

Written by Andrew Graham

Android includes support for high performance 3D graphics via the OpenGL ES API.
OpenGL ES is a flavor of the OpenGL specification intended for embedded devices.
Versions of OpenGL ES are loosely peered to versions of the primary OpenGL standard.
Android currently supports OpenGL ES 2.0, which corresponds to OpenGL 1.5.
If the application you have in mind is possible with OpenGL 1.5 on a desktop system,
it should be possible on Android.

This library also contains a Matrix2 object that operates on 4x4 OpenGL matrices and
a Visibility2 object that imlpements a collection of utility methods for computing the visibility
of triangle meshes.

List of types:

GL2
GLSurfaceView2
Matrix2
Visibility2

GL2

This object does all the drawing work and is an exposure of the Android GLES20 object.

The GL2 function and parameter names mirror those of the GLES20 object which should be present on
Android versions 2.2 and later (API level 8 or later).

Some variations of functions that use native buffers instead of arrays are omitted, generally
where there is an array equivalent. Where there is not an equivalent using an array has
been synthesised.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

None

Members:


  gActiveTexture (texture As Int)

  GL_ACTIVE_ATTRIBUTE_MAX_LENGTH As Int

  GL_ACTIVE_ATTRIBUTES As Int

  GL_ACTIVE_TEXTURE As Int

  GL_ACTIVE_UNIFORM_MAX_LENGTH As Int

  GL_ACTIVE_UNIFORMS As Int

  GL_ALIASED_LINE_WIDTH_RANGE As Int

  GL_ALIASED_POINT_SIZE_RANGE As Int

  GL_ALPHA As Int

  GL_ALPHA_BITS As Int

  GL_ALWAYS As Int

  GL_ARRAY_BUFFER As Int

  GL_ARRAY_BUFFER_BINDING As Int

  GL_ATTACHED_SHADERS As Int

  GL_BACK As Int

  GL_BLEND As Int

  GL_BLEND_COLOR As Int

  GL_BLEND_DST_ALPHA As Int

  GL_BLEND_DST_RGB As Int

  GL_BLEND_EQUATION As Int

  GL_BLEND_EQUATION_ALPHA As Int

  GL_BLEND_EQUATION_RGB As Int

  GL_BLEND_SRC_ALPHA As Int

  GL_BLEND_SRC_RGB As Int

  GL_BLUE_BITS As Int

  GL_BOOL As Int

  GL_BOOL_VEC2 As Int

  GL_BOOL_VEC3 As Int

  GL_BOOL_VEC4 As Int

  GL_BUFFER_SIZE As Int

  GL_BUFFER_USAGE As Int

  GL_BYTE As Int

  GL_CCW As Int

  GL_CLAMP_TO_EDGE As Int

  GL_COLOR_ATTACHMENT0 As Int

  GL_COLOR_BUFFER_BIT As Int

  GL_COLOR_CLEAR_VALUE As Int

  GL_COLOR_WRITEMASK As Int

  GL_COMPILE_STATUS As Int

  GL_COMPRESSED_TEXTURE_FORMATS As Int

  GL_CONSTANT_ALPHA As Int

  GL_CONSTANT_COLOR As Int

  GL_CULL_FACE As Int

  GL_CULL_FACE_MODE As Int

  GL_CURRENT_PROGRAM As Int

  GL_CURRENT_VERTEX_ATTRIB As Int

  GL_CW As Int

  GL_DECR As Int

  GL_DECR_WRAP As Int

  GL_DELETE_STATUS As Int

  GL_DEPTH_ATTACHMENT As Int

  GL_DEPTH_BITS As Int

  GL_DEPTH_BUFFER_BIT As Int

  GL_DEPTH_CLEAR_VALUE As Int

  GL_DEPTH_COMPONENT As Int

  GL_DEPTH_COMPONENT16 As Int

  GL_DEPTH_FUNC As Int

  GL_DEPTH_RANGE As Int

  GL_DEPTH_TEST As Int

  GL_DEPTH_WRITEMASK As Int

  GL_DITHER As Int

  GL_DONT_CARE As Int

  GL_DST_ALPHA As Int

  GL_DST_COLOR As Int

  GL_DYNAMIC_DRAW As Int

  GL_ELEMENT_ARRAY_BUFFER As Int

  GL_ELEMENT_ARRAY_BUFFER_BINDING As Int

  GL_EQUAL As Int

  GL_EXTENSIONS As Int

  GL_FALSE As Int

  GL_FASTEST As Int

  GL_FIXED As Int

  GL_FLOAT As Int

  GL_FLOAT_MAT2 As Int

  GL_FLOAT_MAT3 As Int

  GL_FLOAT_MAT4 As Int

  GL_FLOAT_VEC2 As Int

  GL_FLOAT_VEC3 As Int

  GL_FLOAT_VEC4 As Int

  GL_FRAGMENT_SHADER As Int

  GL_FRAMEBUFFER As Int

  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME As Int

  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE As Int

  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE As Int

  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL As Int

  GL_FRAMEBUFFER_BINDING As Int

  GL_FRAMEBUFFER_COMPLETE As Int

  GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT As Int

  GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS As Int

  GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT As Int

  GL_FRAMEBUFFER_UNSUPPORTED As Int

  GL_FRONT As Int

  GL_FRONT_AND_BACK As Int

  GL_FRONT_FACE As Int

  GL_FUNC_ADD As Int

  GL_FUNC_REVERSE_SUBTRACT As Int

  GL_FUNC_SUBTRACT As Int

  GL_GENERATE_MIPMAP_HINT As Int

  GL_GEQUAL As Int

  GL_GREATER As Int

  GL_GREEN_BITS As Int

  GL_HIGH_FLOAT As Int

  GL_HIGH_INT As Int

  GL_IMPLEMENTATION_COLOR_READ_FORMAT As Int

  GL_IMPLEMENTATION_COLOR_READ_TYPE As Int

  GL_INCR As Int

  GL_INCR_WRAP As Int

  GL_INFO_LOG_LENGTH As Int

  GL_INT As Int

  GL_INT_VEC2 As Int

  GL_INT_VEC3 As Int

  GL_INT_VEC4 As Int

  GL_INVALID_ENUM As Int

  GL_INVALID_FRAMEBUFFER_OPERATION As Int

  GL_INVALID_OPERATION As Int

  GL_INVALID_VALUE As Int

  GL_INVERT As Int

  GL_KEEP As Int

  GL_LEQUAL As Int

  GL_LESS As Int

  GL_LINE_LOOP As Int

  GL_LINE_STRIP As Int

  GL_LINE_WIDTH As Int

  GL_LINEAR As Int

  GL_LINEAR_MIPMAP_LINEAR As Int

  GL_LINEAR_MIPMAP_NEAREST As Int

  GL_LINES As Int

  GL_LINK_STATUS As Int

  GL_LOW_FLOAT As Int

  GL_LOW_INT As Int

  GL_LUMINANCE As Int

  GL_LUMINANCE_ALPHA As Int

  GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS As Int

  GL_MAX_CUBE_MAP_TEXTURE_SIZE As Int

  GL_MAX_FRAGMENT_UNIFORM_VECTORS As Int

  GL_MAX_RENDERBUFFER_SIZE As Int

  GL_MAX_TEXTURE_IMAGE_UNITS As Int

  GL_MAX_TEXTURE_SIZE As Int

  GL_MAX_VARYING_VECTORS As Int

  GL_MAX_VERTEX_ATTRIBS As Int

  GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS As Int

  GL_MAX_VERTEX_UNIFORM_VECTORS As Int

  GL_MAX_VIEWPORT_DIMS As Int

  GL_MEDIUM_FLOAT As Int

  GL_MEDIUM_INT As Int

  GL_MIRRORED_REPEAT As Int

  GL_NEAREST As Int

  GL_NEAREST_MIPMAP_LINEAR As Int

  GL_NEAREST_MIPMAP_NEAREST As Int

  GL_NEVER As Int

  GL_NICEST As Int

  GL_NO_ERROR As Int

  GL_NONE As Int

  GL_NOTEQUAL As Int

  GL_NUM_COMPRESSED_TEXTURE_FORMATS As Int

  GL_NUM_SHADER_BINARY_FORMATS As Int

  GL_ONE As Int

  GL_ONE_MINUS_CONSTANT_ALPHA As Int

  GL_ONE_MINUS_CONSTANT_COLOR As Int

  GL_ONE_MINUS_DST_ALPHA As Int

  GL_ONE_MINUS_DST_COLOR As Int

  GL_ONE_MINUS_SRC_ALPHA As Int

  GL_ONE_MINUS_SRC_COLOR As Int

  GL_OUT_OF_MEMORY As Int

  GL_PACK_ALIGNMENT As Int

  GL_POINTS As Int

  GL_POLYGON_OFFSET_FACTOR As Int

  GL_POLYGON_OFFSET_FILL As Int

  GL_POLYGON_OFFSET_UNITS As Int

  GL_RED_BITS As Int

  GL_RENDERBUFFER As Int

  GL_RENDERBUFFER_ALPHA_SIZE As Int

  GL_RENDERBUFFER_BINDING As Int

  GL_RENDERBUFFER_BLUE_SIZE As Int

  GL_RENDERBUFFER_DEPTH_SIZE As Int

  GL_RENDERBUFFER_GREEN_SIZE As Int

  GL_RENDERBUFFER_HEIGHT As Int

  GL_RENDERBUFFER_INTERNAL_FORMAT As Int

  GL_RENDERBUFFER_RED_SIZE As Int

  GL_RENDERBUFFER_STENCIL_SIZE As Int

  GL_RENDERBUFFER_WIDTH As Int

  GL_RENDERER As Int

  GL_REPEAT As Int

  GL_REPLACE As Int

  GL_RGB As Int

  GL_RGB5_A1 As Int

  GL_RGB565 As Int

  GL_RGBA As Int

  GL_RGBA4 As Int

  GL_SAMPLE_ALPHA_TO_COVERAGE As Int

  GL_SAMPLE_BUFFERS As Int

  GL_SAMPLE_COVERAGE As Int

  GL_SAMPLE_COVERAGE_INVERT As Int

  GL_SAMPLE_COVERAGE_VALUE As Int

  GL_SAMPLER_2D As Int

  GL_SAMPLER_CUBE As Int

  GL_SAMPLES As Int

  GL_SCISSOR_BOX As Int

  GL_SCISSOR_TEST As Int

  GL_SHADER_BINARY_FORMATS As Int

  GL_SHADER_COMPILER As Int

  GL_SHADER_SOURCE_LENGTH As Int

  GL_SHADER_TYPE As Int

  GL_SHADING_LANGUAGE_VERSION As Int

  GL_SHORT As Int

  GL_SRC_ALPHA As Int

  GL_SRC_ALPHA_SATURATE As Int

  GL_SRC_COLOR As Int

  GL_STATIC_DRAW As Int

  GL_STENCIL_ATTACHMENT As Int

  GL_STENCIL_BACK_FAIL As Int

  GL_STENCIL_BACK_FUNC As Int

  GL_STENCIL_BACK_PASS_DEPTH_FAIL As Int

  GL_STENCIL_BACK_PASS_DEPTH_PASS As Int

  GL_STENCIL_BACK_REF As Int

  GL_STENCIL_BACK_VALUE_MASK As Int

  GL_STENCIL_BACK_WRITEMASK As Int

  GL_STENCIL_BITS As Int

  GL_STENCIL_BUFFER_BIT As Int

  GL_STENCIL_CLEAR_VALUE As Int

  GL_STENCIL_FAIL As Int

  GL_STENCIL_FUNC As Int

  GL_STENCIL_INDEX As Int

  GL_STENCIL_INDEX8 As Int

  GL_STENCIL_PASS_DEPTH_FAIL As Int

  GL_STENCIL_PASS_DEPTH_PASS As Int

  GL_STENCIL_REF As Int

  GL_STENCIL_TEST As Int

  GL_STENCIL_VALUE_MASK As Int

  GL_STENCIL_WRITEMASK As Int

  GL_STREAM_DRAW As Int

  GL_SUBPIXEL_BITS As Int

  GL_TEXTURE As Int

  GL_TEXTURE_2D As Int

  GL_TEXTURE_BINDING_2D As Int

  GL_TEXTURE_BINDING_CUBE_MAP As Int

  GL_TEXTURE_CUBE_MAP As Int

  GL_TEXTURE_CUBE_MAP_NEGATIVE_X As Int

  GL_TEXTURE_CUBE_MAP_NEGATIVE_Y As Int

  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z As Int

  GL_TEXTURE_CUBE_MAP_POSITIVE_X As Int

  GL_TEXTURE_CUBE_MAP_POSITIVE_Y As Int

  GL_TEXTURE_CUBE_MAP_POSITIVE_Z As Int

  GL_TEXTURE_MAG_FILTER As Int

  GL_TEXTURE_MIN_FILTER As Int

  GL_TEXTURE_WRAP_S As Int

  GL_TEXTURE_WRAP_T As Int

  GL_TEXTURE0 As Int

  GL_TEXTURE1 As Int

  GL_TEXTURE10 As Int

  GL_TEXTURE11 As Int

  GL_TEXTURE12 As Int

  GL_TEXTURE13 As Int

  GL_TEXTURE14 As Int

  GL_TEXTURE15 As Int

  GL_TEXTURE16 As Int

  GL_TEXTURE17 As Int

  GL_TEXTURE18 As Int

  GL_TEXTURE19 As Int

  GL_TEXTURE2 As Int

  GL_TEXTURE20 As Int

  GL_TEXTURE21 As Int

  GL_TEXTURE22 As Int

  GL_TEXTURE23 As Int

  GL_TEXTURE24 As Int

  GL_TEXTURE25 As Int

  GL_TEXTURE26 As Int

  GL_TEXTURE27 As Int

  GL_TEXTURE28 As Int

  GL_TEXTURE29 As Int

  GL_TEXTURE3 As Int

  GL_TEXTURE30 As Int

  GL_TEXTURE31 As Int

  GL_TEXTURE4 As Int

  GL_TEXTURE5 As Int

  GL_TEXTURE6 As Int

  GL_TEXTURE7 As Int

  GL_TEXTURE8 As Int

  GL_TEXTURE9 As Int

  GL_TRIANGLE_FAN As Int

  GL_TRIANGLE_STRIP As Int

  GL_TRIANGLES As Int

  GL_TRUE As Int

  GL_UNPACK_ALIGNMENT As Int

  GL_UNSIGNED_BYTE As Int

  GL_UNSIGNED_SHORT As Int

  GL_UNSIGNED_SHORT_4_4_4_4 As Int

  GL_UNSIGNED_SHORT_5_5_5_1 As Int

  GL_UNSIGNED_SHORT_5_6_5 As Int

  GL_VALIDATE_STATUS As Int

  GL_VENDOR As Int

  GL_VERSION As Int

  GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING As Int

  GL_VERTEX_ATTRIB_ARRAY_ENABLED As Int

  GL_VERTEX_ATTRIB_ARRAY_NORMALIZED As Int

  GL_VERTEX_ATTRIB_ARRAY_POINTER As Int

  GL_VERTEX_ATTRIB_ARRAY_SIZE As Int

  GL_VERTEX_ATTRIB_ARRAY_STRIDE As Int

  GL_VERTEX_ATTRIB_ARRAY_TYPE As Int

  GL_VERTEX_SHADER As Int

  GL_VIEWPORT As Int

  GL_ZERO As Int

  glAttachShader (program As Int, shader As Int)

  glBindAttribLocation (program As Int, index As Int, name As String)

  glBindBuffer (target As Int, buffer As Int)

  glBindFramebuffer (target As Int, framebuffer As Int)

  glBindRenderbuffer (target As Int, renderbuffer As Int)

  glBindTexture (target As Int, texture As Int)

  glBlendColor (red As Float, green As Float, blue As Float, alpha As Float)

  glBlendEquation (mode As Int)

  glBlendEquationSeparate (modeRGB As Int, modeAlpha As Int)

  glBlendFunc (sfactor As Int, dfactor As Int)

  glBlendFuncSeparate (srcRGB As Int, dstRGB As Int, srcAlpha As Int, dstAlpha As Int)

  glBufferData (target As Int, size As Int, data As java.nio.Buffer, usage As Int)

  glBufferSubData (target As Int, offset As Int, size As Int, data As java.nio.Buffer)

  glCheckFramebufferStatus (target As Int) As Int

  glClear (mask As Int)

  glClearColor (red As Float, green As Float, blue As Float, alpha As Float)

  glClearDepthf (depth As Float)

  glClearStencil (s As Int)

  glColorMask (red As Boolean, green As Boolean, blue As Boolean, alpha As Boolean)

  glCompileShader (shader As Int)

  glCompressedTexImage2D (target As Int, level As Int, internalformat As Int, width As Int, height As Int, border As Int, imageSize As Int, data As java.nio.Buffer)

  glCompressedTexSubImage2D (target As Int, level As Int, xoffset As Int, yoffset As Int, width As Int, height As Int, format As Int, imageSize As Int, data As java.nio.Buffer)

  glCopyTexImage2D (target As Int, level As Int, internalformat As Int, x As Int, y As Int, width As Int, height As Int, border As Int)

  glCopyTexSubImage2D (target As Int, level As Int, xoffset As Int, yoffset As Int, x As Int, y As Int, width As Int, height As Int)

  glCreateProgram As Int

  glCreateShader (type As Int) As Int

  glCullFace (mode As Int)

  glDeleteBuffers (n As Int, buffers() As Int, offset As Int)

  glDeleteFramebuffers (n As Int, framebuffers() As Int, offset As Int)

  glDeleteProgram (program As Int)

  glDeleteRenderbuffers (n As Int, renderbuffers() As Int, offset As Int)

  glDeleteShader (shader As Int)

  glDeleteTextures (n As Int, textures() As Int, offset As Int)

  glDepthFunc (func As Int)

  glDepthMask (flag As Boolean)

  glDepthRangef (zNear As Float, zFar As Float)

  glDetachShader (program As Int, shader As Int)

  glDisable (cap As Int)

  glDisableVertexAttribArray (index As Int)

  glDrawArrays (mode As Int, first As Int, count As Int)

  glDrawElements (mode As Int, count As Int, indices() As Short)

  glEnable (cap As Int)

  glEnableVertexAttribArray (index As Int)

  glFinish

  glFlush

  glFramebufferRenderbuffer (target As Int, attachment As Int, renderbuffertarget As Int, renderbuffer As Int)

  glFramebufferTexture2D (target As Int, attachment As Int, textarget As Int, texture As Int, level As Int)

  glFrontFace (mode As Int)

  glGenBuffers (n As Int, buffers() As Int, offset As Int)

  glGenerateMipmap (target As Int)

  glGenFramebuffers (n As Int, framebuffers() As Int, offset As Int)

  glGenRenderbuffers (n As Int, renderbuffers() As Int, offset As Int)

  glGenTextures (n As Int, textures() As Int, offset As Int)

  glGetActiveAttrib (program As Int, index As Int, bufsize As Int, length() As Int, lengthOffset As Int, size() As Int, sizeOffset As Int, type() As Int, typeOffset As Int, name() As Byte, nameOffset As Int)

  glGetActiveUniform (program As Int, index As Int, bufsize As Int, length() As Int, lengthOffset As Int, size() As Int, sizeOffset As Int, type() As Int, typeOffset As Int, name() As Byte, nameOffset As Int)

  glGetAttachedShaders (program As Int, maxcount As Int, count() As Int, countOffset As Int, shaders() As Int, shadersOffset As Int)

  glGetAttribLocation (program As Int, name As String) As Int

  glGetBooleanv (pname As Int, params() As Boolean, offset As Int)

  glGetBufferParameteriv (target As Int, pname As Int, params() As Int, offset As Int)

  glGetError As Int

  glGetFloatv (pname As Int, params() As Float, offset As Int)

  glGetFramebufferAttachmentParameteriv (target As Int, attachment As Int, pname As Int, params() As Int, offset As Int)

  glGetIntegerv (pname As Int, params() As Int, offset As Int)

  glGetProgramInfoLog (program As Int) As String

  glGetProgramiv (program As Int, pname As Int, params() As Int, offset As Int)

  glGetRenderbufferParameteriv (target As Int, pname As Int, params() As Int, offset As Int)

  glGetShaderInfoLog (shader As Int) As String

  glGetShaderiv (shader As Int, pname As Int, params() As Int, offset As Int)

  glGetShaderPrecisionFormat (shadertype As Int, precisiontype As Int, range() As Int, rangeOffset As Int, precision() As Int, precisionOffset As Int)

  glGetShaderSource (shader As Int, bufsize As Int, length() As Int, lengthOffset As Int, source() As Byte, sourceOffset As Int)

  glGetString (name As Int) As String

  glGetTexParameterfv (target As Int, pname As Int, params() As Float, offset As Int)

  glGetTexParameteriv (target As Int, pname As Int, params() As Int, offset As Int)

  glGetUniformfv (program As Int, location As Int, params() As Float, offset As Int)

  glGetUniformiv (program As Int, location As Int, params() As Int, offset As Int)

  glGetUniformLocation (program As Int, name As String) As Int

  glGetVertexAttribfv (index As Int, pname As Int, params() As Float, offset As Int)

  glGetVertexAttribiv (index As Int, pname As Int, params() As Int, offset As Int)

  glHint (target As Int, mode As Int)

  glIsBuffer (buffer As Int) As Boolean

  glIsEnabled (cap As Int) As Boolean

  glIsFramebuffer (framebuffer As Int) As Boolean

  glIsProgram (program As Int) As Boolean

  glIsRenderbuffer (renderbuffer As Int) As Boolean

  glIsShader (shader As Int) As Boolean

  glIsTexture (texture As Int) As Boolean

  glLineWidth (width As Float)

  glLinkProgram (program As Int)

  glPixelStorei (pname As Int, param As Int)

  glPolygonOffset (factor As Float, units As Float)

  glReadPixelBitmap (x As Int, y As Int, width As Int, height As Int) As android.graphics.Bitmap

  glReadPixels (x As Int, y As Int, width As Int, height As Int) As Int()

  glReleaseShaderCompiler

  glRenderbufferStorage (target As Int, internalformat As Int, width As Int, height As Int)

  glSampleCoverage (value As Float, invert As Boolean)

  glScissor (x As Int, y As Int, width As Int, height As Int)

  glShaderSource (shader As Int, string As String)

  glStencilFunc (func As Int, ref As Int, mask As Int)

  glStencilFuncSeparate (face As Int, func As Int, ref As Int, mask As Int)

  glStencilMask (mask As Int)

  glStencilMaskSeparate (face As Int, mask As Int)

  glStencilOp (fail As Int, zfail As Int, zpass As Int)

  glStencilOpSeparate (face As Int, fail As Int, zfail As Int, zpass As Int)

  glTexImage2D (target As Int, level As Int, bitmap As android.graphics.Bitmap, border As Int)

  glTexParameterf (target As Int, pname As Int, param As Float)

  glTexParameterfv (target As Int, pname As Int, params() As Float, offset As Int)

  glTexParameteri (target As Int, pname As Int, param As Int)

  glTexParameteriv (target As Int, pname As Int, params() As Int, offset As Int)

  glTexSubImage2D (target As Int, level As Int, xoffset As Int, yoffset As Int, bitmap As android.graphics.Bitmap)

  gluErrorString (error As Int) As String

  gluLookAt (eyeX As Float, eyeY As Float, eyeZ As Float, centerX As Float, centerY As Float, centerZ As Float, upX As Float, upY As Float, upZ As Float)

  glUniform1f (location As Int, x As Float)

  glUniform1fv (location As Int, count As Int, v() As Float, offset As Int)

  glUniform1i (location As Int, x As Int)

  glUniform1iv (location As Int, count As Int, v() As Int, offset As Int)

  glUniform2f (location As Int, x As Float, y As Float)

  glUniform2fv (location As Int, count As Int, v() As Float, offset As Int)

  glUniform2i (location As Int, x As Int, y As Int)

  glUniform2iv (location As Int, count As Int, v() As Int, offset As Int)

  glUniform3f (location As Int, x As Float, y As Float, z As Float)

  glUniform3fv (location As Int, count As Int, v() As Float, offset As Int)

  glUniform3i (location As Int, x As Int, y As Int, z As Int)

  glUniform3iv (location As Int, count As Int, v() As Int, offset As Int)

  glUniform4f (location As Int, x As Float, y As Float, z As Float, w As Float)

  glUniform4fv (location As Int, count As Int, v() As Float, offset As Int)

  glUniform4i (location As Int, x As Int, y As Int, z As Int, w As Int)

  glUniform4iv (location As Int, count As Int, v() As Int, offset As Int)

  glUniformMatrix2fv (location As Int, count As Int, transpose As Boolean, value() As Float, offset As Int)

  glUniformMatrix3fv (location As Int, count As Int, transpose As Boolean, value() As Float, offset As Int)

  glUniformMatrix4fv (location As Int, count As Int, transpose As Boolean, value() As Float, offset As Int)

  gluOrtho2D (left As Float, right As Float, bottom As Float, top As Float)

  gluPerspective (fovy As Float, aspect As Float, zNear As Float, zFar As Float)

  glUseProgram (program As Int)

  glValidateProgram (program As Int)

  glVertexAttrib1f (indx As Int, x As Float)

  glVertexAttrib1fv (indx As Int, values() As Float, offset As Int)

  glVertexAttrib2f (indx As Int, x As Float, y As Float)

  glVertexAttrib2fv (indx As Int, values() As Float, offset As Int)

  glVertexAttrib3f (indx As Int, x As Float, y As Float, z As Float)

  glVertexAttrib3fv (indx As Int, values() As Float, offset As Int)

  glVertexAttrib4f (indx As Int, x As Float, y As Float, z As Float, w As Float)

  glVertexAttrib4fv (indx As Int, values() As Float, offset As Int)

  glVertexAttribPointer (indx As Int, size As Int, normalized As Boolean, stride As Int, ptr() As Float)

  glViewport (x As Int, y As Int, width As Int, height As Int)

  Version As Double [read only]

Members description:

gActiveTexture (texture As Int)
GL_ACTIVE_ATTRIBUTE_MAX_LENGTH As Int
GL_ACTIVE_ATTRIBUTES As Int
GL_ACTIVE_TEXTURE As Int
GL_ACTIVE_UNIFORM_MAX_LENGTH As Int
GL_ACTIVE_UNIFORMS As Int
GL_ALIASED_LINE_WIDTH_RANGE As Int
GL_ALIASED_POINT_SIZE_RANGE As Int
GL_ALPHA As Int
GL_ALPHA_BITS As Int
GL_ALWAYS As Int
GL_ARRAY_BUFFER As Int
GL_ARRAY_BUFFER_BINDING As Int
GL_ATTACHED_SHADERS As Int
GL_BACK As Int
GL_BLEND As Int
GL_BLEND_COLOR As Int
GL_BLEND_DST_ALPHA As Int
GL_BLEND_DST_RGB As Int
GL_BLEND_EQUATION As Int
GL_BLEND_EQUATION_ALPHA As Int
GL_BLEND_EQUATION_RGB As Int
GL_BLEND_SRC_ALPHA As Int
GL_BLEND_SRC_RGB As Int
GL_BLUE_BITS As Int
GL_BOOL As Int
GL_BOOL_VEC2 As Int
GL_BOOL_VEC3 As Int
GL_BOOL_VEC4 As Int
GL_BUFFER_SIZE As Int
GL_BUFFER_USAGE As Int
GL_BYTE As Int
GL_CCW As Int
GL_CLAMP_TO_EDGE As Int
GL_COLOR_ATTACHMENT0 As Int
GL_COLOR_BUFFER_BIT As Int
GL_COLOR_CLEAR_VALUE As Int
GL_COLOR_WRITEMASK As Int
GL_COMPILE_STATUS As Int
GL_COMPRESSED_TEXTURE_FORMATS As Int
GL_CONSTANT_ALPHA As Int
GL_CONSTANT_COLOR As Int
GL_CULL_FACE As Int
GL_CULL_FACE_MODE As Int
GL_CURRENT_PROGRAM As Int
GL_CURRENT_VERTEX_ATTRIB As Int
GL_CW As Int
GL_DECR As Int
GL_DECR_WRAP As Int
GL_DELETE_STATUS As Int
GL_DEPTH_ATTACHMENT As Int
GL_DEPTH_BITS As Int
GL_DEPTH_BUFFER_BIT As Int
GL_DEPTH_CLEAR_VALUE As Int
GL_DEPTH_COMPONENT As Int
GL_DEPTH_COMPONENT16 As Int
GL_DEPTH_FUNC As Int
GL_DEPTH_RANGE As Int
GL_DEPTH_TEST As Int
GL_DEPTH_WRITEMASK As Int
GL_DITHER As Int
GL_DONT_CARE As Int
GL_DST_ALPHA As Int
GL_DST_COLOR As Int
GL_DYNAMIC_DRAW As Int
GL_ELEMENT_ARRAY_BUFFER As Int
GL_ELEMENT_ARRAY_BUFFER_BINDING As Int
GL_EQUAL As Int
GL_EXTENSIONS As Int
GL_FALSE As Int
GL_FASTEST As Int
GL_FIXED As Int
GL_FLOAT As Int
GL_FLOAT_MAT2 As Int
GL_FLOAT_MAT3 As Int
GL_FLOAT_MAT4 As Int
GL_FLOAT_VEC2 As Int
GL_FLOAT_VEC3 As Int
GL_FLOAT_VEC4 As Int
GL_FRAGMENT_SHADER As Int
GL_FRAMEBUFFER As Int
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME As Int
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE As Int
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE As Int
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL As Int
GL_FRAMEBUFFER_BINDING As Int
GL_FRAMEBUFFER_COMPLETE As Int
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT As Int
GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS As Int
GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT As Int
GL_FRAMEBUFFER_UNSUPPORTED As Int
GL_FRONT As Int
GL_FRONT_AND_BACK As Int
GL_FRONT_FACE As Int
GL_FUNC_ADD As Int
GL_FUNC_REVERSE_SUBTRACT As Int
GL_FUNC_SUBTRACT As Int
GL_GENERATE_MIPMAP_HINT As Int
GL_GEQUAL As Int
GL_GREATER As Int
GL_GREEN_BITS As Int
GL_HIGH_FLOAT As Int
GL_HIGH_INT As Int
GL_IMPLEMENTATION_COLOR_READ_FORMAT As Int
GL_IMPLEMENTATION_COLOR_READ_TYPE As Int
GL_INCR As Int
GL_INCR_WRAP As Int
GL_INFO_LOG_LENGTH As Int
GL_INT As Int
GL_INT_VEC2 As Int
GL_INT_VEC3 As Int
GL_INT_VEC4 As Int
GL_INVALID_ENUM As Int
GL_INVALID_FRAMEBUFFER_OPERATION As Int
GL_INVALID_OPERATION As Int
GL_INVALID_VALUE As Int
GL_INVERT As Int
GL_KEEP As Int
GL_LEQUAL As Int
GL_LESS As Int
GL_LINE_LOOP As Int
GL_LINE_STRIP As Int
GL_LINE_WIDTH As Int
GL_LINEAR As Int
GL_LINEAR_MIPMAP_LINEAR As Int
GL_LINEAR_MIPMAP_NEAREST As Int
GL_LINES As Int
GL_LINK_STATUS As Int
GL_LOW_FLOAT As Int
GL_LOW_INT As Int
GL_LUMINANCE As Int
GL_LUMINANCE_ALPHA As Int
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS As Int
GL_MAX_CUBE_MAP_TEXTURE_SIZE As Int
GL_MAX_FRAGMENT_UNIFORM_VECTORS As Int
GL_MAX_RENDERBUFFER_SIZE As Int
GL_MAX_TEXTURE_IMAGE_UNITS As Int
GL_MAX_TEXTURE_SIZE As Int
GL_MAX_VARYING_VECTORS As Int
GL_MAX_VERTEX_ATTRIBS As Int
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS As Int
GL_MAX_VERTEX_UNIFORM_VECTORS As Int
GL_MAX_VIEWPORT_DIMS As Int
GL_MEDIUM_FLOAT As Int
GL_MEDIUM_INT As Int
GL_MIRRORED_REPEAT As Int
GL_NEAREST As Int
GL_NEAREST_MIPMAP_LINEAR As Int
GL_NEAREST_MIPMAP_NEAREST As Int
GL_NEVER As Int
GL_NICEST As Int
GL_NO_ERROR As Int
GL_NONE As Int
GL_NOTEQUAL As Int
GL_NUM_COMPRESSED_TEXTURE_FORMATS As Int
GL_NUM_SHADER_BINARY_FORMATS As Int
GL_ONE As Int
GL_ONE_MINUS_CONSTANT_ALPHA As Int
GL_ONE_MINUS_CONSTANT_COLOR As Int
GL_ONE_MINUS_DST_ALPHA As Int
GL_ONE_MINUS_DST_COLOR As Int
GL_ONE_MINUS_SRC_ALPHA As Int
GL_ONE_MINUS_SRC_COLOR As Int
GL_OUT_OF_MEMORY As Int
GL_PACK_ALIGNMENT As Int
GL_POINTS As Int
GL_POLYGON_OFFSET_FACTOR As Int
GL_POLYGON_OFFSET_FILL As Int
GL_POLYGON_OFFSET_UNITS As Int
GL_RED_BITS As Int
GL_RENDERBUFFER As Int
GL_RENDERBUFFER_ALPHA_SIZE As Int
GL_RENDERBUFFER_BINDING As Int
GL_RENDERBUFFER_BLUE_SIZE As Int
GL_RENDERBUFFER_DEPTH_SIZE As Int
GL_RENDERBUFFER_GREEN_SIZE As Int
GL_RENDERBUFFER_HEIGHT As Int
GL_RENDERBUFFER_INTERNAL_FORMAT As Int
GL_RENDERBUFFER_RED_SIZE As Int
GL_RENDERBUFFER_STENCIL_SIZE As Int
GL_RENDERBUFFER_WIDTH As Int
GL_RENDERER As Int
GL_REPEAT As Int
GL_REPLACE As Int
GL_RGB As Int
GL_RGB5_A1 As Int
GL_RGB565 As Int
GL_RGBA As Int
GL_RGBA4 As Int
GL_SAMPLE_ALPHA_TO_COVERAGE As Int
GL_SAMPLE_BUFFERS As Int
GL_SAMPLE_COVERAGE As Int
GL_SAMPLE_COVERAGE_INVERT As Int
GL_SAMPLE_COVERAGE_VALUE As Int
GL_SAMPLER_2D As Int
GL_SAMPLER_CUBE As Int
GL_SAMPLES As Int
GL_SCISSOR_BOX As Int
GL_SCISSOR_TEST As Int
GL_SHADER_BINARY_FORMATS As Int
GL_SHADER_COMPILER As Int
GL_SHADER_SOURCE_LENGTH As Int
GL_SHADER_TYPE As Int
GL_SHADING_LANGUAGE_VERSION As Int
GL_SHORT As Int
GL_SRC_ALPHA As Int
GL_SRC_ALPHA_SATURATE As Int
GL_SRC_COLOR As Int
GL_STATIC_DRAW As Int
GL_STENCIL_ATTACHMENT As Int
GL_STENCIL_BACK_FAIL As Int
GL_STENCIL_BACK_FUNC As Int
GL_STENCIL_BACK_PASS_DEPTH_FAIL As Int
GL_STENCIL_BACK_PASS_DEPTH_PASS As Int
GL_STENCIL_BACK_REF As Int
GL_STENCIL_BACK_VALUE_MASK As Int
GL_STENCIL_BACK_WRITEMASK As Int
GL_STENCIL_BITS As Int
GL_STENCIL_BUFFER_BIT As Int
GL_STENCIL_CLEAR_VALUE As Int
GL_STENCIL_FAIL As Int
GL_STENCIL_FUNC As Int
GL_STENCIL_INDEX As Int
GL_STENCIL_INDEX8 As Int
GL_STENCIL_PASS_DEPTH_FAIL As Int
GL_STENCIL_PASS_DEPTH_PASS As Int
GL_STENCIL_REF As Int
GL_STENCIL_TEST As Int
GL_STENCIL_VALUE_MASK As Int
GL_STENCIL_WRITEMASK As Int
GL_STREAM_DRAW As Int
GL_SUBPIXEL_BITS As Int
GL_TEXTURE As Int
GL_TEXTURE_2D As Int
GL_TEXTURE_BINDING_2D As Int
GL_TEXTURE_BINDING_CUBE_MAP As Int
GL_TEXTURE_CUBE_MAP As Int
GL_TEXTURE_CUBE_MAP_NEGATIVE_X As Int
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y As Int
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z As Int
GL_TEXTURE_CUBE_MAP_POSITIVE_X As Int
GL_TEXTURE_CUBE_MAP_POSITIVE_Y As Int
GL_TEXTURE_CUBE_MAP_POSITIVE_Z As Int
GL_TEXTURE_MAG_FILTER As Int
GL_TEXTURE_MIN_FILTER As Int
GL_TEXTURE_WRAP_S As Int
GL_TEXTURE_WRAP_T As Int
GL_TEXTURE0 As Int
GL_TEXTURE1 As Int
GL_TEXTURE10 As Int
GL_TEXTURE11 As Int
GL_TEXTURE12 As Int
GL_TEXTURE13 As Int
GL_TEXTURE14 As Int
GL_TEXTURE15 As Int
GL_TEXTURE16 As Int
GL_TEXTURE17 As Int
GL_TEXTURE18 As Int
GL_TEXTURE19 As Int
GL_TEXTURE2 As Int
GL_TEXTURE20 As Int
GL_TEXTURE21 As Int
GL_TEXTURE22 As Int
GL_TEXTURE23 As Int
GL_TEXTURE24 As Int
GL_TEXTURE25 As Int
GL_TEXTURE26 As Int
GL_TEXTURE27 As Int
GL_TEXTURE28 As Int
GL_TEXTURE29 As Int
GL_TEXTURE3 As Int
GL_TEXTURE30 As Int
GL_TEXTURE31 As Int
GL_TEXTURE4 As Int
GL_TEXTURE5 As Int
GL_TEXTURE6 As Int
GL_TEXTURE7 As Int
GL_TEXTURE8 As Int
GL_TEXTURE9 As Int
GL_TRIANGLE_FAN As Int
GL_TRIANGLE_STRIP As Int
GL_TRIANGLES As Int
GL_TRUE As Int
GL_UNPACK_ALIGNMENT As Int
GL_UNSIGNED_BYTE As Int
GL_UNSIGNED_SHORT As Int
GL_UNSIGNED_SHORT_4_4_4_4 As Int
GL_UNSIGNED_SHORT_5_5_5_1 As Int
GL_UNSIGNED_SHORT_5_6_5 As Int
GL_VALIDATE_STATUS As Int
GL_VENDOR As Int
GL_VERSION As Int
GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING As Int
GL_VERTEX_ATTRIB_ARRAY_ENABLED As Int
GL_VERTEX_ATTRIB_ARRAY_NORMALIZED As Int
GL_VERTEX_ATTRIB_ARRAY_POINTER As Int
GL_VERTEX_ATTRIB_ARRAY_SIZE As Int
GL_VERTEX_ATTRIB_ARRAY_STRIDE As Int
GL_VERTEX_ATTRIB_ARRAY_TYPE As Int
GL_VERTEX_SHADER As Int
GL_VIEWPORT As Int
GL_ZERO As Int
glAttachShader (program As Int, shader As Int)
glBindAttribLocation (program As Int, index As Int, name As String)
glBindBuffer (target As Int, buffer As Int)
glBindFramebuffer (target As Int, framebuffer As Int)
glBindRenderbuffer (target As Int, renderbuffer As Int)
glBindTexture (target As Int, texture As Int)
glBlendColor (red As Float, green As Float, blue As Float, alpha As Float)
glBlendEquation (mode As Int)
glBlendEquationSeparate (modeRGB As Int, modeAlpha As Int)
glBlendFunc (sfactor As Int, dfactor As Int)
glBlendFuncSeparate (srcRGB As Int, dstRGB As Int, srcAlpha As Int, dstAlpha As Int)
glBufferData (target As Int, size As Int, data As java.nio.Buffer, usage As Int)
glBufferSubData (target As Int, offset As Int, size As Int, data As java.nio.Buffer)
glCheckFramebufferStatus (target As Int) As Int
glClear (mask As Int)
glClearColor (red As Float, green As Float, blue As Float, alpha As Float)
glClearDepthf (depth As Float)
glClearStencil (s As Int)
glColorMask (red As Boolean, green As Boolean, blue As Boolean, alpha As Boolean)
glCompileShader (shader As Int)
glCompressedTexImage2D (target As Int, level As Int, internalformat As Int, width As Int, height As Int, border As Int, imageSize As Int, data As java.nio.Buffer)
glCompressedTexSubImage2D (target As Int, level As Int, xoffset As Int, yoffset As Int, width As Int, height As Int, format As Int, imageSize As Int, data As java.nio.Buffer)
glCopyTexImage2D (target As Int, level As Int, internalformat As Int, x As Int, y As Int, width As Int, height As Int, border As Int)
glCopyTexSubImage2D (target As Int, level As Int, xoffset As Int, yoffset As Int, x As Int, y As Int, width As Int, height As Int)
glCreateProgram As Int
glCreateShader (type As Int) As Int
glCullFace (mode As Int)
glDeleteBuffers (n As Int, buffers() As Int, offset As Int)
glDeleteFramebuffers (n As Int, framebuffers() As Int, offset As Int)
glDeleteProgram (program As Int)
glDeleteRenderbuffers (n As Int, renderbuffers() As Int, offset As Int)
glDeleteShader (shader As Int)
glDeleteTextures (n As Int, textures() As Int, offset As Int)
glDepthFunc (func As Int)
glDepthMask (flag As Boolean)
glDepthRangef (zNear As Float, zFar As Float)
glDetachShader (program As Int, shader As Int)
glDisable (cap As Int)
glDisableVertexAttribArray (index As Int)
glDrawArrays (mode As Int, first As Int, count As Int)
glDrawElements (mode As Int, count As Int, indices() As Short)
glEnable (cap As Int)
glEnableVertexAttribArray (index As Int)
glFinish
glFlush
glFramebufferRenderbuffer (target As Int, attachment As Int, renderbuffertarget As Int, renderbuffer As Int)
glFramebufferTexture2D (target As Int, attachment As Int, textarget As Int, texture As Int, level As Int)
glFrontFace (mode As Int)
glGenBuffers (n As Int, buffers() As Int, offset As Int)
glGenerateMipmap (target As Int)
glGenFramebuffers (n As Int, framebuffers() As Int, offset As Int)
glGenRenderbuffers (n As Int, renderbuffers() As Int, offset As Int)
glGenTextures (n As Int, textures() As Int, offset As Int)
glGetActiveAttrib (program As Int, index As Int, bufsize As Int, length() As Int, lengthOffset As Int, size() As Int, sizeOffset As Int, type() As Int, typeOffset As Int, name() As Byte, nameOffset As Int)
glGetActiveUniform (program As Int, index As Int, bufsize As Int, length() As Int, lengthOffset As Int, size() As Int, sizeOffset As Int, type() As Int, typeOffset As Int, name() As Byte, nameOffset As Int)
glGetAttachedShaders (program As Int, maxcount As Int, count() As Int, countOffset As Int, shaders() As Int, shadersOffset As Int)
glGetAttribLocation (program As Int, name As String) As Int
glGetBooleanv (pname As Int, params() As Boolean, offset As Int)
glGetBufferParameteriv (target As Int, pname As Int, params() As Int, offset As Int)
glGetError As Int
glGetFloatv (pname As Int, params() As Float, offset As Int)
glGetFramebufferAttachmentParameteriv (target As Int, attachment As Int, pname As Int, params() As Int, offset As Int)
glGetIntegerv (pname As Int, params() As Int, offset As Int)
glGetProgramInfoLog (program As Int) As String
glGetProgramiv (program As Int, pname As Int, params() As Int, offset As Int)
glGetRenderbufferParameteriv (target As Int, pname As Int, params() As Int, offset As Int)
glGetShaderInfoLog (shader As Int) As String
glGetShaderiv (shader As Int, pname As Int, params() As Int, offset As Int)
glGetShaderPrecisionFormat (shadertype As Int, precisiontype As Int, range() As Int, rangeOffset As Int, precision() As Int, precisionOffset As Int)
glGetShaderSource (shader As Int, bufsize As Int, length() As Int, lengthOffset As Int, source() As Byte, sourceOffset As Int)
glGetString (name As Int) As String
glGetTexParameterfv (target As Int, pname As Int, params() As Float, offset As Int)
glGetTexParameteriv (target As Int, pname As Int, params() As Int, offset As Int)
glGetUniformfv (program As Int, location As Int, params() As Float, offset As Int)
glGetUniformiv (program As Int, location As Int, params() As Int, offset As Int)
glGetUniformLocation (program As Int, name As String) As Int
glGetVertexAttribfv (index As Int, pname As Int, params() As Float, offset As Int)
glGetVertexAttribiv (index As Int, pname As Int, params() As Int, offset As Int)
glHint (target As Int, mode As Int)
glIsBuffer (buffer As Int) As Boolean
glIsEnabled (cap As Int) As Boolean
glIsFramebuffer (framebuffer As Int) As Boolean
glIsProgram (program As Int) As Boolean
glIsRenderbuffer (renderbuffer As Int) As Boolean
glIsShader (shader As Int) As Boolean
glIsTexture (texture As Int) As Boolean
glLineWidth (width As Float)
glLinkProgram (program As Int)
glPixelStorei (pname As Int, param As Int)
glPolygonOffset (factor As Float, units As Float)
glReadPixelBitmap (x As Int, y As Int, width As Int, height As Int) As android.graphics.Bitmap
Returns the specified portion of the framebuffer as an ARGB_8888 Bitmap);
glReadPixels (x As Int, y As Int, width As Int, height As Int) As Int()
Returns an array containing the ARGB pixels in the specified area of the frame-buffer.
glReleaseShaderCompiler
glRenderbufferStorage (target As Int, internalformat As Int, width As Int, height As Int)
glSampleCoverage (value As Float, invert As Boolean)
glScissor (x As Int, y As Int, width As Int, height As Int)
glShaderSource (shader As Int, string As String)
glStencilFunc (func As Int, ref As Int, mask As Int)
glStencilFuncSeparate (face As Int, func As Int, ref As Int, mask As Int)
glStencilMask (mask As Int)
glStencilMaskSeparate (face As Int, mask As Int)
glStencilOp (fail As Int, zfail As Int, zpass As Int)
glStencilOpSeparate (face As Int, fail As Int, zfail As Int, zpass As Int)
glTexImage2D (target As Int, level As Int, bitmap As android.graphics.Bitmap, border As Int)
glTexParameterf (target As Int, pname As Int, param As Float)
glTexParameterfv (target As Int, pname As Int, params() As Float, offset As Int)
glTexParameteri (target As Int, pname As Int, param As Int)
glTexParameteriv (target As Int, pname As Int, params() As Int, offset As Int)
glTexSubImage2D (target As Int, level As Int, xoffset As Int, yoffset As Int, bitmap As android.graphics.Bitmap)
gluErrorString (error As Int) As String
Return an error string from a GL or GLU error code.
gluLookAt (eyeX As Float, eyeY As Float, eyeZ As Float, centerX As Float, centerY As Float, centerZ As Float, upX As Float, upY As Float, upZ As Float)
Define a viewing transformation in terms of an eye point, a center of view, and an up vector.
eyeX eye point X
eyeY eye point Y
eyeZ eye point Z
centerX center of view X
centerY center of view Y
centerZ center of view Z
upX up vector X
upY up vector Y
upZ up vector Z
glUniform1f (location As Int, x As Float)
glUniform1fv (location As Int, count As Int, v() As Float, offset As Int)
glUniform1i (location As Int, x As Int)
glUniform1iv (location As Int, count As Int, v() As Int, offset As Int)
glUniform2f (location As Int, x As Float, y As Float)
glUniform2fv (location As Int, count As Int, v() As Float, offset As Int)
glUniform2i (location As Int, x As Int, y As Int)
glUniform2iv (location As Int, count As Int, v() As Int, offset As Int)
glUniform3f (location As Int, x As Float, y As Float, z As Float)
glUniform3fv (location As Int, count As Int, v() As Float, offset As Int)
glUniform3i (location As Int, x As Int, y As Int, z As Int)
glUniform3iv (location As Int, count As Int, v() As Int, offset As Int)
glUniform4f (location As Int, x As Float, y As Float, z As Float, w As Float)
glUniform4fv (location As Int, count As Int, v() As Float, offset As Int)
glUniform4i (location As Int, x As Int, y As Int, z As Int, w As Int)
glUniform4iv (location As Int, count As Int, v() As Int, offset As Int)
glUniformMatrix2fv (location As Int, count As Int, transpose As Boolean, value() As Float, offset As Int)
glUniformMatrix3fv (location As Int, count As Int, transpose As Boolean, value() As Float, offset As Int)
glUniformMatrix4fv (location As Int, count As Int, transpose As Boolean, value() As Float, offset As Int)
gluOrtho2D (left As Float, right As Float, bottom As Float, top As Float)
Set up a 2D orthographic projection matrix.
gluPerspective (fovy As Float, aspect As Float, zNear As Float, zFar As Float)
Set up a perspective projection matrix.
fovy specifies the field of view angle, in degrees, in the Y direction.
aspect specifies the aspect ratio that determines the field of view in the x direction.
Aspect ratio is the ratio of x (width) to y (height).
zNear specifies the distance from the viewer to the near clipping plane (always positive).
zFar specifies the distance from the viewer to the far clipping plane (always positive).
glUseProgram (program As Int)
glValidateProgram (program As Int)
glVertexAttrib1f (indx As Int, x As Float)
glVertexAttrib1fv (indx As Int, values() As Float, offset As Int)
glVertexAttrib2f (indx As Int, x As Float, y As Float)
glVertexAttrib2fv (indx As Int, values() As Float, offset As Int)
glVertexAttrib3f (indx As Int, x As Float, y As Float, z As Float)
glVertexAttrib3fv (indx As Int, values() As Float, offset As Int)
glVertexAttrib4f (indx As Int, x As Float, y As Float, z As Float, w As Float)
glVertexAttrib4fv (indx As Int, values() As Float, offset As Int)
glVertexAttribPointer (indx As Int, size As Int, normalized As Boolean, stride As Int, ptr() As Float)
glViewport (x As Int, y As Int, width As Int, height As Int)
Version As Double [read only]
Returns the version of the library.

GLSurfaceView2

An implementation of SurfaceView that uses the dedicated surface for displaying OpenGL
rendering. A GLSurfaceView provides the following features:

Manages a surface, which is a special piece of memory that can be composited into the Android view system.
Manages an EGL display, which enables OpenGL to render into a surface.
Renders on a dedicated thread to decouple rendering performance from the UI thread.
Supports both on-demand and continuous rendering.

At present a reasonable set of drawing defaults are used to set up the GLSurfaceView.
More control may be available in a future release of this library
glFrustrumf must be called in the SurfaceChanged event to define a frustrum
otherwise the GLSurfaceView is ready to be drawn on.

Presently there is an unwanted field "ba" visible to Basic4android. Ignore this field.
This field appears due to a feature (bug?) in the Basic4android documentation doclet.

This view raises the following three events all of which run on a separate rendering thread
and NOT on the main thread of the application. Because of this cosw running in these events
must no attempt to manipulate GUI elements. The RunOnGuiThread method can be used to
invoke a Sub to tun on the main thread and QueueEvent used to invoke a Sub to run on the
rendering thread.

SurfaceCreated
Called when the surface is created or recreated.
Called when the rendering thread starts and whenever the EGL context is lost.
The EGL context will typically be lost when the Android device awakes after going to sleep.
Since this method is called at the beginning of rendering, as well as every time the EGL
context is lost, this method is a convenient place to put code to create resources that need
to be created when the rendering starts, and that need to be recreated when the EGL context is lost.
Textures are an example of a resource that you might want to create here.
Note that when the EGL context is lost, all OpenGL resources associated with that context will be
automatically deleted. You do not need to call the corresponding "glDelete" methods such as
glDeleteTextures to manually delete these lost resources.

SurfaceChanged
Called when the surface has changed size.
Called after the surface is created and whenever the OpenGL ES surface size changes.
Typically you will set your viewport here. If your camera is fixed then you could also set your
projection matrix here

Draw
Called to draw the current frame.
This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

Click
LongClick
Draw(gl As GL1) 'The view wants to be drawn using the supplied GL10
SurfaceChanged(gl As GL1, width As Int, height As Int) 'Called when the surface has changed size.
SurfaceCreated(gl As GL1) 'Called when the surface is created or recreated.

Members:


  ba As BA

  Background As android.graphics.drawable.Drawable

  BringToFront

  Color As Int [write only]

  DEBUG_CHECK_GL_ERROR As Int

  DEBUG_LOG_GL_CALLS As Int

  DebugFlags As Int

  DeviceAPILevel As Int

  Enabled As Boolean

  Height As Int

  Initialize (RenderMode As Int, EventName As String)

  Initialize2 (RenderMode As Int, EventName As String, depthSize As Int, stencilSize As Int)

  Invalidate

  Invalidate2 (arg0 As android.graphics.Rect)

  Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  IsInitialized As Boolean

  Left As Int

  Pause

  QueuedEventException As Exception

  QueueEvent (eventname As String, params() As Object) As Boolean

  RemoveView

  RenderMode As Int

  RENDERMODE_CONTINUOUSLY As Int

  RENDERMODE_WHEN_DIRTY As Int

  RequestFocus As Boolean

  RequestRender

  Resume

  RunOnGuiThread (sub As String, params() As Object) As Boolean

  SendToBack

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

  SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  Tag As Object

  Top As Int

  Visible As Boolean

  Width As Int

Members description:

ba As BA
Background As android.graphics.drawable.Drawable
BringToFront
Color As Int [write only]
DEBUG_CHECK_GL_ERROR As Int
Check glError() after every GL call and throw an exception if glError indicates that an error has occurred. This can be used to help track down which OpenGL ES call is causing an error.
DEBUG_LOG_GL_CALLS As Int
Log GL calls to the system log at "verbose" level with tag "GLSurfaceView".
DebugFlags As Int
Get or set the debug flags to a new value.
The value is constructed by OR-together zero or more of the DEBUG_CHECK_* constants.
The debug flags take effect whenever a surface is created.
The default value is zero.
DeviceAPILevel As Int
Returns the API level supported by the device as an integer value.
OpenGL2 is only supported by API level 8 (FROYO) devices or later.
Enabled As Boolean
Height As Int
Initialize (RenderMode As Int, EventName As String)
Initializes the GLSurfaceView in the specified render mode installing a config chooser
which will choose a config as close to 16-bit RGB as possible, with a depth buffer as
close to 16-bits as possible.

Calls SetEGLConfigChooser(true);
Initialize2 (RenderMode As Int, EventName As String, depthSize As Int, stencilSize As Int)
Initializes the GLSurfaceView in the specified render mode installing a config chooser
which will choose a config with 8bit RGBA with the specified depth size and stencil size.

Calls SetEGLConfigChooser(8, 8, 8, 8, depthSize, stencilSize);
Invalidate
Invalidate2 (arg0 As android.graphics.Rect)
Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
IsInitialized As Boolean
Left As Int
Pause
Inform the view that the activity is paused.
The owner of this view must call this method when the activity is paused.
Calling this method will pause the rendering thread.
Must not be called before a renderer has been set.
QueuedEventException As Exception
If an uncaught exception occurs when running a queued event it is saved here
because an uncaught exception on a non-main thread will close the application.
QueueEvent (eventname As String, params() As Object) As Boolean
Queue a Sub to be run on the GL rendering thread.
This can be used to communicate with the Renderer on the rendering thread and
safely run non-atomic functions without any further thread synchronisation.
Using this method to update data used while rendering ensures that the data will
only be changed when rendering is not occurring,.
If an uncaught exception occurs when running the event it is saved in the
QueuedEventException property.
RemoveView
RenderMode As Int
Gets or sets the rendering mode.
When renderMode is RENDERMODE_CONTINUOUSLY, the renderer is called repeatedly
to re-render the scene. When renderMode is RENDERMODE_WHEN_DIRTY, the scene
is only rendered when the surface is created, or when requestRender() is called.
Defaults to RENDERMODE_CONTINUOUSLY.

Using RENDERMODE_WHEN_DIRTY can improve battery life and overall system performance
by allowing the GPU and CPU to idle when the view does not need to be updated.

This method can only be called after setRenderer(Renderer)
RENDERMODE_CONTINUOUSLY As Int
The renderer is called continuously to re-render the scene.
RENDERMODE_WHEN_DIRTY As Int
The renderer only renders when the surface is created, or when requestRender() is called.
RequestFocus As Boolean
RequestRender
Request that the renderer render a frame.
This method is typically used when the render mode has been set to RENDERMODE_WHEN_DIRTY,
so that frames are only rendered on demand.
May be called from any thread.
Must not be called before a renderer has been set.
Resume
Inform the view that the activity is resumed.
The owner of this view must call this method when the activity is resumed.
Calling this method will recreate the OpenGL display and resume the rendering thread.
Must not be called before a renderer has been set.
RunOnGuiThread (sub As String, params() As Object) As Boolean
Causes the specified Sub to be scheduled for execution on the main GUI thread.
This mechanism is the only way a thread can access GUI items. This call returns
immediately. If it is necessary for the thread to wait for the result of the
GUI operation then it should wait on a Lock that will be reset by the called Sub
after it haas completed the GUI operation. Sometimes it seems that if the user
presses the back button, and maybe in other scenarions, then Android loses the
message and the GUI thread doesn't get it and the Sub isn't run and the Lock
isn't freed so it may be advisable in this case to use WaitFor with a reasonably
long timeout and retry until it returns True.

Returns True if the Sub was found otherwise returns False.
SendToBack
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
Tag As Object
Top As Int
Visible As Boolean
Width As Int

Matrix2

This Matrix object operates on OpenGL ES format matrices and vectors stored in float arrays.

Matrices are 4 x 4 column-vector matrices stored in column-major order:
m[offset + 0] m[offset + 4] m[offset + 8] m[offset + 12]
m[offset + 1] m[offset + 5] m[offset + 9] m[offset + 13]
m[offset + 2] m[offset + 6] m[offset + 10] m[offset + 14]
m[offset + 3] m[offset + 7] m[offset + 11] m[offset + 15]

Vectors are 4 row x 1 column column-vectors stored in order:
v[offset + 0] v[offset + 1] v[offset + 2] v[offset + 3]

More than one matrix or vector may be in an array. The offset parameter defines the location
of the required item in the array.

Events:

None

Members:


  FrustumM (m() As Float, offset As Int, left As Float, right As Float, bottom As Float, top As Float, near As Float, far As Float)

  InvertM (mInv() As Float, mInvOffset As Int, m() As Float, mOffset As Int) As Boolean

  Length (x As Float, y As Float, z As Float) As Float

  MultiplyMM (result() As Float, resultOffset As Int, lhs() As Float, lhsOffset As Int, rhs() As Float, rhsOffset As Int)

  MultiplyMV (resultVec() As Float, resultVecOffset As Int, lhsMat() As Float, lhsMatOffset As Int, rhsVec() As Float, rhsVecOffset As Int)

  OrthoM (m() As Float, mOffset As Int, left As Float, right As Float, bottom As Float, top As Float, near As Float, far As Float)

  RotateM (m() As Float, mOffset As Int, a As Float, x As Float, y As Float, z As Float)

  RotateM2 (rm() As Float, rmOffset As Int, m() As Float, mOffset As Int, a As Float, x As Float, y As Float, z As Float)

  ScaleM (m() As Float, mOffset As Int, x As Float, y As Float, z As Float)

  ScaleM2 (sm() As Float, smOffset As Int, m() As Float, mOffset As Int, x As Float, y As Float, z As Float)

  SetIdentityM (sm() As Float, smOffset As Int)

  SetRotateEulerM (rm() As Float, rmOffset As Int, x As Float, y As Float, z As Float)

  SetRotateM (rm() As Float, rmOffset As Int, a As Float, x As Float, y As Float, z As Float)

  TranslateM (m() As Float, mOffset As Int, x As Float, y As Float, z As Float)

  TranslateM2 (tm() As Float, tmOffset As Int, m() As Float, mOffset As Int, x As Float, y As Float, z As Float)

  TransposeM (mTrans() As Float, mTransOffset As Int, m() As Float, mOffset As Int)

Members description:

FrustumM (m() As Float, offset As Int, left As Float, right As Float, bottom As Float, top As Float, near As Float, far As Float)
Define a projection matrix in terms of six clip planes.

Parameters
m the float array that holds the perspective matrix
offset the offset into float array m where the perspective matrix data is written
InvertM (mInv() As Float, mInvOffset As Int, m() As Float, mOffset As Int) As Boolean
Inverts a 4 x 4 matrix into another matrix.

Parameters
mInv the array that holds the output inverted matrix
mInvOffset an offset into mInv where the inverted matrix is stored.
m the input array
mOffset an offset into m where the matrix is stored.

Returns
true if the matrix could be inverted, false if it could not.
Length (x As Float, y As Float, z As Float) As Float
Computes the length of a vector.
MultiplyMM (result() As Float, resultOffset As Int, lhs() As Float, lhsOffset As Int, rhs() As Float, rhsOffset As Int)
Multiply two 4x4 matrices together and store the result in a third 4x4 matrix.
In matrix notation: result = lhs x rhs. Due to the way matrix multiplication works,
the result matrix will have the same effect as first multiplying by the rhs matrix,
then multiplying by the lhs matrix. This is the opposite of what you might expect.
The same float array may be passed for result, lhs, and/or rhs.
However, the result element values are undefined if the result elements overlap either
the lhs or rhs elements.

Parameters
result The float array that holds the result.
resultOffset The offset into the result array where the result is stored.
lhs The float array that holds the left-hand-side matrix.
lhsOffset The offset into the lhs array where the lhs is stored.
rhs The float array that holds the right-hand-side matrix.
rhsOffset The offset into the rhs array where the rhs is stored.
MultiplyMV (resultVec() As Float, resultVecOffset As Int, lhsMat() As Float, lhsMatOffset As Int, rhsVec() As Float, rhsVecOffset As Int)
Multiply a 4 element vector by a 4x4 matrix and store the result in a 4 element column vector.
In matrix notation: result = lhs x rhs The same float array may be passed for resultVec, lhsMat,
and/or rhsVec. However, the resultVec element values are undefined if the resultVec elements
overlap either the lhsMat or rhsVec elements.

Parameters
resultVec The float array that holds the result vector.
resultVecOffset The offset into the result array where the result vector is stored.
lhsMat The float array that holds the left-hand-side matrix.
lhsMatOffset The offset into the lhs array where the lhs is stored.
rhsVec The float array that holds the right-hand-side vector.
rhsVecOffset The offset into the rhs vector where the rhs vector is stored.
OrthoM (m() As Float, mOffset As Int, left As Float, right As Float, bottom As Float, top As Float, near As Float, far As Float)
Computes an orthographic projection matrix.

Parameters
m source matrix.
mOffset index into m where the matrix starts.
a angle to rotate in degrees.
x scale factor x.
y scale factor y.
z scale factor z.
RotateM (m() As Float, mOffset As Int, a As Float, x As Float, y As Float, z As Float)
Rotates matrix m in place by angle a (in degrees) around the axis (x, y, z).

Parameters
rm returns the result.
rmOffset index into rm where the result matrix starts.
m source matrix.
mOffset index into m where the source matrix starts.
a angle to rotate in degrees.
x scale factor x.
y scale factor y.
z scale factor z.
RotateM2 (rm() As Float, rmOffset As Int, m() As Float, mOffset As Int, a As Float, x As Float, y As Float, z As Float)
Rotates matrix m by angle a (in degrees) around the axis (x, y, z) to another matrix.

Parameters
rm returns the result.
rmOffset index into rm where the result matrix starts.
m source matrix.
mOffset index into m where the source matrix starts.
a angle to rotate in degrees.
x scale factor x.
y scale factor y.
z scale factor z.
ScaleM (m() As Float, mOffset As Int, x As Float, y As Float, z As Float)
Scales matrix m in place by x, y, and z.

Parameters
m matrix to scale.
mOffset index into m where the matrix starts.
x scale factor x.
y scale factor y.
z scale factor z.
ScaleM2 (sm() As Float, smOffset As Int, m() As Float, mOffset As Int, x As Float, y As Float, z As Float)
Scales matrix m by x, y, and z, putting the result in sm.

Parameters
sm returns the result.
smOffset index into sm where the result matrix starts.
m source matrix.
mOffset index into m where the source matrix starts.
x scale factor x.
y scale factor y.
z scale factor z.
SetIdentityM (sm() As Float, smOffset As Int)
Sets matrix m to the identity matrix.

Parameters
m returns the result.
mOffset index into m where the result matrix starts.
SetRotateEulerM (rm() As Float, rmOffset As Int, x As Float, y As Float, z As Float)
Converts Euler angles x, y, z to a rotation matrix.

Parameters
rm returns the result.
rmOffset index into rm where the result matrix starts.
x angle of rotation, in degrees.
y angle of rotation, in degrees.
z angle of rotation, in degrees.
SetRotateM (rm() As Float, rmOffset As Int, a As Float, x As Float, y As Float, z As Float)
Rotates matrix m by angle a (in degrees) around the axis (x, y, z).
Parameters
rm returns the result.
rmOffset index into rm where the result matrix starts.
x scale factor x.
y scale factor y.
z scale factor z.
TranslateM (m() As Float, mOffset As Int, x As Float, y As Float, z As Float)
Translates matrix m by x, y, and z in place.

Parameters
m matrix.
mOffset index into m where the matrix starts.
x translation factor x.
y translation factor y.
z translation factor z.
TranslateM2 (tm() As Float, tmOffset As Int, m() As Float, mOffset As Int, x As Float, y As Float, z As Float)
Translates matrix m by x, y, and z, putting the result in tm.

Parameters
tm returns the result.
tmOffset index into sm where the result matrix starts.
m source matrix.
mOffset index into m where the source matrix starts.
x translation factor x.
y translation factor y.
z translation factor z.
TransposeM (mTrans() As Float, mTransOffset As Int, m() As Float, mOffset As Int)
Transposes a 4 x 4 matrix.

Parameters
mTrans the array that holds the output inverted matrix.
mTransOffset an offset into mInv where the inverted matrix is stored.
m the input array.
mOffset an offset into m where the matrix is stored.

Visibility2

A collection of utility methods for computing the visibility of triangle meshes.

Events:

None

Members:


  computeBoundingSphere (positions() As Float, positionsOffset As Int, positionsCount As Int, sphere() As Float, sphereOffset As Int)

  frustumCullSpheres (mvp() As Float, mvpOffset As Int, spheres() As Float, spheresOffset As Int, spheresCount As Int, results() As Int, resultsOffset As Int, resultsCapacity As Int) As Int

  visibilityTest (ws() As Float, wsOffset As Int, positions() As Float, positionsOffset As Int, indices() As Char, indicesOffset As Int, indexCount As Int) As Int

Members description:

computeBoundingSphere (positions() As Float, positionsOffset As Int, positionsCount As Int, sphere() As Float, sphereOffset As Int)
Compute a bounding sphere for a set of points.
It is approximately the minimal bounding sphere of an axis-aligned box that bounds the points.

Parameters
positions positions in x, y, z triples
positionsOffset offset into positions array
positionsCount number of position triples to process
sphere array containing the output as (x, y, z, r)
sphereOffset offset where the sphere data will be written
frustumCullSpheres (mvp() As Float, mvpOffset As Int, spheres() As Float, spheresOffset As Int, spheresCount As Int, results() As Int, resultsOffset As Int, resultsCapacity As Int) As Int
Given an OpenGL ES ModelView-Projection matrix (which implicitly describes a frustum)
and a list of spheres, determine which spheres intersect the frustum.

A ModelView-Projection matrix can be computed by multiplying a Projection matrix by
a ModelView matrix (in that order.). There are several possible ways to obtain the current
ModelView and Projection matrices. The most generally applicable way is to keep track of the
current matrices in application code. If that is not convenient, there are two optional
OpenGL ES extensions which may be used to read the current matrices from OpenGL ES:

GL10 - Ext.glQueryMatrixxOES
GL11 - GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES and
GL11 - GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES

The problem with reading back the matrices is that your application will only work with devices
that support the extension(s) that it uses.

A frustum is a six-sided truncated pyramid that defines the portion of world space that is visible in the view.

Spheres are described as four floating point values: x, y, z, and r, in world-space coordinates.
R is the radius of the sphere.

Parameters
mvp a float array containing the mode-view-projection matrix
mvpOffset The offset of the mvp data within the mvp array.
spheres a float array containing the sphere data.
spheresOffset an offset into the sphere array where the sphere data starts
spheresCount the number of spheres to cull.
results an integer array containing the indices of the spheres that are either contained entirely within or intersect the frustum.
resultsOffset an offset into the results array where the results start.
resultsCapacity the number of array elements available for storing results.

Returns
the number of spheres that intersected the frustum. Can be larger than resultsCapacity,
in which case only the first resultsCapacity results are written into the results array.
visibilityTest (ws() As Float, wsOffset As Int, positions() As Float, positionsOffset As Int, indices() As Char, indicesOffset As Int, indexCount As Int) As Int
Test whether a given triangle mesh is visible on the screen.
The mesh is specified as an indexed triangle list.

Parameters
ws the world space to screen space transform matrix, as an OpenGL column matrix.
wsOffset an index into the ws array where the data starts.
positions the vertex positions (x, y, z).
positionsOffset the index in the positions array where the data starts.
indices the indices of the triangle list. The indices are expressed as chars because they are unsigned 16-bit values.
indicesOffset the index in the indices array where the index data starts.
indexCount the number of indices in use. Typically a multiple of three. If not a multiple of three, the remaining one or two indices will be ignored.

Returns
2 if all of the mesh is visible, 1 if some part of the mesh is visible, 0 if no part is visible.
Top