I thought I met the same issues.
Even I try the code below,it still not working on my MacOSX.
But it works on my Windows.
Just don't get clue. Is it a bug of fltk?
> This is pretty much standard...
>
> void ControlGL::draw()
> {
> if(!valid())
> {
> glViewport(0, 0, w(), h());
> glMatrixMode(GL_PROJECTION);
> glLoadIdentity();
> glOrtho(0, w(), 0, h(), -1, 1);
> glMatrixMode(GL_MODELVIEW);
> glLoadIdentity();
> valid(1);
> }
>
> if(!img)
> (
> glClearColor(0,1,0,0);
> glClear(GL_COLOR_BUFFER_BIT);
> }
> else
> {
> glDrawPixels(img->width,
> img->height,
> GL_RGB,
> GL_UNSIGNED_BYTE,
> img->data);
> }
>
> Fl_Gl_Window::draw(); // Aha!
> }
>
> // Don.
>
_______________________________________________
fltk-opengl mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-opengl