Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended practice environment for OpenGL ES 2.0?

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.

like image 1000
Petteri H Avatar asked Apr 09 '11 16:04

Petteri H


2 Answers

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 the xxxViewController.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.

like image 90
Brad Larson Avatar answered Oct 02 '22 00:10

Brad Larson


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.

like image 28
trenki Avatar answered Oct 02 '22 02:10

trenki