From be17e1ccb642891b0b00a6e26d9c79272aed1d9e Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 14 Mar 2010 21:29:12 +0000 Subject: Updated Fl_Device and Fl_Printer for Xcode git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Choice.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/Fl_Gl_Choice.cxx') diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 75fc9dea8..479146ed7 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -38,6 +38,7 @@ # ifdef __APPLE__ # include +# include # endif # ifdef WIN32 @@ -317,12 +318,20 @@ GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int lay #if defined(__APPLE_COCOA__) #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - if (aglSetWindowRef != NULL) { +#if __LP64__ + // 64 bit version + aglSetWindowRef(context, MACwindowRef(window) ); +#else + // 32 bit version >= 10.5 + if (aglSetWindowRef != NULL) aglSetWindowRef(context, MACwindowRef(window) ); - } else + aglSetDrawable( context, GetWindowPort( MACwindowRef(window) ) ); #endif +#else + // 32 bit version < 10.5 aglSetDrawable( context, GetWindowPort( MACwindowRef(window) ) ); +#endif #else aglSetDrawable( context, GetWindowPort( fl_xid(window) ) ); -- cgit v1.2.3