Re: [fltk.opengl] Fl_Gl_Window flashes on context creation(Windows7)

2013-04-03 Thread Ivan Nedrehagen

 You may need to update your libraries or try another compiler, the program
 runs fine on my Ubuntu64 Linux.


Yes it does run fine on my Ubuntu too. The problem are the context creation 
when running in Windows7. This is using the FLTK 1.3.2 library, compiled with 
the mingw64 gcc compiler (v.4.7.2 rev9) with the x86_64-w64-mingw32 target.
___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


[fltk.opengl] event_x() To Get FL_Gl_Window Coordinates

2013-04-03 Thread Mike Werner
I want to be able to left click in an OpenGL window and have the mouse 
coordinates in that window returned (i.e. relative to the upper left corner of 
the window). Seems like I should be able to do this using Fl::event_x.  However 
it's turning out to be difficult. First of all the only way I can get event_x 
to return anything is to put it in the draw function of my Fl_Gl_Window with 
the syntax Fl::event_x(). But this doesn't return anything when I click in the 
OpenGL window. It ONLY returns coordinates when I click on a button outside the 
OGL window. And the X value returned is relative to main FLTK window. Not what 
I need.

Was hoping to be able to put event_x() in the draw function or in the callback 
to Fl_Gl_Window and get OGL window relative coordinates.

The only idea I have now is to put a large button underneath the OGL window. 
When I click inside the OGL window, this button will be activated and I'll get 
an x cord. relative to the main FLTK window and have to subtract off the upper 
left corner coordinates of the OGL window.

Anyone have a more elegant solution?
___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl


Re: [fltk.opengl] event_x() To Get FL_Gl_Window Coordinates

2013-04-03 Thread Mike Werner
 The only idea I have now is to put a large button underneath the OGL window. 
 When I click inside the OGL window, this button will be activated and I'll 
 get an x cord. relative to the main FLTK window and have to subtract off the 
 upper left corner coordinates of the OGL window.

Actually, I've implemented this approach and it seems to be working.

___
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl