In the previous chapter, we introduced classes and interfaces for platform-independent rendering. Here, we make a slight detour on our way to a 3D OpenGL renderer and use the SDL library to render elements of the user interface. To render our UI, we need lines, rectangles, textured rectangles, and text strings.
We will begin this chapter with the description of the
iCanvas interface designed to render geometric primitives. The most complex part of
iCanvas is Unicode text rendering, which is implemented using the FreeType library. Font glyphs caching is also a very important topic for complex UIs, which is discussed here. The second part of the chapter describes a multipage graphical user interface suitable ...