Texture abstraction for opengl