Apologies to All that I failed to include some code snippets about my problem. 
Oops!

Update:  The problem only occurs when my main window (Gui) calls  the GlWindow 
(glw). if I comment out the Glw call, the cursor color is correct. This would 
seem to indicate that the problem is  in my GlWindow subclass (glw). Here's 
some code:

in main.cxx:
...
Gui *GUI;
main()
{
GUI = new Gui( 5, 5, 300, 300,0);
return fltk::run();
}

in Gui:
extern Gui *GUI;
Glw *GLW;

Gui::Gui( int x, int y, int w, int h, const char *l)
    : Window( x, y, w, h, l)
{
..
mwin->begin()
mbar = new MenuBar( 0, 0, 70, 200, 0);
...
GLW = new Glw( 70, 0, 200, 200, 0);
..

in glw.cxx
...
Glw::Glw( int x, int y, int w, int h, const char *l)
    :: GlWindow( x, y, w, h, l)
{
show();
}

Glw::draw()
{
if ( !valid())
{
glClearColor( 0, 0, 0, 0);
glShadeModel( GL_FLAT);
glViewport( 0, 0, 200, 200);
make_current();
valid( true);
}

glClear( GL_COLOR_BUFFER_BIT);
glMatrixMode( GL_MODELVIEW);
glLoadIdentity();
glOrtho( -2, 2, -2, 2, -999, 999);
glLookAt( 0, 0, -5,   0, 0, 0,   0, 1, 0);
glPushMatrix();
glColor3i( 1, 1, 1);
glBegin( GL_LINES)
..


I can send the complete test code if desired.
Hope someone can figure out what I'm doing wrong.

Thanks a lot.
Marty
_______________________________________________
fltk-opengl mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to