diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2001-03-20 18:02:52 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2001-03-20 18:02:52 +0000 |
| commit | 339b9cd8a044039e1a2deadc0e765f65ba91f6a4 (patch) | |
| tree | 85bbaa1b39ef0a45a079abc03a798522f6b8df91 /src/Fl_Gl_Overlay.cxx | |
| parent | 3a9d945d0701afbffa02e3331271103c6ce93f0a (diff) | |
can_do_overlay was missing from WIN32 version
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1417 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Overlay.cxx')
| -rw-r--r-- | src/Fl_Gl_Overlay.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx index fcbf5c7bf..a3518000e 100644 --- a/src/Fl_Gl_Overlay.cxx +++ b/src/Fl_Gl_Overlay.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.16 2001/03/15 22:39:56 easysw Exp $" +// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.17 2001/03/20 18:02:52 spitzak Exp $" // // OpenGL overlay code for the Fast Light Tool Kit (FLTK). // @@ -126,13 +126,6 @@ void Fl_Gl_Window::make_overlay() { //static COLORREF *palette; extern int fl_overlay_depth; -int Fl_Gl_Window::can_do_overlay() { - HDC hdc = Fl_X::i(this)->private_dc; - LAYERPLANEDESCRIPTOR pfd; - - return (wglDescribeLayerPlane(hdc, g->pixelformat, 1, sizeof(pfd), &pfd)); -} - void Fl_Gl_Window::make_overlay() { if (overlay) return; @@ -168,6 +161,14 @@ void Fl_Gl_Window::make_overlay() { return; } +int Fl_Gl_Window::can_do_overlay() { + if (!g) { + g = Fl_Gl_Choice::find(mode_,alist); + if (!g) return 0; + } + return (g->pfd.bReserved & 15) != 0; +} + //////////////////////////////////////////////////////////////// #endif @@ -213,5 +214,5 @@ void Fl_Gl_Window::hide_overlay() { #endif // -// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.16 2001/03/15 22:39:56 easysw Exp $". +// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.17 2001/03/20 18:02:52 spitzak Exp $". // |
