Skip to content
Snippets Groups Projects
Commit 310a5445 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

add missing #ifdef HAVE_FLTK
parent ef15149c
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,7 @@ void Structural_BeamSection :: computeGeometricalProperties () ...@@ -87,6 +87,7 @@ void Structural_BeamSection :: computeGeometricalProperties ()
void Structural_Texture::setup () void Structural_Texture::setup ()
{ {
#ifdef HAVE_FLTK
Fl_PNG_Image image(filename.c_str()); Fl_PNG_Image image(filename.c_str());
// allocate a texture name // allocate a texture name
...@@ -118,19 +119,18 @@ void Structural_Texture::setup () ...@@ -118,19 +119,18 @@ void Structural_Texture::setup ()
GL_RGB, GL_RGB,
GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE,
data ); data );
#endif
} }
void Structural_BeamSection :: GL_DrawBeam (double pinit[3], double dir[3], const double dirz[3], Structural_Texture &texture) 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) if (texture.tag==0)
{ {
texture.setup(); texture.setup();
} }
#ifdef HAVE_FLTK
double X[3] = {dir[0],dir[1],dir[2]}; double X[3] = {dir[0],dir[1],dir[2]};
double Z[3] = {dirz[0],dirz[1],dirz[2]}; double Z[3] = {dirz[0],dirz[1],dirz[2]};
double Y[3]; double Y[3];
...@@ -634,6 +634,8 @@ void Draw_Kinematic_Constraint ( const int type [3], ...@@ -634,6 +634,8 @@ void Draw_Kinematic_Constraint ( const int type [3],
const double pos[3], const double pos[3],
double dir[3]) double dir[3])
{ {
#ifdef HAVE_FLTK
// presently, it's only 2D , 1st and second component are for dir and dir2 // presently, it's only 2D , 1st and second component are for dir and dir2
// and third one is for rotation around z // and third one is for rotation around z
...@@ -777,8 +779,7 @@ void Draw_Kinematic_Constraint ( const int type [3], ...@@ -777,8 +779,7 @@ void Draw_Kinematic_Constraint ( const int type [3],
glDisable(GL_LIGHTING); glDisable(GL_LIGHTING);
glColor4ubv((GLubyte *) & CTX.color.geom.point); glColor4ubv((GLubyte *) & CTX.color.geom.point);
#endif
} }
......
...@@ -45,7 +45,9 @@ extern "C" ...@@ -45,7 +45,9 @@ extern "C"
struct Structural_Texture struct Structural_Texture
{ {
std::string filename; std::string filename;
#ifdef HAVE_FLTK
GLuint tag ; GLuint tag ;
#endif
void setup(); void setup();
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment