mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
accidentally changed to indirect rendering - reverted that. formatting
This commit is contained in:
parent
37e0e17919
commit
9890e74429
@ -21,7 +21,7 @@ puts "togl-version : $toglversion"
|
|||||||
set toglok 0
|
set toglok 0
|
||||||
if { [Ng_GetToglVersion] == 2 } {
|
if { [Ng_GetToglVersion] == 2 } {
|
||||||
# Togl 2.x
|
# Togl 2.x
|
||||||
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 false -create init -display draw -reshape reshape }] } {
|
||||||
puts "no OpenGL"
|
puts "no OpenGL"
|
||||||
} {
|
} {
|
||||||
# puts "have Togl 2.1"
|
# puts "have Togl 2.1"
|
||||||
@ -29,7 +29,7 @@ if { [Ng_GetToglVersion] == 2 } {
|
|||||||
}
|
}
|
||||||
} {
|
} {
|
||||||
# Togl 1.7
|
# Togl 1.7
|
||||||
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 false }] } {
|
||||||
puts "no OpenGL"
|
puts "no OpenGL"
|
||||||
} {
|
} {
|
||||||
# puts "have Togl 1.7"
|
# puts "have Togl 1.7"
|
||||||
|
@ -157,6 +157,7 @@ void ParallelRun()
|
|||||||
|
|
||||||
display = XOpenDisplay (displname.c_str());
|
display = XOpenDisplay (displname.c_str());
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PrintMessage (3, "displ - name = ", displname);
|
PrintMessage (3, "displ - name = ", displname);
|
||||||
PrintMessage (3, "display = ", display,
|
PrintMessage (3, "display = ", display,
|
||||||
@ -269,13 +270,16 @@ void ParallelRun()
|
|||||||
// context = glXCreateContext( display, visinfo, 0, /* curContext, */ False );
|
// context = glXCreateContext( display, visinfo, 0, /* curContext, */ False );
|
||||||
context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False);
|
context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False);
|
||||||
glXMakeCurrent (display, curDrawable, context);
|
glXMakeCurrent (display, curDrawable, context);
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// try to get GLXcontext from the master.
|
// try to get GLXcontext from the master.
|
||||||
// this needs an indirect context (BUT DOES NOT WORK ????)
|
// this needs an indirect context (BUT DOES NOT WORK ????)
|
||||||
|
|
||||||
context = glXImportContextEXT ( display, contextid );
|
context = glXImportContextEXT ( display, contextid );
|
||||||
|
|
||||||
//PrintMessage (1, "GLX-contextid = " , contextid,
|
PrintMessage (1, "GLX-contextid = " , contextid,
|
||||||
// " imported context ", context);
|
" imported context ", context);
|
||||||
|
|
||||||
glXMakeCurrent (display, curDrawable, context);
|
glXMakeCurrent (display, curDrawable, context);
|
||||||
#endif
|
#endif
|
||||||
@ -283,7 +287,6 @@ void ParallelRun()
|
|||||||
// PrintMessage (1, "redraw - init complete");
|
// PrintMessage (1, "redraw - init complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (redraw_cmd == "broadcast")
|
if (redraw_cmd == "broadcast")
|
||||||
{
|
{
|
||||||
vsmesh.Broadcast ();
|
vsmesh.Broadcast ();
|
||||||
|
Loading…
Reference in New Issue
Block a user