Removed GL state encapsulation (+30FPS), but kept the functions for debugging.