Improved OpenGL performance

The texture updates were optimized.