

Lots of books give you a complete implementation of 1.0 written as a shader which is interesting, but not much help for someone trying to get started.

To get going I purchased the Blue Book (OpenGLES 2.0 programming guide) - which is great and I thoroughly recommend it - but one of the things that I found I really missed were some simple “this is how you’d do this thing you did in 1.0 in 2.0”. This basically puts you in charge of writing the code that is going to generate your graphics - very powerful, very generic, very overwhelming for someone getting started. OpenGLES 2.0 introduces the idea of a programmable graphics pipeline.

I’d already become familiar with ES 1.0 using it in a previous game but felt that for the effect I wanted to achieve in the new game ES2.0 was the way to go. I recently created a new game for the iPhone (Tanks! Mayhem) and the Palm Pre/Pixie (Tanks!) as part of an effort to learn OpenGLES 2.0. You can find an index to the ported tutorials here. I tried summing all the score events from my game loop and calling runOnUiThread() only once per loop, but it doesn't seem to make much of a difference - the lag is still noticeable.#FRAGMENT SHADER #IPHONE #NEHE TUTORIALS #OPENGL #OPENGLES 20 #VERTEX SHADER For example the character gets a coin, but the coin count is not updated quickly. The problem is that there's a very noticeable lag between the event and the score update. From my understanding, using runOnUiThread() from the OpenGL thread is standard practice - otherwise you'll get an exception, I can't remember its name. Here's how I'm updating the score TextView based on what happens in my game loop: whenever an event happens that increases the score, I call nOnUiThread(updater), where activity is the activity that has the above FrameLayout (my main game activity) and updater is just a Runnable that increments the score. One of those Views is a TextView that displays the current score. I'm using a FrameLayout where I have a GLSurfaceView at the bottom and a few Views on top of it.
