I decided to learn some OpenGL ES 2.0 and I am trying to pick a practice platform for it. What comes to possible target platform, it could be Android, iPhone or WebGL. But I don't want to spend too much time and effort to get the environment setup properly.
Would you recommend WebGL for a fast start to OpenGL ES 2.0 learning or something else?
Edit: I am using Mac and I am not really interested in ES 1.x at the moment.
I suggest you download and setup the Khronos OpenGL ES 2.0 SDKs for POWERVR SGX PC Emulation package (Unfortunately you have to register to be able to download). This allows you to get everything up and running on a desktop computer which will make your life a lot easier when it comes to debugging. You can then use C/C++ to develop your OpenGL ES 2.0 applications.
If I'm not mistaken my Android phone (Samsung Galaxy S) also uses this OpenGL implementation.
Instead of using the Khronos SDK you could also use the OpenGL ES 2.0 libraries from the Mesa3D Project (Ubuntu has them in the repository). They work fine but I can't recommend them because I already ran into a situation where the results differed from the Khronos SDK implementation and my Android device.
EDIT: You also have to create a Window and an OpenGL rendering context in order to actually use OpenGL. For that I can recommend SDL (1.3) which also has an official port for Android. I tested it on Android and Ubuntu with the mentioned SDK. It allows me to use the same code for both.
If you register as a developer at the iOS Developer Center (free), you can download Xcode and the iOS SDK (again, for free when you get Xcode 3), which includes a simulator capable of OpenGL ES 2.0. This of course assumes you have a Mac to run that all on.
Once you have the SDK, you can simply start up Xcode and create a new application based on the OpenGL ES Application template. This application will be a fully functional OpenGL ES 1.1 and 2.0 iOS application that you can build and run in the simulator. You can ignore all of the iOS-specific setup code and focus on the
-drawFrame
method in thexxxViewController.m
class, which is where the OpenGL ES 2.0 drawing code lies.This can be a pretty quick environment to set up for playing with OpenGL ES 2.0 shaders. I've also tried out the PowerVR SDK package that trenki suggests, and it is a little more involved to get something set up with that. If you're on Windows, it will be a lot more viable of a solution than the Mac-based iOS SDK I describe here.
One other shader development tool that can come in handy for prototyping on the Mac is Quartz Composer. It comes along with Xcode, and provides a visual prototyping environment for all sorts of effects, including OpenGL shaders. I demonstrate an example of doing this kind of prototyping in an article I wrote here. Desktop GLSL and the implementation in OpenGL ES differs slightly, but much is the same between the two.
While targeted at iOS, I taught a class on OpenGL ES 2.0 recently as part of a course that can be downloaded from iTunes U for free. It might helpful in getting up to speed on shaders.
If you want to learn OpenGL ES and have a mac I suggest this book:
http://iphone-3d-programming.labs.oreilly.com/ (You can read it from the web, or buy it, I think it is worth it)
Besides the OpenGL itself it explains some of the mathematics and it shows the OpenGL ES 1.1 and 2.0 way for all examples.
(Depending of what you want to do sometimes 1.1 is much easier and suites better.. in 2.0 you always need shaders even if you only want to draw a single triangle.)
If its for game developing try using a framework, this way you don't have to do the baby steps yourself :-).
Here are some to get you started ( i prefer the android ones :-) ) :
Android
- Min3d
- Libgdx
- AndEngine
iPhone
- Cocos2d
- Sparrow
WebGL
- Tutorial
- glge
Since the Raspberry Pi supports hardware accelerated OpenGL ES 2.0, and is quite inexpensive, it would make a good platform, for testing if not actual development. It's basically a last generation smartphone, without the phone bits. If you install a Linux distro on it (e.g. Debian) you are ready to program on it out of the box. Since it's a learning platform, it's well suited for the purpose. You won't be alone, many are dipping their toes into Open GL ES on it.