fixing opengl texture usage