Updated some OpenGL code to be more compatible with OpenGL ES (some work still needs to be done.)