Frodo478's picture

QuickFont & OpenTk - How to use it?

Hi,
i developed a graphics math calculator with C#.Net and i have used OpenTk with the OpenGL for drawing lines.
Now i will put text on my GLControl, and i have found a library called QuickFont. I downloaded it and i have run the example included with the library and i tryed to write a method for print a test text into the GLControl.

        private void text()
        {
            QFont font = new QFont("Fonts/HappySans.ttf", 32);
            GL.PushAttrib(AttribMask.ColorBufferBit);
            QFont.Begin();
            font.Print("prova");
            QFont.End();
            GL.PopAttrib();
        }

I added the GL.PushAttrib/PopAttrib because i have read a post in this forum but it doesn't work.
How i can use the QuickFont for write a text with the coordinates (x,y)??