iOS Simulator Woes

It’s good to remember the iOS Simulator isn’t always perfect. I wanted to use the GLKit framework to simplify texture loading in my app using GLKTextureLoader, it seems simple to use, and once I worked around a few errors making sure the context was in the right state I got the textures loading, but they came out a shade of blue.

Blue texture

No errors were reported, no obvious reason, it doesn’t look like channels have been swapped, it’s just a shade of blue. Checked all the documentation, everything says it should be fine, my images are in the correct format, no one else reports the same problem, I’m pulling my hair out.

I didn’t think to try it out on an actual device, where lo and behold, the texture is actually displaying just fine! The problem lies only in the simulator!

I know the simulator has some restrictions, and opengles performance cannot be compared to an actual device. But my existing texture loading code was working just fine, it was fairly standard code you could find in many examples. The GLKTextureLoader must be doing something a little different, some little wizadry behind the scenes, or has it not implemented something properly that’s only revealed by a small difference in how opengles is implemented on a device and the simulator? I don’t have a full range of devices available, could this problem on an actual device? I doubt it though, so I filed an apple bug for the simulator, and I’m going to move on.

Leave a Reply