Some helper functions for OpenGL stuff.