Made code compatible with/use OpenGL ES