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/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)
#
# 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

View File

@ -7,13 +7,11 @@ set oldmousey 0
# 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 }] } {
puts "no OpenGL"
} {
#

View File

@ -7,7 +7,7 @@ if {[catch {package require Tix } result ]} {
# if {[catch {package require Togl 2.0 } result ]} {
# puts "cannot find package Togl 2.0"
# puts "error : $result"
# puts "error : $result"
# }

View File

@ -3224,14 +3224,18 @@ namespace netgen
static int
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)
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 << "success" << endl;
// togl_font = Togl_LoadBitmapFont( togl, TOGL_BITMAP_8_BY_13 );
// togl_font = Togl_LoadBitmapFont( togl, NULL );
// cout << "success" << endl;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@ -5196,20 +5200,17 @@ namespace netgen
(ClientData)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,
* and reshape.
*/
#if TOGL_MAJOR_VERSION==1
if(!nodisplay)
if (!nodisplay)
{
if (Togl_Init(interp) == TCL_ERROR)
return TCL_ERROR;
Togl_CreateFunc( init );
Togl_DestroyFunc( zap );
Togl_DisplayFunc( draw );
@ -5220,18 +5221,17 @@ namespace netgen
// Togl_CreateCommand("position",position);
}
#else
if(!nodisplay)
if (!nodisplay)
{
if (Togl_Init(interp) == TCL_ERROR)
return TCL_ERROR;
Tcl_CreateObjCommand(interp, "init", init, NULL, NULL);
Tcl_CreateObjCommand(interp, "zap", zap, NULL, NULL);
Tcl_CreateObjCommand(interp, "draw", draw, 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_CreateCommand( (char*)"Ng_SnapShot", Ng_SnapShot);
// Togl_CreateCommand( (char*)"Ng_VideoClip", Ng_VideoClip);