Naming conventions

The naming conventions for OpenGL® ES methods are the same as those for standard OpenGL®. For example:

  • javax.microedition.khronos.opengles.GL10.glClear(int mask)
  • javax.microedition.khronos.opengles.GL10.glLoadMatrixf(FloatBuffer m)

Fixed-point methods are named with an x suffix. For example:

  • javax.microedition.khronos.opengles.GL10.glLoadMatrixx(IntBuffer m)

Constants are named using the same syntax and values as standard OpenGL. For example:

  • javax.microedition.khronos.opengles.GL10.GL_TEXTURE0

Data type mappings

Table 1. Type mappings

Native data type

Java data type

All 8-bit integral types

byte

All 16-bit integral types

short

All 32-bit integral types

int

All 32-bit float types

float

Table 2. Pointer mappings

Native pointer

Java class

void*

java.nio.Buffer

int*

java.nio.IntBuffer

float*

java.nio.FloatBuffer

Previous topic: 3-D math utilities

Was this information helpful? Send us your comments.