2D rendering code for OpenGL 3.3