I am working with C# in a .NET environment and I have written an
application using csgl. I need to display text on
the output viewport. I am displaying things with a
CsGL.OpenGL.Ope nGLControl but I can't figure out how to put text on
there.
The standard OpenGL solution
relies on the wglUseFontBitma ps() api to create the display
lists. CSGL doesn't have a comparable function that I can find.
I have tried using CSGL.GDITexture Font to create the display lists but
they do not display correctly. Every character that I try to display
comes out with a solid box. This is the code that I tried:
using GL=CsGL.OpenGL. GL;
using CSGL=CsGL.OpenG L;
...
Font newFont;
CSGL.GDITexture Font myGDITextureFon t;
newFont = new System.Drawing. Font("Microsoft Sans Serif", 8.25F);
myGDITextureFon t = new CsGL.OpenGL.GDI TextureFont(new Font, 'a',
'z');
GL.glColor3f(0, 1.0f, 0);
myGDITextureFon t.Draw2DString( "here you go !", 50, 50);
If anyone can help with specifics of how to do this with csgl, it
would be *greatly* appreciated.
You can mail me directly at st**********@ho tmail.com if you have any
examples.