ThunderSoul
06-19-2005, 11:25 AM
Hello all... :)
I am using FLTK and I'm having a problem I cannot fix... I am trying to draw lines when dragging the mouse button. Here's the code I have written in my handle(int) method...
case FL_PUSH:
switch (Fl::event_button()) {
case 3: // Right Mouse Button
if (key == FL_PUSH) {
glBegin(GL_LINES);
glVertex2d(old_x, old_y);
glVertex2d(old_x = Fl::event_x(), old_y = height - Fl::event_y());
glEnd();
}
return 1;
}
This method of writing code works well with just openGL. I cannot see what's wrong with it... Please help~
Thank you
TS
I am using FLTK and I'm having a problem I cannot fix... I am trying to draw lines when dragging the mouse button. Here's the code I have written in my handle(int) method...
case FL_PUSH:
switch (Fl::event_button()) {
case 3: // Right Mouse Button
if (key == FL_PUSH) {
glBegin(GL_LINES);
glVertex2d(old_x, old_y);
glVertex2d(old_x = Fl::event_x(), old_y = height - Fl::event_y());
glEnd();
}
return 1;
}
This method of writing code works well with just openGL. I cannot see what's wrong with it... Please help~
Thank you
TS