From 9e43ae162bb75aed6f45cbf2ae088d5c59072b23 Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Wed, 18 Aug 2010 13:27:36 +0000 Subject: [PATCH] Avoid calling glutInit() on Mac platforms since this causes an error saying that glut is being initialized twice git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@334 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Apps/Decimating/decimaterviewer.cc | 2 ++ src/OpenMesh/Apps/QtViewer/meshviewer.cc | 3 ++- src/OpenMesh/Apps/Subdivider/qtsubdivider.cc | 2 ++ src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/OpenMesh/Apps/Decimating/decimaterviewer.cc b/src/OpenMesh/Apps/Decimating/decimaterviewer.cc index 303973b7..fae19010 100644 --- a/src/OpenMesh/Apps/Decimating/decimaterviewer.cc +++ b/src/OpenMesh/Apps/Decimating/decimaterviewer.cc @@ -70,7 +70,9 @@ int main(int argc, char **argv) QApplication::setColorSpec( QApplication::CustomColor ); QApplication app(argc,argv); +#if !defined(__APPLE__) glutInit(&argc,argv); +#endif if ( !QGLFormat::hasOpenGL() ) { QString msg = "System has no OpenGL support!"; diff --git a/src/OpenMesh/Apps/QtViewer/meshviewer.cc b/src/OpenMesh/Apps/QtViewer/meshviewer.cc index 6f183e82..e1bc9071 100644 --- a/src/OpenMesh/Apps/QtViewer/meshviewer.cc +++ b/src/OpenMesh/Apps/QtViewer/meshviewer.cc @@ -68,8 +68,9 @@ int main(int argc, char **argv) // OpenGL check QApplication::setColorSpec( QApplication::CustomColor ); QApplication app(argc,argv); - +#if !defined(__APPLE__) glutInit(&argc,argv); +#endif if ( !QGLFormat::hasOpenGL() ) { QString msg = "System has no OpenGL support!"; diff --git a/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc b/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc index ab07b06f..88c4cb20 100644 --- a/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc @@ -62,7 +62,9 @@ int main(int argc, char **argv) QApplication::setColorSpec( QApplication::CustomColor ); QApplication app(argc,argv); +#if !defined(__APPLE__) glutInit(&argc,argv); +#endif if ( !QGLFormat::hasOpenGL() ) { QString msg = "System has no OpenGL support!"; diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc index ceaddc14..795a241e 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/vdpmsynthesizer.cc @@ -62,7 +62,9 @@ int main(int argc, char **argv) QApplication::setColorSpec( QApplication::CustomColor ); QApplication app(argc,argv); +#if !defined(__APPLE__) glutInit(&argc,argv); +#endif if ( !QGLFormat::hasOpenGL() ) { std::cerr << "This system has no OpenGL support.\n";