> michael sephton wrote:
> > glLoadIdentity();
> > glViewport(0,0,w(),h());
> > glMatrixMode(GL_PROJECTION);
> > glLoadIdentity();
> > ortho();
>
>       Not sure if this is related, but FWIW, Fl_Gl_Window::ortho()
>       is implemented as:
>
>   GLint v[2];
>   glGetIntegerv(GL_MAX_VIEWPORT_DIMS, v);
>   glLoadIdentity();
>   glViewport(w()-v[0], h()-v[1], v[0], v[1]);
>   glOrtho(w()-v[0], w(), h()-v[1], h(), -1, 1);
>
>       ..which may be undermining your own glViewport() command.
>       Maybe you want to use glOrtho() in place of ortho()?

Thanks, replacing ortho with
glOrtho(0,w(),0,h(),-1,1) fixes my program.
On the Windows system im using I found that 
glGetIntegerv(GL_MAX_VIEWPORT_DIMS,v) sets v={-4900,-4900).
So i guess the projection was being set up ok, its just that the origin of the 
window was (-4900,-4900) on windows, whereas on my linux system it was (0,0)...
_______________________________________________
fltk-opengl mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to