The Khronos Group is also responsible for two additional standards that are tied to OpenGL: OpenGL ES, and the EGL Native Platform Graphics Interface (known simply as "EGL"). As we mentioned, OpenGL ES is a smaller version of OpenGL intended for embedded systems. While we are on the subject of embedded systems, let us point out that the Java Community Process is also developing an object-oriented abstraction for OpenGL for mobile devices called Mobile 3D Graphics API (M3G). We will briefly give you an introduction to M3G in the subsection "M3G: Another Java ME 3D Graphics Standard."

The EGL standard needs some explanation. It's essentially an enabling interface between the underlying operating system and the rendering APIs offered by OpenGL ES. Because OpenGL and OpenGL ES are general-purpose interfaces for drawing, each operating system needs to provide a standard hosting environment for OpenGL and OpenGL ES to interact with. You will get to know this need in practical terms later in the chapter, when we use the EGL APIs in our examples.

Let's come back to OpenGL ES. The target devices for OpenGL ES include cell phones, appliances, and even vehicles. Because OpenGL ES has to be much smaller than OpenGL, many convenient functions have been removed. Drawing rectangles is not directly supported in OpenGL ES, for example; you have to draw two triangles to make a rectangle.

As you start exploring Android's support for OpenGL, you'll focus primarily on OpenGL ES and its bindings to the Android OS through Java and EGL. You can find the documentation (man pages) for OpenGL ES here:

We kept returning to this reference as we developed this chapter, because it identifies and explains each OpenGL ES API and describes the arguments for each. You'll find these APIs similar to Java APIs, and you'll get introduced to some of them in this chapter.

0 0

Post a comment