Fixed texture loading in iOS
Added a debug function to handle OpenGL error flags