This commit is contained in:
Joachim Schoeberl 2009-09-08 22:14:23 +00:00
parent 72a211674c
commit 55f164c6c6
4 changed files with 21 additions and 24 deletions

View File

@ -17,7 +17,6 @@ netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \
$(top_builddir)/libsrc/linalg/libla.la \ $(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la \ $(top_builddir)/libsrc/general/libgeneral.la \
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS)
# #
# add for static linkage of ngsolve: # add for static linkage of ngsolve:
# /opt/netgen/lib/libngsolve.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngfemng.a /opt/netgen/lib/libngmg.a /opt/netgen/lib/libngla.a /opt/netgen/lib/libngbla.a /opt/netgen/lib/libngstd.a -llapack # /opt/netgen/lib/libngsolve.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngfemng.a /opt/netgen/lib/libngmg.a /opt/netgen/lib/libngla.a /opt/netgen/lib/libngbla.a /opt/netgen/lib/libngstd.a -llapack

View File

@ -7,13 +7,11 @@ set oldmousey 0
# if { 1 } { # if { 1 } {
# use this one for Togl 2.0
# 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 -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 }] } { if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect true }] } {
puts "no OpenGL" puts "no OpenGL"
} { } {
# #

View File

@ -3224,14 +3224,18 @@ namespace netgen
static int static int
init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv)
{ {
Togl * togl; cout << "call init" << endl;
Togl * togl = NULL;
if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK)
return TCL_ERROR; return TCL_ERROR;
cout << "call Togl - load font (crash on my Linux64)" << endl; 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, "Times"); // TOGL_BITMAP_8_BY_13 );
togl_font = Togl_LoadBitmapFont( togl, TOGL_BITMAP_8_BY_13 ); // togl_font = Togl_LoadBitmapFont( togl, TOGL_BITMAP_8_BY_13 );
cout << "success" << endl; // togl_font = Togl_LoadBitmapFont( togl, NULL );
// cout << "success" << endl;
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
@ -5196,12 +5200,6 @@ namespace netgen
(ClientData)NULL, (ClientData)NULL,
(Tcl_CmdDeleteProc*) NULL); (Tcl_CmdDeleteProc*) NULL);
#if TOGL_MAJOR_VERSION==1
if (!nodisplay && Togl_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
#endif
/* /*
* Specify the C callback functions for widget creation, display, * Specify the C callback functions for widget creation, display,
@ -5210,6 +5208,9 @@ namespace netgen
#if TOGL_MAJOR_VERSION==1 #if TOGL_MAJOR_VERSION==1
if (!nodisplay) if (!nodisplay)
{ {
if (Togl_Init(interp) == TCL_ERROR)
return TCL_ERROR;
Togl_CreateFunc( init ); Togl_CreateFunc( init );
Togl_DestroyFunc( zap ); Togl_DestroyFunc( zap );
Togl_DisplayFunc( draw ); Togl_DisplayFunc( draw );
@ -5222,16 +5223,15 @@ namespace netgen
#else #else
if (!nodisplay) if (!nodisplay)
{ {
if (Togl_Init(interp) == TCL_ERROR)
return TCL_ERROR;
Tcl_CreateObjCommand(interp, "init", init, NULL, NULL); Tcl_CreateObjCommand(interp, "init", init, NULL, NULL);
Tcl_CreateObjCommand(interp, "zap", zap, NULL, NULL); Tcl_CreateObjCommand(interp, "zap", zap, NULL, NULL);
Tcl_CreateObjCommand(interp, "draw", draw, NULL, NULL); Tcl_CreateObjCommand(interp, "draw", draw, NULL, NULL);
Tcl_CreateObjCommand(interp, "reshape", reshape, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape", reshape, NULL, NULL);
/*
Togl_CreateFunc( init );
Togl_DestroyFunc( zap );
Togl_DisplayFunc( draw );
Togl_ReshapeFunc( reshape );
*/
// Togl_TimerFunc( idle ); // Togl_TimerFunc( idle );
// Togl_CreateCommand( (char*)"Ng_SnapShot", Ng_SnapShot); // Togl_CreateCommand( (char*)"Ng_SnapShot", Ng_SnapShot);
// Togl_CreateCommand( (char*)"Ng_VideoClip", Ng_VideoClip); // Togl_CreateCommand( (char*)"Ng_VideoClip", Ng_VideoClip);