From 9ae933d0045daa9bddef9002ad7863747cbfca7d Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 4 Mar 1999 20:26:00 +0000 Subject: 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 --- test/CubeView.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'test/CubeView.h') 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 #include -#include -#ifdef HAVE_GL +#if HAVE_GL +# include # include # include +#else +# include #endif /* HAVE_GL */ #include @@ -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 $". // -- cgit v1.2.3