fix nogui build

This commit is contained in:
Christopher Lackner 2019-10-01 10:09:04 +02:00
parent 3e01cac707
commit b29e9ac3a1

View File

@ -1,14 +1,17 @@
#include <mystdlib.h> #include <mystdlib.h>
#include "meshing.hpp" #include "meshing.hpp"
#ifdef OPENGL
#include <visual.hpp> #include <visual.hpp>
#endif // OPENGL
namespace netgen namespace netgen
{ {
extern DLL_HEADER void Render(bool blocking = false);
static void glrender (int wait); static void glrender (int wait);
#ifdef OPENGL
extern DLL_HEADER void Render(bool blocking = false);
DLL_HEADER extern VisualSceneSurfaceMeshing vssurfacemeshing; DLL_HEADER extern VisualSceneSurfaceMeshing vssurfacemeshing;
VisualSceneSurfaceMeshing vssurfacemeshing; VisualSceneSurfaceMeshing vssurfacemeshing;
#endif // OPENGL
// global variable for visualization // global variable for visualization
// static NgArray<Point3d> locpoints; // static NgArray<Point3d> locpoints;
@ -247,19 +250,23 @@ namespace netgen
// double h; // double h;
auto locpointsptr = make_shared<NgArray<Point<3>>>(); auto locpointsptr = make_shared<NgArray<Point<3>>>();
vssurfacemeshing.locpointsptr = locpointsptr;
auto& locpoints = *locpointsptr; auto& locpoints = *locpointsptr;
NgArray<int> legalpoints; NgArray<int> legalpoints;
auto plainpointsptr = make_shared<NgArray<Point<2>>>(); auto plainpointsptr = make_shared<NgArray<Point<2>>>();
auto& plainpoints = *plainpointsptr; auto& plainpoints = *plainpointsptr;
vssurfacemeshing.plainpointsptr = plainpointsptr;
NgArray<int> plainzones; NgArray<int> plainzones;
auto loclinesptr = make_shared<NgArray<INDEX_2>>(); auto loclinesptr = make_shared<NgArray<INDEX_2>>();
auto &loclines = *loclinesptr; auto &loclines = *loclinesptr;
vssurfacemeshing.loclinesptr = loclinesptr;
int cntelem = 0, trials = 0, nfaces = 0; int cntelem = 0, trials = 0, nfaces = 0;
int oldnl = 0; int oldnl = 0;
#ifdef OPENGL
vssurfacemeshing.oldnl = oldnl; vssurfacemeshing.oldnl = oldnl;
vssurfacemeshing.loclinesptr = loclinesptr;
vssurfacemeshing.locpointsptr = locpointsptr;
vssurfacemeshing.plainpointsptr = plainpointsptr;
#endif // OPENGL
int qualclass; int qualclass;
@ -525,7 +532,10 @@ namespace netgen
{ {
oldnp = locpoints.Size(); oldnp = locpoints.Size();
oldnl = loclines.Size(); oldnl = loclines.Size();
#ifdef OPENGL
vssurfacemeshing.oldnl = oldnl; vssurfacemeshing.oldnl = oldnl;
#endif // OPENGL
if (debugflag) if (debugflag)
(*testout) << "define new transformation" << endl; (*testout) << "define new transformation" << endl;
@ -1467,7 +1477,11 @@ namespace netgen
(*testout) << adfront.GetGlobalIndex (pindex.Get(i)) << endl; (*testout) << adfront.GetGlobalIndex (pindex.Get(i)) << endl;
(*testout) << "old number of lines = " << oldnl << endl; (*testout) << "old number of lines = " << oldnl << endl;
#ifdef OPENGL
vssurfacemeshing.oldnl = oldnl; vssurfacemeshing.oldnl = oldnl;
#endif // OPENGL
for (int i = 1; i <= loclines.Size(); i++) for (int i = 1; i <= loclines.Size(); i++)
{ {
(*testout) << "line "; (*testout) << "line ";