views:

4348

answers:

9

What is the quickest way to come up to speed on OpenGL ES 1.x?

Let's assume I know nothing about OpenGL (which is not entirely true, but it's been a while since I last used OpenGL). I am most interested in learning this for iPhone-related development, but I'm interested in learning how it works on other platforms as well.

I've found the book OpenGL ES 2.0 Programming Guide, but I am concerned that it might not be the best approach because it focuses on 2.0 rather than 1.x. My understanding is that 2.0 is not backwards-compatible with 1.x, so I may miss out on some important concepts.

Note: For answers about learning general OpenGL, see http://stackoverflow.com/questions/62540/learning-opengl


Some resources I've found:

+6  A: 

There is some documentation in iPhone SDK itself.

Other than that, just take what you know about OpenGL (or learn that via other means), and forget about all things that are "old cruft" (display lists, immediate mode, things that are in OpenGL but are not directly related to just drawing triangles). Basically, unlearn everything that has been declared deprecated in OpenGL 3.0.

GL ES 1.x is for pretty simple devices. What you have is a way to draw geometry (vertex buffers), manage textures and setup some fixed function state (lighting, texture combiners). That's pretty much all there is to it.

NeARAZ
+2  A: 

After spending quite a lot of time developing 3D I came to realize that in most cases the best way is to learn by examples and advance with them as you go.

Start by setting to yourself a goal to achieve (for example - implementing a particles system. this includes usage of blending modes, textures, vertex colors, batching and transformations), and then go and start with the simplest element - drawing and rotating a quad. From there go on and add textures, add more quads, etc... While doing that you'd need some info about the syntax - this you can find in many books, but the best (very boring) source is the specification committee publication that can be found here: http://www.khronos.org/opengles/spec/

Even with that you'd bump into many problems, well, once you have a problem go to your best friend in these situations: demos and examples!
You can find many examples sources for the iPhone online and at the apple site so download them, copy paste what you need and then alter to your needs.

Have fun.

Adi
+3  A: 

I found these quite helpful when starting out with OpenGL ES, just to see what approach one would take when dealing with ES as opposed to normal GL.

http://www.zeuscmd.com/tutorials/opengles/index.php

As has been mentioned earlier there are some samples available from the iPhone developer site as well:

http://developer.apple.com/iphone/library/navigation/Frameworks/Media/OpenGLES/index.html

Andreas Müller
+9  A: 

If I may plug my own work, I'd direct you to my post at http://www.sunsetlakesoftware.com/2008/08/05/lessons-molecules-opengl-es. It's not the best overall introduction to OpenGL ES, and it gets fairly technical pretty quickly, but it's my take on the subject from my experience writing Molecules. Also, I've just started reading the book "Mobile 3D Graphics: with OpenGL ES and M3G".

I agree with the suggestion that the best way to learn is by doing. I started out knowing nothing about OpenGL and three weeks later had Molecules in for review in the App Store. Once you have a clear set of goals ("OK, I need to draw a 3-D sphere", "Now I need to rotate it on demand") it becomes easy to find the examples or parts of documentation that apply to just the task you're working on.

There are many code examples out there, although a lot of them use immediate mode and other calls that are not supported in OpenGL ES. I'd love to add to the list by releasing the source to Molecules, but Apple's NDA has prevented that so far.

Brad Larson
That's cool man! Thanks a lot.
Thanks
+4  A: 

FYI, Brad Larsons Molecules code is now available here.

+2  A: 

If you have downloaded the iPhone SDK examples, check out crash landing's EAGLview file. It is a pretty straight forward implementation of a GLES view that can be imported and used fairly cleanly in another project. There is another class in that project called Texture2d (if I recall) which is also pretty interesting if you are into using GLES for 2D.

Nick
+1  A: 

May I also suggest Android - it's easy to get and you can have a working simulator really quickly. Also, it uses v1.0 as far as I know.
There could be more tutorials, but even the APIDemos provided by Google has introduction to OpenGL ES. I certainly found it helpful.

maciej.gryka
+3  A: 

There are some excellent tutorials at iphonedevelopment.blogspot.com

Nikolai Ruhe
+1  A: 

You might want to take a look at this excellent Jef LaMarche’s Tutorial to OpenGL ES on the iPhone.

Martín Marconcini