I’m using GLKit (OpenGL ES2) in Objective-C to make an iPhone game.
I haven’t had a lot of experience with this, so it wouldn’t surprise me if I was doing something wrong, but I am generating a heap of objects, which are all mostly the same. In fact I am using a class for them, and just making more instances of the class to create more objects, but somehow some of the objects have textures mapped upside down.
I don’t see how this is at all possible since it is the same code used for all of the objects, and some of them are correct, and some aren’t.
Any help/ideas would be greatly appreciated.
It turns out this was caused by not re-using the texture over and over again, but regenerating it each time I needed it.
All in all, it’s much better practice to only generate the texture once and reuse it anyway, so the solution is simply to do this.