diff --git a/CHANGES b/CHANGES index 0987a4262..76b2979d8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.0b12 + - Stereo OpenGL support (patch from Stuart Levy) - All of the convenience functions defined in fl_ask.H now resize the widgets and dialog window as needed for the labels and prompt. diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 16d527695..2692c2c63 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -1,5 +1,5 @@ // -// "$Id: Enumerations.H,v 1.18.2.14.2.19 2002/01/09 21:50:02 easysw Exp $" +// "$Id: Enumerations.H,v 1.18.2.14.2.20 2002/03/25 16:41:01 easysw Exp $" // // Enumerations for the Fast Light Tool Kit (FLTK). // @@ -361,7 +361,8 @@ enum Fl_Mode { // visual types and Fl_Gl_Window::mode() (values match Glut) FL_DEPTH = 16, FL_STENCIL = 32, FL_RGB8 = 64, - FL_MULTISAMPLE= 128 + FL_MULTISAMPLE= 128, + FL_STEREO = 256 }; // damage masks @@ -377,5 +378,5 @@ enum Fl_Damage { #endif // -// End of "$Id: Enumerations.H,v 1.18.2.14.2.19 2002/01/09 21:50:02 easysw Exp $". +// End of "$Id: Enumerations.H,v 1.18.2.14.2.20 2002/03/25 16:41:01 easysw Exp $". // diff --git a/FL/glut.H b/FL/glut.H index 6b3b64a5f..686a9b0a7 100644 --- a/FL/glut.H +++ b/FL/glut.H @@ -1,5 +1,5 @@ // -// "$Id: glut.H,v 1.6.2.10.2.1 2002/01/01 15:11:28 easysw Exp $" +// "$Id: glut.H,v 1.6.2.10.2.2 2002/03/25 16:41:01 easysw Exp $" // // GLUT emulation header file for the Fast Light Tool Kit (FLTK). // @@ -106,7 +106,7 @@ FL_EXPORT void glutInitDisplayMode(unsigned int mode); #define GLUT_DEPTH FL_DEPTH #define GLUT_STENCIL FL_STENCIL #define GLUT_MULTISAMPLE FL_MULTISAMPLE -// #define GLUT_STEREO 256 +#define GLUT_STEREO FL_STEREO // #define GLUT_LUMINANCE 512 FL_EXPORT void glutInitWindowPosition(int x, int y); @@ -470,5 +470,5 @@ extern void APIENTRY glutSolidIcosahedron(); #endif /* __glut_h__ */ // -// End of "$Id: glut.H,v 1.6.2.10.2.1 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: glut.H,v 1.6.2.10.2.2 2002/03/25 16:41:01 easysw Exp $". // diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 1e0728e66..14dd365c6 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.8 2002/01/03 08:08:21 matthiaswm Exp $" +// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.9 2002/03/25 16:41:01 easysw Exp $" // // OpenGL visual selection code for the Fast Light Tool Kit (FLTK). // @@ -84,6 +84,11 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) { if (mode & FL_STENCIL) { list[n++] = AGL_STENCIL_SIZE; list[n++] = 1; } +#ifdef AGL_STEREO /* is there such a thing as AGL_STEREO? */ + if (mode & FL_STEREO) { + list[n++] = AGL_STEREO; + } +#endif list[n] = AGL_NONE; blist = list; } @@ -129,6 +134,9 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) { if (mode & FL_STENCIL) { list[n++] = GLX_STENCIL_SIZE; list[n++] = 1; } + if (mode & FL_STEREO) { + list[n++] = GLX_STEREO; + } #if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample) if (mode & FL_MULTISAMPLE) { list[n++] = GLX_SAMPLES_SGIS; @@ -164,6 +172,7 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int mode, const int *alist) { if ((mode & FL_ALPHA) && !pfd.cAlphaBits) continue; if ((mode & FL_ACCUM) && !pfd.cAccumBits) continue; if ((!(mode & FL_DOUBLE)) != (!(pfd.dwFlags & PFD_DOUBLEBUFFER))) continue; + if ((!(mode & FL_STEREO)) != (!(pfd.dwFlags & PFD_STEREO))) continue; if ((mode & FL_DEPTH) && !pfd.cDepthBits) continue; if ((mode & FL_STENCIL) && !pfd.cStencilBits) continue; // see if better than the one we have already: @@ -309,5 +318,5 @@ void fl_delete_gl_context(GLContext context) { #endif // -// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.8 2002/01/03 08:08:21 matthiaswm Exp $". +// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.9 2002/03/25 16:41:01 easysw Exp $". //