libglui / glui

GLUI is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, using GLUT or FreeGLUT.
Other
196 stars 81 forks source link

GLUI_Rollout closed set_w #1

Open josch opened 9 years ago

josch commented 9 years ago

https://sourceforge.net/p/glui/bugs/1/

original report

In glui example5.cpp ln 407

/ Add another rollout /
GLUI_Rollout *options = glui->add_rollout( "Options",
false );
glui->add_checkbox_to_panel( options, "Draw sphere",
&show_sphere );
glui->add_checkbox_to_panel( options, "Draw torus",
&show_torus );
glui->add_checkbox_to_panel( options, "Draw axes",
&show_axes );
glui->add_checkbox_to_panel( options, "Draw text",
&show_text );

If you want to set a width using the following command on a closed rollout: options->set_w(180);

This will cause the rollout to malfunction. It seems to not refresh the frame containing the glui elements.

Cheers Stefan

Problem observed in following case:

/ Add another rollout /
GLUI_Rollout *options = glui->add_rollout( "Options",
true );
glui->add_checkbox_to_panel( options, "Draw sphere",
&show_sphere );
glui->add_checkbox_to_panel( options, "Draw torus",
&show_torus );
glui->add_checkbox_to_panel( options, "Draw axes",
&show_axes );
glui->add_checkbox_to_panel( options, "Draw text",
&show_text );

options->close();
options->set_w(180);

reply 1

Yes, this is a serious problem putting the GLUI application in an unusable state. At a quick glance, it seems to be related to the call to glui->pack_controls() in GLUI_Control::set_w.

reply 2

This bug seems top depend on the OpenGL library:

With libGL of libxfree86-4.3-23mdk (LD_PRELOAD=/usr/X11R6/lib/libGL.so.1.2 bin/example5) and libGL of libMesaGL1-5.0.1-5mdk ( LD_PRELOAD=/usr/X11R6/libGL.so.1.4.501 bin/example5) this bug is not present.

But with the OpenGL library provided by the NVIDIA driver version 4496 (LD_PRELOAD=/usr/lib/libGL.so.1.0.4496 bin/example5) I have exactly the same bug.

(I am under Mandrake Linux 9.2)