diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2004-08-25 00:20:27 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2004-08-25 00:20:27 +0000 |
| commit | 8327822026ac50dc9e20823988b0f53bc143b7ba (patch) | |
| tree | 864e83d7482fa6414d48621a16b677246e49f8ae /src/Fl_Gl_Choice.H | |
| parent | 522f98d5230e78f983ffcc8f05391c060661cf1a (diff) | |
Updated config stuff to allow for --enable-quartz ofr Mac OS X which in
turn defined USE_QUARTZ to 1 and defines __APPLE_QUARTZ__. If Quartz
is not disabled, it will define __APPLE_QD__ for Quickdraw.
I also replaced all relevand #ifdef __APPLE__ with #ifdef __APPLE_QD__
#elif defined(__APPLE_QUARTZ__). This does not affect the compile at
this time and both version will generate the same Quickdraw code.
I will start to replace all QD calls with Quartz calls for the
remainder of the week until I can completely remove all QD calls from
the Quartz branch.
Thanks to Robert Smith for a great initial Quartz implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Choice.H')
| -rw-r--r-- | src/Fl_Gl_Choice.H | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/Fl_Gl_Choice.H b/src/Fl_Gl_Choice.H index 5b96969a7..9f1c6e19c 100644 --- a/src/Fl_Gl_Choice.H +++ b/src/Fl_Gl_Choice.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.3 2001/12/18 11:00:09 matthiaswm Exp $" +// "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.4 2004/08/25 00:20:25 matthiaswm Exp $" // // OpenGL definitions for the Fast Light Tool Kit (FLTK). // @@ -57,7 +57,12 @@ #ifdef WIN32 # include <FL/gl.h> # define GLContext HGLRC -#elif defined(__APPLE__) +#elif defined(__APPLE_QD__) +# include <OpenGL/gl.h> +# include <AGL/agl.h> +# define GLContext AGLContext +#elif defined(__APPLE_QUARTZ__) +#warning quartz # include <OpenGL/gl.h> # include <AGL/agl.h> # define GLContext AGLContext @@ -75,7 +80,10 @@ public: #ifdef WIN32 int pixelformat; // the visual to use PIXELFORMATDESCRIPTOR pfd; // some wgl calls need this thing -#elif defined(__APPLE__) +#elif defined(__APPLE_QD__) + AGLPixelFormat pixelformat; +#elif defined(__APPLE_QUARTZ__) +#warning quartz AGLPixelFormat pixelformat; #else XVisualInfo *vis; // the visual to use @@ -93,7 +101,12 @@ class Fl_Window; GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0); -#elif defined(__APPLE__) +#elif defined(__APPLE_QD__) + +GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0); + +#elif defined(__APPLE_QUARTZ__) +#warning quartz GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0); @@ -115,5 +128,5 @@ void fl_delete_gl_context(GLContext); #endif // -// End of "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.3 2001/12/18 11:00:09 matthiaswm Exp $". +// End of "$Id: Fl_Gl_Choice.H,v 1.4.2.6.2.4 2004/08/25 00:20:25 matthiaswm Exp $". // |
