penGL has long been a standard interface for 3D graphics development. Developed by SGI, its only real competitor today is Microsoft's Direct3D. Unfortunately, until recently there's been no mobile analogue to OpenGL. Developers have had to either port their own 3D engines from one platform to another, or improvise with platform-specific interfaces and pay the price while porting applications. OpenGL ES, a version of the OpenGL standard for embedded devices, stands to change all this. As an open standard supported by the Khronos Group
, it is already available for BREW, Symbian, and Linux. This article describes how to get your environment set up for OpenGL ES development in BREW, as well as introduces you to the basic concepts you need in order to get started.
Setup and Installation
If you're new to BREW, the first thing you should do is peruse the articles in Related Resources to come up to speed on the programming environment. BREW is an event-driven, single-threaded, component-oriented environment in which you write code in C or C++ against system interfaces; it's similar in many ways to platforms such as Palm OS, although the component orientation reminds some of Windows COM development. If you're new to OpenGL, you should check out a brief tutorial, or better yet, OpenGL ES.
There's no support for OpenGL in the base BREW emulator. Instead, you need to download the BREW SDK Extension for OpenGL ES for the BREWSDK. You'll get a .zip file with files you need to manually install as follows:
- Files in the inc directory need to go into your BREW SDK's inc directory (or else you will need to include a reference to this directory in your project's include paths).
- Files in the src directory need to go into your BREW SDK's src directory, or to another common location.
- The DLL from the BREW 3.x directory will need to go into the SDK's bin\modules directory.
- You can put the phone skin wherever you like.
In a similar vein, it's important to realize that not every handset presently has support for OpenGL ES. Generally, handsets will need to be built upon the MSM6550 chipset or later, and must also have the appropriate extensions to the BREW runtime in ROM. To see if a specific handset has support for OpenGL ES, check the data sheet for that handset.