mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
togl2.0
This commit is contained in:
parent
72a211674c
commit
55f164c6c6
@ -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
|
||||||
|
@ -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"
|
||||||
} {
|
} {
|
||||||
#
|
#
|
||||||
|
@ -7,7 +7,7 @@ if {[catch {package require Tix } result ]} {
|
|||||||
|
|
||||||
# if {[catch {package require Togl 2.0 } result ]} {
|
# if {[catch {package require Togl 2.0 } result ]} {
|
||||||
# puts "cannot find package Togl 2.0"
|
# puts "cannot find package Togl 2.0"
|
||||||
# puts "error : $result"
|
# puts "error : $result"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
||||||
|
34
ng/ngpkg.cpp
34
ng/ngpkg.cpp
@ -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,20 +5200,17 @@ 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,
|
||||||
* and reshape.
|
* and reshape.
|
||||||
*/
|
*/
|
||||||
#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 );
|
||||||
@ -5220,18 +5221,17 @@ namespace netgen
|
|||||||
// Togl_CreateCommand("position",position);
|
// Togl_CreateCommand("position",position);
|
||||||
}
|
}
|
||||||
#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);
|
||||||
|
Loading…
Reference in New Issue
Block a user