From b29e9ac3a1f7423a0f49ed30e6798688156ad193 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 1 Oct 2019 10:09:04 +0200 Subject: [PATCH] fix nogui build --- libsrc/meshing/meshing2.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/libsrc/meshing/meshing2.cpp b/libsrc/meshing/meshing2.cpp index e254c32b..cdcbc3a7 100644 --- a/libsrc/meshing/meshing2.cpp +++ b/libsrc/meshing/meshing2.cpp @@ -1,14 +1,17 @@ #include #include "meshing.hpp" +#ifdef OPENGL #include +#endif // OPENGL namespace netgen { - extern DLL_HEADER void Render(bool blocking = false); static void glrender (int wait); +#ifdef OPENGL + extern DLL_HEADER void Render(bool blocking = false); DLL_HEADER extern VisualSceneSurfaceMeshing vssurfacemeshing; VisualSceneSurfaceMeshing vssurfacemeshing; - +#endif // OPENGL // global variable for visualization // static NgArray locpoints; @@ -247,19 +250,23 @@ namespace netgen // double h; auto locpointsptr = make_shared>>(); - vssurfacemeshing.locpointsptr = locpointsptr; auto& locpoints = *locpointsptr; NgArray legalpoints; auto plainpointsptr = make_shared>>(); auto& plainpoints = *plainpointsptr; - vssurfacemeshing.plainpointsptr = plainpointsptr; NgArray plainzones; auto loclinesptr = make_shared>(); auto &loclines = *loclinesptr; - vssurfacemeshing.loclinesptr = loclinesptr; int cntelem = 0, trials = 0, nfaces = 0; int oldnl = 0; + +#ifdef OPENGL vssurfacemeshing.oldnl = oldnl; + vssurfacemeshing.loclinesptr = loclinesptr; + vssurfacemeshing.locpointsptr = locpointsptr; + vssurfacemeshing.plainpointsptr = plainpointsptr; +#endif // OPENGL + int qualclass; @@ -525,7 +532,10 @@ namespace netgen { oldnp = locpoints.Size(); oldnl = loclines.Size(); + +#ifdef OPENGL vssurfacemeshing.oldnl = oldnl; +#endif // OPENGL if (debugflag) (*testout) << "define new transformation" << endl; @@ -1467,7 +1477,11 @@ namespace netgen (*testout) << adfront.GetGlobalIndex (pindex.Get(i)) << endl; (*testout) << "old number of lines = " << oldnl << endl; + +#ifdef OPENGL vssurfacemeshing.oldnl = oldnl; +#endif // OPENGL + for (int i = 1; i <= loclines.Size(); i++) { (*testout) << "line ";