summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-11-15 16:17:41 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-11-15 16:17:41 +0000
commit2baf50eb1607ce3860a080c894843bd70ab5022d (patch)
tree9350c88a611d6f9a8aa005fe60426ae3a2c417d1 /src
parentb579acc9b3ad84e3b1766338cb55001aafe2570f (diff)
Fix OpenGL resize bug under OSX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Window.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 043588aa5..8b1e0fec0 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.13 2002/10/15 20:45:58 easysw Exp $"
+// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.14 2002/11/15 16:17:41 easysw Exp $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -184,14 +184,6 @@ void Fl_Gl_Window::flush() {
uchar save_valid = valid_;
#ifdef __APPLE__
- // \todo Mac : matt: I have no idea how expensive the following code is, but we need to reset the buffer rect after
- // every window-reconfiguration, especially after window resizes. aglUpdateContext(ctxt) may help here!
- if ( parent() ) { //: resize our GL buffer rectangle
- Rect wrect; GetWindowPortBounds( fl_xid(this), &wrect );
- GLint rect[] = { x(), wrect.bottom-h()-y(), w(), h() };
- aglSetInteger( context_, AGL_BUFFER_RECT, rect );
- aglEnable( context_, AGL_BUFFER_RECT );
- }
//: clear previous clipping in this shared port
GrafPtr port = GetWindowPort( fl_xid(this) );
Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
@@ -325,12 +317,7 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
if (W != w() || H != h()) {
valid(0);
#ifdef __APPLE__
- if ( parent() ) { //: resize our GL buffer rectangle (see aglUpdateContext()
- Rect wrect; GetWindowPortBounds( fl_xid(this), &wrect );
- GLint rect[] = { X, wrect.bottom-h()-y(), W, H };
- aglSetInteger( context_, AGL_BUFFER_RECT, rect );
- aglEnable( context_, AGL_BUFFER_RECT );
- }
+ aglUpdateContext(context_);
#elif !defined(WIN32)
if (!resizable() && overlay && overlay != this)
((Fl_Gl_Window*)overlay)->resize(0,0,W,H);
@@ -380,5 +367,5 @@ void Fl_Gl_Window::draw_overlay() {}
#endif
//
-// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.13 2002/10/15 20:45:58 easysw Exp $".
+// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.14 2002/11/15 16:17:41 easysw Exp $".
//