ABSTRACT

We recognize two steps in the process to reduce the complexity of this task. The first is to write OpenGL agnostic code, meaning that the code encapsulates the platform-and OpenGL version-specific details into classes that are fully transparent to any combination of platform and OpenGL version. The second method is to use a metabuild system that wraps all that code into a usable project for many different IDEs on many different platforms. Each platform comes with its own set of APIs for creating a window to draw. Some of these APIs support OpenGL ES for embedded systems, even on nonembedded desktop platforms such as the iPad simulator on OS X, while some only support the OpenGL version that is enabled by the OpenGL drivers on that platform. Different OpenGL implementations on various platforms can be seen in Table 44.1. A complete list can be found on the OpenGL.org website [Khronos 97]. A completely different way of achieving the same goal is to use JavaScript with WebGL and is described in detail in Chapter 3. In this article we will focus on C++/Objective-C.