From 310a54458b65e4b236658cbb3751b5544f21dbb3 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 18 Aug 2004 14:26:36 +0000
Subject: [PATCH] add missing #ifdef HAVE_FLTK

---
 Plugin/StructuralSolver.cpp | 13 +++++++------
 Plugin/StructuralSolver.h   |  2 ++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Plugin/StructuralSolver.cpp b/Plugin/StructuralSolver.cpp
index 72506add8a..214ea91928 100644
--- a/Plugin/StructuralSolver.cpp
+++ b/Plugin/StructuralSolver.cpp
@@ -86,7 +86,8 @@ void Structural_BeamSection :: computeGeometricalProperties ()
 
 void Structural_Texture::setup ()
 {
-  
+
+#ifdef HAVE_FLTK  
   Fl_PNG_Image image(filename.c_str());
 
   // allocate a texture name
@@ -118,19 +119,18 @@ void Structural_Texture::setup ()
 		     GL_RGB, 
 		     GL_UNSIGNED_BYTE, 
 		     data );
+#endif
 }
 
 void Structural_BeamSection ::  GL_DrawBeam (double pinit[3], double dir[3], const double dirz[3], Structural_Texture &texture)
 {
+#ifdef HAVE_FLTK
 
   if (texture.tag==0)
     {
       texture.setup();
     }
 
-#ifdef HAVE_FLTK
-
-
   double X[3] = {dir[0],dir[1],dir[2]};
   double Z[3] = {dirz[0],dirz[1],dirz[2]};
   double Y[3];
@@ -634,6 +634,8 @@ void Draw_Kinematic_Constraint ( const int type [3],
 				 const double pos[3], 
 				 double dir[3])
 {
+#ifdef HAVE_FLTK
+
   // presently, it's only 2D , 1st and second component are for dir and dir2 
   // and third one is for rotation around z
 
@@ -777,8 +779,7 @@ void Draw_Kinematic_Constraint ( const int type [3],
   glDisable(GL_LIGHTING);
   glColor4ubv((GLubyte *) & CTX.color.geom.point);
 
-  
-
+#endif  
 }
 
 
diff --git a/Plugin/StructuralSolver.h b/Plugin/StructuralSolver.h
index cc176a955e..3c19f2f9a5 100644
--- a/Plugin/StructuralSolver.h
+++ b/Plugin/StructuralSolver.h
@@ -45,7 +45,9 @@ extern "C"
 struct Structural_Texture
 {
   std::string filename;
+#ifdef HAVE_FLTK
   GLuint  tag ;
+#endif
   void setup();
 };
 
-- 
GitLab