Graphics Reference
In-Depth Information
To write any OpenGL ES 3.0 application, you need to know which header
files must be included and with which libraries your application needs to
link. It is also useful to understand the syntax used by the EGL and GL
command names and command parameters.
OpenGL ES 3.0 applications need to link with the following libraries: the
OpenGL ES 3.0 library named
libGLESv2.lib
and the EGL library named
libEGL.lib
.
OpenGL ES 3.0 applications also need to include the appropriate ES 3.0
and EGL header files. The following include files must be included by any
OpenGL ES 3.0 application:
#include <EGL/egl.h>
#include <GLES3/gl3.h>
egl.h
is the EGL header file and
gl3.h
is the OpenGL ES 3.0 header file.
Applications can optionally include
gl2ext.h
, which is the header file that
describes the list of Khronos-approved extensions for OpenGL ES 2.0/3.0.
The header file and library names are platform dependent. The OpenGL
ES working group has tried to define the library and header names and
indicate how they should be organized, but this arrangement might not
be found on all OpenGL ES platforms. Developers should, however, refer
to the platform vendor's documentation for information on how the
libraries and include files are named and organized. The official OpenGL
ES header files are maintained by Khronos and available from
http://
khronos.org/registry/gles/.
The sample code for the topic also includes a
copy of the header files (working with the sample code is described in the
next chapter).
All EGL commands begin with the prefix
egl
and use an initial
capital letter for each word making up the command name (e.g.,
eglCreateWindowSurface
). Similarly, EGL data types also begin with the
prefix
Egl
and use an initial capital letter for each word making up the
type name, except for
EGLint
and
EGLenum
.
Table 1-1 briefly describes the EGL data types used.