Improved some openGL texture creation functionality.