wxWidgets version: 3.0.2
platform/OS: Windows 7 64 bit
I have a wxWidgets frame based project, with a panel for opengl derived from wxGLCanvas. I can draw nice shapes, background, etc, even track the mouse, but now I want to draw text and I'm not sure where to start. I might want to stay away from glut (or should I not?) because while I got glut library to compile with mingw32 and link to my project (statically), it crashes on "glutBitmapCharacter" in the following snippet (assume that the arguments are valid):
Code: Select all
void DrawTextFunction(double x, double y, char* str)
and the error is:
The application was unable to start correctly (0xc0000142). Click OK to close the application.
the error does not show up if I comment out the line with glutBitmapCharacter. The str variable is populated with valid text.
I can draw some text with the non-opengl context after the call to SwapBuffers but the graphic flickers, and it's not pretty nor efficient if I want to draw lots of text (because the regular context has no display list) and so I'd rather draw the text in opengl context. How can I do that? (Can I get away without glut and only using wxwidgets classes and regular call to opengl functions?)