iDevGames Forums
iPhone 3GS OpenGL ES 1.1 compatible? - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: iPhone 3GS OpenGL ES 1.1 compatible? (/thread-368.html)



iPhone 3GS OpenGL ES 1.1 compatible? - Bersaelor - Feb 2, 2010 10:54 AM

I already started this thread but I liked to restate my question in a more controversial way so that I may get more answers.

Do you think/know that OpenGL ES 1.1 works the same way on the new iPhone 3GS as it was on the older devices?

Answer 1. For 2D it's the same for all I know and tested. But 3D?


To Clarify: The Iphone 3GS allows OpenGL ES 2.0. In 2.0 you may use your own shaders. In OpenGL ES 1.1 those shaders were fixed in the librarys.
So maybe the iPhone 3GS just uses OpenGL ES 2.0 when you start an OpenGL ES 1.1 session but with the shaders set to a program that is similar to the old fixed one. So it should look the same.

Example: I deleted every command that uses ES 2.0 from my App when I started developing as I was ok with using the features ES 1.1 provided. But now the graphics that work fine on all iPods/iPhone 3G have dark triangles on the iPhone 3GS. The code that gets executed is exactly the same for both devices. (A small Simulator Video of the problem: http://www.youtube.com/watch?v=9knlo320wNc)
For me that means it isn't downward-compatible.


iPhone 3GS OpenGL ES 1.1 compatible? - aBabyRabbit - Feb 2, 2010 11:38 AM

Lets assume you've checked that no actual glError()'s are occurring. Then can I suggest you continue dividing and deleting code until you isolate the smallest possible test case so that you can post the code and then we can comment on what the possible cause is, or if it is a genuine bug.


iPhone 3GS OpenGL ES 1.1 compatible? - Bachus - Feb 2, 2010 12:23 PM

1.1 isn't just 2.0 with fixed-function shaders. The two are radically different with two different rendering APIs. 1.1 on the 3GS is the same as 1.1 on the 3G or 2G. I suppose it's possible there's an OGL bug that only affects the 3GS, but I doubt it.

Looking at the video and the other shadowing bug thread, I'm going to guess it's a problem with your normals. I'm betting they aren't getting renormalized since you're using glScale. Try throwing in a "glEnable(GL_NORMALIZE);"

See #1 here: http://www.opengl.org/resources/features/KilgardTechniques/oglpitfall/


iPhone 3GS OpenGL ES 1.1 compatible? - Bersaelor - Feb 2, 2010 06:04 PM

Bachus you're my hero Smile

The glEnable(GL_NORMALIZE); did the trick. I already thought about normals but
I already the normalization before, but it didn't make a difference (on the ipod). Since the normals are already normalized in the Program that imports them from blender I thought I can skip another normalization. Sadly I forgot that "glScale" rescales them...

If you ever visit Berlin, tell me to buy you a beer Wink