浏览代码

core/progs/imageDemo: do not call showImage if GLUT is not available

bodesheim 11 年之前
父节点
当前提交
b3d13e9bda
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      core/progs/imageDemo.cpp

+ 6 - 0
core/progs/imageDemo.cpp

@@ -26,11 +26,15 @@ int main ( int argc, char **argv )
 	ColorImage srcColor ( argv[1] );
 	ColorImage srcColor ( argv[1] );
 
 
   // show the image and wait for the window being closed manually
   // show the image and wait for the window being closed manually
+#ifdef NICE_USELIB_GLUT
 #ifdef NICE_USELIB_QT
 #ifdef NICE_USELIB_QT
   showImage ( srcColor );
   showImage ( srcColor );
 #else
 #else
   cerr << "Visualization disabled: no QT library available" << endl;
   cerr << "Visualization disabled: no QT library available" << endl;
 #endif
 #endif
+#else 
+  cerr << "Visualization disabled: no GLUT library available" << endl;
+#endif
 
 
   // simple grayvalue image
   // simple grayvalue image
   Image src;
   Image src;
@@ -48,9 +52,11 @@ int main ( int argc, char **argv )
   ColorImage gradientColor;
   ColorImage gradientColor;
   imageToPseudoColor ( gradient, gradientColor );
   imageToPseudoColor ( gradient, gradientColor );
 
 
+#ifdef NICE_USELIB_GLUT
 #ifdef NICE_USELIB_QT
 #ifdef NICE_USELIB_QT
   showImage ( gradientColor );
   showImage ( gradientColor );
 #endif
 #endif
+#endif
 
 
 
 
 }
 }