Wednesday, October 21, 2009

How to Get Started with OpenGL ES 2.0

OpenGL ES 2.0 is coming to DTV. Like Java before it, learning OpenGL ES will become a necessary part of programming in the DTV world. However, its not easy, even for old OpenGL programmers like me. As already noted in a previous article, it is very different in philosophy from even OpenGL ES 1.x. Secondly, its not easy to write code for an embedded environment without having that device. Fortunately AMD have solved that problem. Here then are the steps to setting up and beginning to learn OpenGL ES 2.x.

Prerequisites
  1. A windows based PC, with an AMD/ATi graphics card. Nvidia or Intel platforms may work but are untested.
  2. Knowing how to program in C or C++
  3. Experience with projects and IDEs
Installation
  1. Install the latest catalyst drivers or equivalent for your card
  2. Install Visual Studio Express C++ from Microsoft
  3. Install the AMD OpenGL ES 2.0 Emulator If you are not already an AMD registered developer, you will need to do so but its free and painless.
First OpenGL ES 2.0 Program
The emulator from AMD comes with a single sample that draws a textured triangle (and carefully avoids rotating it ;-). Simply go to the install directory (which can be done from your start menu) and click on the project file. Build the project and run. You should see something like this (click to enlarge):


Going Further

In a later article I'll cover getting started with OpenGL-ES 1.x. Whilst phones and mobile devices are surging ahead into ES 2.x, its is possible that DTV will remain in the 1.x world for a while. The future is a little unclear and unfortunately though the languages are similar, they are conceptually different in approach. The vast majority of OGL-ES devices in the world will run EGL 2.x of course but I have this suspision that due to the status of of OpenGL implementations in DTV and the fact that some companies are beginning to use whats out there already, we will see OpenGL 1.x quite popular in DTV at least for a couple of years.

No comments:

Post a Comment