Graphics Reference
In-Depth Information
Table 1-1
EGL Data Types
Data Type
C-Language Type
EGL Type
32-bit integer
int
EGLint
32-bit unsigned integer
unsignedint
EGLBoolean, EGLenum
Pointer
void *
EGLConfig,
EGLContext,
EGLDisplay,
EGLSurface,
EGLClientBuffer
OpenGL ES Command Syntax
All OpenGL ES commands begin with the prefix gl and use an initial capital
letter for each word making up the command name (e.g., glBlendEquation ).
Similarly, OpenGL ES data types also begin with the prefix GL .
In addition, some commands might take arguments in different flavors.
The flavors or types vary in terms of the number of arguments taken
(one to four arguments), the data type of the arguments used (byte [ b ],
unsigned byte [ ub ], short [ s ], unsigned short [ us ], int [ i ], and float [ f ]),
and whether the arguments are passed as a vector ( v ). A few examples of
command flavors allowed in OpenGL ES follow.
The following two commands are equivalent except that one specifies the
uniform value as floats and the other as integers:
glUniform2f(location, l.Of, O.Of);
glUniform2i(location, 1, 0)
The following lines describe commands that are also equivalent, except
that one passes command arguments as a vector and the other does not:
GLfloat coord[4] = { l.Of, 0.75f, 0.25f, O.Of };
glUniform4fv(location, coord);
glUniform4f(location, coord[0], coord[l], coord[2], coord[3]);
Table 1-2 describes the command suffixes and argument data types used in
OpenGL ES.
Finally, OpenGL ES defines the type GLvoid . This type is used for OpenGL
ES commands that accept pointers.
In the rest of this topic, OpenGL ES commands are referred to by their base
names only, and an asterisk is used to indicate that this base name refers
 
 
 
Search WWH ::




Custom Search