I'm struggling with the FTGL library for fonts in opengl. For example, I still haven't figured out how to put the text somewhere on the screen other than the bottom left. I'm currently using a pixmap font, and I started experimenting with glRasterPos
.
The following code "works" in that it displays the text on the bottom left in white:
ftglRenderFont(ftgl_freesans, "HELLO WORLD!", FTGL_RENDER_ALL);
In the following example, the text does not show up at all:
float r[4];
glGetFloatv(GL_CURRENT_RASTER_POSITION, r);
glRasterPos4fv(r);
ftglRenderFont(ftgl_freesans, "HELLO WORLD!", FTGL_RENDER_ALL);
I'm confused! Nothing should be different, so why does the font not render?