diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-04 20:26:00 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-04 20:26:00 +0000 |
| commit | 9ae933d0045daa9bddef9002ad7863747cbfca7d (patch) | |
| tree | a3c41108bd1a388eca45304aefd31a9c056a01c4 /test/CubeView.h | |
| parent | 474e82bd95f0a3b9ac5b1361e541ae25ddb7f8b4 (diff) | |
Fixed OpenGL checks (#if HAVE_GL, not #ifdef...), plus added message
that OpenGL is required...
git-svn-id: file:///fltk/svn/fltk/trunk@369 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/CubeView.h')
| -rw-r--r-- | test/CubeView.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/CubeView.h b/test/CubeView.h index d00d517da..39bddcb42 100644 --- a/test/CubeView.h +++ b/test/CubeView.h @@ -1,5 +1,5 @@ // -// "$Id: CubeView.h,v 1.2 1999/03/04 20:11:49 mike Exp $" +// "$Id: CubeView.h,v 1.3 1999/03/04 20:26:00 mike Exp $" // // CubeView class definitions for the Fast Light Tool Kit (FLTK). // @@ -27,10 +27,12 @@ #define CUBEVIEW_H 1 #include <config.h> #include <FL/Fl.H> -#include <FL/Fl_Gl_Window.H> -#ifdef HAVE_GL +#if HAVE_GL +# include <FL/Fl_Gl_Window.H> # include <FL/gl.h> # include <GL/glu.h> +#else +# include <FL/Fl_Box.H> #endif /* HAVE_GL */ #include <stdlib.h> @@ -38,8 +40,11 @@ // shorthand to save some bits. #define v3f(x) glVertex3fv(x) - +#if HAVE_GL class CubeView : public Fl_Gl_Window { +#else +class CubeView : public Fl_Box { +#endif /* HAVE_GL */ public: // this value determines the scaling factor used to draw the cube. @@ -81,6 +86,7 @@ public: */ void pany(float y){yshift=y;}; +#if HAVE_GL /*The widget class draw() override. * *The draw() function initialize Gl for another round o f drawing @@ -89,6 +95,7 @@ public: * */ void draw(); +#endif /* HAVE_GL */ private: /* Draw the cube boundaries @@ -96,7 +103,11 @@ private: *Draw the faces of the cube using the boxv[] vertices, using * GL_LINE_LOOP for the faces. The color is \#defined by CUBECOLOR. */ +#if HAVE_GL void drawCube(); +#else + void drawCube() { } +#endif /* HAVE_GL */ float vAng,hAng; float xshift,yshift; @@ -111,5 +122,5 @@ private: #endif // -// End of "$Id: CubeView.h,v 1.2 1999/03/04 20:11:49 mike Exp $". +// End of "$Id: CubeView.h,v 1.3 1999/03/04 20:26:00 mike Exp $". // |
