Wednesday, February 9, 2011

Two tips for iOS development

In XCode, if you have a malloc or C++ [] operator that contains a ++ incrementor or ? : shorthand, the compiler could corrupt the stack pointer for ya and cause all kinds of problems. Untested to be an issue in Objective C or .mm files.

Second: do not use lowp for your vertex shader texcoord inputs, it will cause texture wrapping problems. Not sure what other implications there are to this. In my case, the game looked great on the simulator, and on the iPad, after the ground texture appeared once, the other times it had clamping occur. This is somehow related to the different way that lowp is handled in a GLSL vertex shader on the device.

0 comments:

Post a Comment