Mipmapcube and Simplefont

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-cpp.zip (Updated for C++ 2024)




Old versions:


mipmapcube4-and-simplefont.tar.gz (Updated 2017)


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


Simplefont2 is an extended version that supports external font images. I consider it alpha since it has not been 100% reliable but usually it seems to work.


simplefont2-alpha.tar.gz (Archive from 2017, added to this page 2019)


simplefont2-beta.tar.gz Improved version! Better transparency, tested on windows (although the demos are not), makefile for Linux.


Update 2022. And I thought it was tight. This only needs one call for simple use! A few more if you want to change text color or font.


Tested on Mac, Linux and Windows! CodeBocks project included!


SimpleFont.tar.gz (Archive from 2017, added to this page 2019)

This page is maintained by Ingemar Ragnemalm.