Moved OpenGL utility functions to own file