summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2001-12-06 00:17:47 +0000
committerMatthias Melcher <fltk@matthiasm.com>2001-12-06 00:17:47 +0000
commite07200c4e847ddff8a46ea9fdc23e17437d74c15 (patch)
treed894e182e410b76b62fdeefbb4122ab4ac8665b6 /src/Fl_Gl_Window.cxx
parent39109694e1873fce011df470f2edd57a0028e0a3 (diff)
Implemeted 95% of all Mac OS X support. Makefiles still need modifications.
Almost all test applications run out of the box (->Makefile). See more information in README.mac . Changes: - message handling - access to opaque port structures - image, bitmap, pixmap support - most OpenGL stuff - window styles git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 31142185c..e4a16c81e 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.2 2001/12/04 04:12:58 matthiaswm Exp $"
+// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.3 2001/12/06 00:17:47 matthiaswm Exp $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -202,8 +202,12 @@ void Fl_Gl_Window::flush() {
#ifdef __APPLE__
//: clear previous clipping in this shared port
- CGrafPort *port = (CGrafPort*)fl_xid(this);
- SetRectRgn( port->clipRgn, 0, 0, 0x7fff, 0x7fff );
+ GrafPtr port = GetWindowPort( fl_xid(this) );
+ Rect rect; SetRect( &rect, 0, 0, 0x7fff, 0x7fff );
+ GrafPtr old; GetPort( &old );
+ SetPort( port );
+ ClipRect( &rect );
+ SetPort( old );
#endif
make_current();
@@ -296,10 +300,10 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
valid(0);
#ifdef __APPLE__
if ( parent() ) { //: resize our GL buffer rectangle
- CGrafPort *port = (CGrafPort*)fl_xid(this);
- GLint rect[] = { X, port->portRect.bottom-h()-y(), W, H };
- aglSetInteger( (GLXContext)context_, AGL_BUFFER_RECT, rect );
- aglEnable( (GLXContext)context_, AGL_BUFFER_RECT );
+ 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 );
}
#elif !defined(WIN32)
if (!resizable() && overlay && overlay != this)
@@ -347,5 +351,5 @@ void Fl_Gl_Window::draw_overlay() {}
#endif
//
-// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.2 2001/12/04 04:12:58 matthiaswm Exp $".
+// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.3 2001/12/06 00:17:47 matthiaswm Exp $".
//