mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 01:57:45 +08:00
Fixed seg fault on start with >= VTK9.1, MACOSX: fixed bundle with homebrew
This commit is contained in:
+9
-1
@@ -39,6 +39,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <vtkVersionMacros.h>
|
||||
#include <vtkObject.h>
|
||||
|
||||
#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION==9 && VTK_MINOR_VERSION >= 1)
|
||||
#include <QVTKRenderWidget.h>
|
||||
#endif
|
||||
|
||||
using namespace rtabmap;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
@@ -51,9 +55,13 @@ int main(int argc, char* argv[])
|
||||
CoInitialize(nullptr);
|
||||
#endif
|
||||
|
||||
#if VTK_MAJOR_VERSION >= 8
|
||||
#if VTK_MAJOR_VERSION >= 8 && defined(BUILD_AS_BUNDLE)
|
||||
vtkObject::GlobalWarningDisplayOff();
|
||||
#endif
|
||||
#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION==9 && VTK_MINOR_VERSION >= 1)
|
||||
// needed to ensure appropriate OpenGL context is created for VTK rendering.
|
||||
QSurfaceFormat::setDefaultFormat(QVTKRenderWidget::defaultFormat());
|
||||
#endif
|
||||
|
||||
/* Create tasks */
|
||||
QApplication * app = new QApplication(argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user