diff --git a/config.h.in b/config.h.in index a71eeea9..1b506b31 100644 --- a/config.h.in +++ b/config.h.in @@ -67,6 +67,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/libsrc/geom2d/Makefile.am b/libsrc/geom2d/Makefile.am index b7a2289a..d25193e0 100644 --- a/libsrc/geom2d/Makefile.am +++ b/libsrc/geom2d/Makefile.am @@ -6,7 +6,7 @@ METASOURCES = AUTO lib_LTLIBRARIES = libgeom2d.la libgeom2dvis.la libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp - +libgeom2d_la_LIBADD = ../gprim/libgprim.la ../meshing/libmesh.la libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp libgeom2dvis_la_LIBADD = libgeom2d.la diff --git a/libsrc/geom2d/geom2dpkg.cpp b/libsrc/geom2d/geom2dpkg.cpp index aabe58fa..a58b88e5 100644 --- a/libsrc/geom2d/geom2dpkg.cpp +++ b/libsrc/geom2d/geom2dpkg.cpp @@ -69,4 +69,5 @@ extern "C" int Ng_geom2d_Init (Tcl_Interp * interp); int Ng_geom2d_Init (Tcl_Interp * interp) { geometryregister.Append (new SplineGeometryRegister); + return TCL_OK; } diff --git a/libsrc/geom2d/geometry2d.hpp b/libsrc/geom2d/geometry2d.hpp index b57138c7..7a02fbdc 100644 --- a/libsrc/geom2d/geometry2d.hpp +++ b/libsrc/geom2d/geometry2d.hpp @@ -11,7 +11,7 @@ #include -#include "../gprim/spline.hpp" +// #include "../gprim/spline.hpp" #include "../gprim/splinegeometry.hpp" #include "geom2dmesh.hpp" @@ -22,7 +22,7 @@ namespace netgen class SplineSegExt : public SplineSeg<2> { public: - const SplineSeg & seg; + const SplineSeg<2> & seg; /// left domain int leftdom; @@ -43,7 +43,7 @@ namespace netgen /// int layer; - SplineSegExt (const SplineSeg & hseg) + SplineSegExt (const SplineSeg<2> & hseg) : seg(hseg) { layer = 1; diff --git a/ng/Makefile.am b/ng/Makefile.am index 46ba7df1..246a788b 100644 --- a/ng/Makefile.am +++ b/ng/Makefile.am @@ -13,7 +13,7 @@ netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \ $(top_builddir)/libsrc/gprim/libgprim.la \ $(top_builddir)/libsrc/linalg/libla.la \ $(top_builddir)/libsrc/general/libgen.la \ - -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) + -L$(TK_BIN_DIR)/Togl2.0 $(TOGLLIBDIR) -lTogl2.0 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) # # $(top_builddir)/libsrc/occ/liboccvis.la # $(top_builddir)/libsrc/occ/libocc.la diff --git a/ng/drawing.tcl b/ng/drawing.tcl index bd3ec5c9..46d1f0a7 100644 --- a/ng/drawing.tcl +++ b/ng/drawing.tcl @@ -11,8 +11,7 @@ set oldmousey 0 # if { 1 } { # if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect true -create init -display draw -reshape reshape }] } { -if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect true }] } { - puts "no OpenGL" +if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect true -create init -display draw -reshape reshape }] } { puts "no OpenGL" } { # pack .ndraw -expand true -fill both -padx 10 -pady 10 diff --git a/ng/ng.tcl b/ng/ng.tcl index 85014950..efd9ab00 100644 --- a/ng/ng.tcl +++ b/ng/ng.tcl @@ -85,7 +85,7 @@ catch { if { [catch { load libgeom2dvis[info sharedlibextension] Ng_Geom2d } result ] } { - puts "cannot load 2d meshing mordule" + puts "cannot load 2d meshing module" puts "error: $result" } diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp index c710b648..a7a0a73c 100644 --- a/ng/ngpkg.cpp +++ b/ng/ngpkg.cpp @@ -26,8 +26,8 @@ The interface between the GUI and the netgen library // to be sure to include the 'right' togl-version -#include "togl_1_7.h" -// #include "Togl2/togl.h" +// #include "togl_1_7.h" +#include "togl_2_0.h" extern bool nodisplay; @@ -1921,27 +1921,27 @@ namespace netgen // Sorry, Togl 2.0 not supported Tcl_Obj * togl_font; - + Togl * togl = NULL; + void MyOpenGLText (const char * text) { - cout << "togl - text" << endl; + // cout << "togl - text: " << text << endl; + Togl_WriteChars (togl, togl_font, text, strlen(text)); } - - static int init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { cout << "call init" << endl; - Togl * togl = NULL; if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; - cout << "call Togl - load font (crash on my Linux64)" << endl; - // togl_font = Togl_LoadBitmapFont( togl, "Times"); // TOGL_BITMAP_8_BY_13 ); - // togl_font = Togl_LoadBitmapFont( togl, TOGL_BITMAP_8_BY_13 ); + cout << "call Togl - load font (crashes on my OpenSuse Linux64)" << endl; + // togl_font = Togl_LoadBitmapFont( togl, "Helvetica"); + // togl_font = Togl_LoadBitmapFont( togl, "Times"); + togl_font = Togl_LoadBitmapFont( togl, TOGL_BITMAP_8_BY_13 ); // togl_font = Togl_LoadBitmapFont( togl, NULL ); cout << "success" << endl; @@ -1964,19 +1964,14 @@ namespace netgen static int draw(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { - Togl * togl; - if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) - return TCL_ERROR; - - SetVisualScene (interp); glPushMatrix(); + glLoadIdentity(); - // gluLookAt (0, 0, 6, 0, 0, 0, 0, 1, 0); vs->DrawScene(); - Togl_SwapBuffers(togl); + glPopMatrix(); return TCL_OK; @@ -1985,10 +1980,6 @@ namespace netgen static int reshape(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { - Togl * togl; - if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) - return TCL_ERROR; - int w = Togl_Width (togl); int h = Togl_Height (togl); @@ -2004,8 +1995,6 @@ namespace netgen gluPerspective(20.0f, double(w) / h, pnear, pfar); glMatrixMode(GL_MODELVIEW); - // draw (togl); - return TCL_OK; }