>> Is anyone else able to reproduce the reported behaviour with a file
>> similar to what's attached?
>>      
> I didn't get the attachement, or I'd give it a whirl...
>    
Of course, the fltk.general list chops attachments.

Copy/pasted below

/*------------------------------------------------------------------------------------------*/
// Compiled on my ubuntu and msys boxes with fltk2-config --use-gl 
--configure text.cxx
// linked against ws2_32.lib, fltk2.lib, fltk2_gl.lib, glu32.lib and 
opengl32.lib under msvs

#include <fltk/GlWindow.h>
#include <fltk/events.h>
#include <fltk/Cursor.h>
#include <fltk/run.h>
#include <fltk/gl.h>
#include <cstdio>

using namespace fltk;

class RR_GlWindow : public GlWindow {
     void draw() {
         if (!valid()) {
             valid(1);
             glLoadIdentity();
             glViewport(0,0,w(),h());
             glOrtho(-w(),w(),-h(),h(),-1,1);
         }
         glClearColor(1.0, 1.0, 1.0, 0.0);
         glClear(GL_COLOR_BUFFER_BIT);
        // Draw white 'X'
        glColor3f(0.0, 0.0, 0.0);
        glBegin(GL_LINE_STRIP);
             glVertex2i(w(), h());
             glVertex2i(-w(),-h());
        glEnd();
        glBegin(GL_LINE_STRIP);
             glVertex2i(w(),-h());
             glVertex2i(-w(), h());
        glEnd();
     }
public:
     RR_GlWindow(int x, int y, int w, int h, const char* label=0) :
         GlWindow(x,y,w,h,label) {};
     int handle(int e) {
         int ret = GlWindow::handle(e);
         switch(e) {
             case fltk::ENTER:
                 this->cursor(CURSOR_CROSS);
                 return 1;
             default:
                 return ret;
         }
     }
};

int main(){
     RR_GlWindow win(10, 10, 1000, 800, "");
     win.show();
     return run();
}

/*------------------------------------------------------------------------------------------*/

Ben

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to