Skip to main content

Learning OpenGL ES 1.x



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:




Comments

  1. 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.

    ReplyDelete
  2. 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. The source code to Molecules is now available.

    As an update (11/16/2010), video for the class I taught on OpenGL ES 1.1 is now available to download as part of my course on iTunes U. The notes for that session can be found here. I will soon be updating the fall semester videos with one for this week's class on OpenGL ES 2.0.

    In the meantime, Philip Rideout has released an excellent book on OpenGL ES 1.1 and 2.0 development for the iPhone, called iPhone 3D Programming. I highly recommend it.

    ReplyDelete
  3. There are some excellent tutorials at iphonedevelopment.blogspot.com

    ReplyDelete
  4. 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

    ReplyDelete
  5. FYI, Brad Larsons Molecules code is now available here.

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

    ReplyDelete
  7. 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.

    ReplyDelete
  8. 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.

    ReplyDelete
  9. 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.

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.