From 2b85bf81680e2243ef5a5daf85d9eb04321c7278 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 27 Nov 2001 17:44:08 +0000 Subject: Preliminary commit of my MacOS X work. **** THIS CODE COMPILES BUT DOES NOT WORK. **** TODO: fix event handling - getting blank windows, etc. TODO: re-port OpenGL code. TODO: add support for images with alpha. TODO: add support for more then just beeps in fl_beep(). TODO: other stuff I'm sure... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/gl_start.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gl_start.cxx') diff --git a/src/gl_start.cxx b/src/gl_start.cxx index 6135c5740..1340eedce 100644 --- a/src/gl_start.cxx +++ b/src/gl_start.cxx @@ -1,5 +1,5 @@ // -// "$Id: gl_start.cxx,v 1.6.2.5.2.1 2001/11/22 15:35:02 easysw Exp $" +// "$Id: gl_start.cxx,v 1.6.2.5.2.2 2001/11/27 17:44:08 easysw Exp $" // // OpenGL context routines for the Fast Light Tool Kit (FLTK). // @@ -61,12 +61,14 @@ void gl_start() { #ifdef WIN32 if (!gl_choice) Fl::gl_visual(0); context = fl_create_gl_context(Fl_Window::current(), gl_choice); +#elif defined(__APPLE__) + //++ #else context = fl_create_gl_context(fl_visual); #endif } fl_set_gl_context(Fl_Window::current(), context); -#ifndef WIN32 +#if !defined(WIN32) && !defined(__APPLE__) glXWaitX(); #endif if (pw != Fl_Window::current()->w() || ph != Fl_Window::current()->h()) { @@ -93,7 +95,7 @@ void gl_start() { void gl_finish() { glFlush(); -#ifndef WIN32 +#if !defined(WIN32) && !defined(__APPLE__) glXWaitGL(); #endif } @@ -103,6 +105,8 @@ int Fl::gl_visual(int mode, int *alist) { if (!c) return 0; #ifdef WIN32 gl_choice = c; +#elif defined(__APPLE__) + //++ #else fl_visual = c->vis; fl_colormap = c->colormap; @@ -113,5 +117,5 @@ int Fl::gl_visual(int mode, int *alist) { #endif // -// End of "$Id: gl_start.cxx,v 1.6.2.5.2.1 2001/11/22 15:35:02 easysw Exp $". +// End of "$Id: gl_start.cxx,v 1.6.2.5.2.2 2001/11/27 17:44:08 easysw Exp $". // -- cgit v1.2.3