Mipmapcube 4 and Simplefont demos

by Ingemar Ragnemalm

This package consists of two demos, an interactive mip-mapping demo and a simple text rendering unit with a demo.

Mipmapcube4


You can select interpolation setting for each pair of cubes using the keys indicated. You can also change the resolution of the texture using "+" and "-". This is an example developed for use in my computer graphics lectures, in order to illustrate the meaning of all the different modes.



SimpleFont with demo

The SimpleFont unit was developed in parallel with the demo above, since it was a demo where I wanted some text to show, and I found the GLUT font support to be lacking. (Moreover, GLUT text is obsolete now, since it uses deprecated OpenGL calls.) SimpleFont does a similar job, but without some of the drawbacks of the GLUT solution, while being updated for modern OpenGL. It is a simple font renderer, limited, but very easy to use, which makes it interesting for your typical course projects.



The API is ultra-tight, just three function calls, but try rescaling the demo window and you will see that it is remarkably powerful for being so simple. (Look at the text at the bottom right, "Your Mama".) Also note that it is gracefully truncated at the border, something GLUT fonts can't do.

This is really a texture font implementation, so it isn't very hard to adapt it to import a texture from an image. However, there are even more powerful solutions for that.

mipmapcube4-and-simplefont.tar.gz (Updated 140523, now it is tested on Linux, working command-lines included.)

mipmapcube4-and-simplefont-vs.zip (Version working under MS Visual Studio, with project file.)


by Ingemar Ragnemalm 2012-2014