how to show text on screen?

i am using MFC(SDI) with Opengl, i tried to show text on screen using:


glColor3f(0.0f,0.1f,1.0f);
glRasterPos2i(200, 400);
FontPrintf(Font, -1, “Testing Opengl”);

glFlush();

and i get compilation error:
‘FontPrintf’ : undeclared identifier
‘Font’ : undeclared identifier

any soluton?

You need to link with the library or source file(s) that defines that function and whatever Font may be, and they are not related to OpenGL. The place where you got that piece of code would be a good place to start.

Checl on my website, I’ve a simple example for you.
http://www.slug-production.be.tf/