Fixed the OpenGL renderer.

And other stuff...