Improved OpenGL backend implementation