Re: [fltk.opengl] Can Use GLSL in FLTK?
3DRACS v1.5.0 is totally written in FLTK 1.3 with OpenGL. You can test GLSL shaders from Menu-Rendering-Shaders-... You can download it from Download link: http://www.real3d.pk/softwares.html Home page: http://www.real3d.pk/3dracs.html If you want to ask anything else, I am here for that. On 12/10/12 01:34, Sepehr Aryani wrote: Hi, I'm wondering if we can use GLSL in fltk application. I also want to know which version of OpenGL FLTK support. If there is a sample code to help I'll appreciate. I don't think there are any modern versions of openGL that FLTK /doesn't/ support, so it should work with whatever version you have. FLTK generally only gets involved to establish the openGL context. From there, all your openGL calls go directly to the openGL library, not through FLTK, which should mean any extensions to openGL (such as GLSL) should be supported without any special coding in FLTK. So in other words it should just work. If it doesn't, let us know. ___ fltk-opengl mailing list fltk-opengl@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-opengl
Re: [fltk.opengl] How to enable Drag n Drop on OpenGL window ?
Thanks UWE, I tried but no success, still the same. File only accepted when drop over the Fl_Double_Window. Here is my code.. MainWindow-begin(); // Fl_Double_Window DnDReceiver b(0,0,WINDOW_SIZE_W, WINDOW_SIZE_H); // Drag n Drop Box glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ACCUM | GLUT_ALPHA | GLUT_STENCIL | GLUT_MULTISAMPLE); GLUT_MAIN_WINDOW = glutCreateWindow(RACS_VERSION); MainWindow-end(); MainWindow-show(argc, argv); I tried to put DnDReceiver box before, after, middle, everywhere, inside of begin and end of Fl_Double_Window but no success. Please guide me Where to put DnDReceiver box in the code. thanks. Am 18.02.2013 08:52, schrieb Furqan: Now the issue is, when I drag n drop one file over the OpenGL screen it doesn't accept the file. File only accepted if I drop on the Receiver box. But my application screen is totally covered with the OpenGL screen, so, how can I enable Drag n Drop on the OpenGL screen ? You can place a invisible widget e.g. Fl_Box with the attribute Fl_No_Box over the whole application, which just recieves DD events like in your described even handler and filters only these. All other events from mouse, keyboard etc. should pass to get handled as usual by the appropriate widgets. kind regards Kai-Uwe ___ fltk-opengl mailing list fltk-opengl@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-opengl
[fltk.opengl] How to enable Drag n Drop on OpenGL window ?
My application is OpenGL based. I have created an OpenGL windows inside of Fl_Double_Window. Now here is the simple code for drag n drop, copied from an example. // SIMPLE RECEIVER CLASS class Receiver : public Fl_Box { public: // Ctor Receiver(int x,int y,int w,int h) : Fl_Box(x,y,w,h) { box(FL_FLAT_BOX); color(10); label(..to\nhere); } // Receiver event handler int handle(int event) { int ret = Fl_Box::handle(event); switch ( event ) { case FL_DND_ENTER: // return(1) for these events to 'accept' dnd case FL_DND_DRAG: case FL_DND_RELEASE: ret = 1; break; case FL_PASTE: // handle actual drop (paste) operation label(Fl::event_text()); fprintf(stderr, Pasted '%s'\n, Fl::event_text()); ret = 1; break; } return(ret); } }; In my application I code like this.. MainWindow = new Fl_Double_Window(WINDOW_SIZE_W, WINDOW_SIZE_H, ); Receiver box(0,0,WINDOW_SIZE_W, WINDOW_SIZE_H); MainWindow-end(); MainWindow-show(argc, argv); Now the issue is, when I drag n drop one file over the OpenGL screen it doesn't accept the file. File only accepted if I drop on the Receiver box. But my application screen is totally covered with the OpenGL screen, so, how can I enable Drag n Drop on the OpenGL screen ? Any idea ? thanks. furqan ___ fltk-opengl mailing list fltk-opengl@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-opengl