views:

64

answers:

2

Will iPhone games that draw 2D textures like this:

glPushMatrix();
glTranslatef(xLoc, yLoc, 0);
[myTexturePointer drawAtPoint:CGPointZero];
glPopMatrix();

work with newer iPhones (that support OpenGL ES 2.0)? I'm asking because I just learned OpenGL ES 2.0 doesn't support glPushMatrix etc.

Cheers!

+2  A: 

The newer phones still support the older OpenGL ES 1.1, so this code should run fine, as long as you're running it in a 1.1 context.

Shaggy Frog
+1  A: 

Newer iphones do support both standards. So your code should work.

To maintain compatibility with the OpenGL ES 1.1 used in existing iPhone and iPod touch devices, "the graphics driver for the PowerVR SGX also implements OpenGL ES 1.1 by efficiently implementing the fixed-function pipeline using shaders," sources report. This indicates that games and other applications unique to the iPhone 3G S and other future models of the iPhone and iPod touch are likely to arrive that will either be exclusive to the new model, or more likely, will support improved 3D graphics on the new device while still working on previous models using the older fixed-function 3D pipeline.

Source

Firas Assaad