Chapter 5. 2D Graphics

It's similar to QPainter class from Qt. But there are also some optimization tricks for OpenGL.