Removed more testing code from Fl_Gl_Overlay

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Bill Spitzak
2000-03-24 08:55:34 +00:00
parent 9bd57e56b0
commit bb39fe8be0
+4 -8
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.5 2000/03/24 08:48:40 bill Exp $" // "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.6 2000/03/24 08:55:34 bill Exp $"
// //
// OpenGL overlay code for the Fast Light Tool Kit (FLTK). // OpenGL overlay code for the Fast Light Tool Kit (FLTK).
// //
@@ -103,9 +103,7 @@ int Fl_Gl_Window::can_do_overlay() {
#else // WIN32: #else // WIN32:
static int no_overlay_hardware = 0;
int Fl_Gl_Window::can_do_overlay() { int Fl_Gl_Window::can_do_overlay() {
if (no_overlay_hardware) return 0;
Fl_Gl_Choice* choice = Fl_Gl_Choice::find(0,0); Fl_Gl_Choice* choice = Fl_Gl_Choice::find(0,0);
return (choice && (choice->pfd.bReserved & 15)); return (choice && (choice->pfd.bReserved & 15));
} }
@@ -124,11 +122,10 @@ void Fl_Gl_Window::make_overlay() {
if (!overlay) { if (!overlay) {
#if HAVE_GL_OVERLAY #if HAVE_GL_OVERLAY
#ifdef WIN32 #ifdef WIN32
if (!no_overlay_hardware) {
HDC hdc = fl_private_dc(this, mode_,&g); HDC hdc = fl_private_dc(this, mode_,&g);
GLXContext context = wglCreateLayerContext(hdc, 1); GLXContext context = wglCreateLayerContext(hdc, 1);
if (!context) { // no overlay hardware if (!context) {
no_overlay_hardware = 1; ; // no overlay hardware
} else { } else {
if (fl_first_context) wglShareLists(fl_first_context, context); if (fl_first_context) wglShareLists(fl_first_context, context);
else fl_first_context = context; else fl_first_context = context;
@@ -158,7 +155,6 @@ void Fl_Gl_Window::make_overlay() {
valid(0); valid(0);
return; return;
} }
}
#else #else
if (can_do_overlay()) { if (can_do_overlay()) {
_Fl_Gl_Overlay* o = new _Fl_Gl_Overlay(0,0,w(),h()); _Fl_Gl_Overlay* o = new _Fl_Gl_Overlay(0,0,w(),h());
@@ -213,5 +209,5 @@ void Fl_Gl_Window::hide_overlay() {
#endif #endif
// //
// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.5 2000/03/24 08:48:40 bill Exp $". // End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.6 2000/03/24 08:55:34 bill Exp $".
// //