Excellent! The functionality I was after was mainly for sanity checks/debugging, so no user was actually going to use it so it didn't have to be real real smooth, but I ended up doing this:
vgui::adapt(shell,1000,1000,"Test"); //display the first point and stop
cin >> t;
vgui::adapt(shell,1000,1000,"Test"); //display the second point and stop again
cin >> t;
return vgui::run(shell, Width, Height, "Parameter Estimation"); //enter normal mode
Maybe a little tutorial like this could be put somewhere in the documentation/examples?
Thanks for the help!
[posting back to the list for archival.]
I assume you mean that the GUI is frozen, and not that you don't have a
David Doria wrote:
> I saw that vgui::adapt() does like you said and draws it but doesn't let
> you rotate/zoom.
viewer2d/3d (which is what allows the zoom and rotate).
This is because the GUI events are only handled during vgui::run and
vgui::run_till_idle. At all other times, the GUI is frozen.
In general, when you modify the contents of a tableau, you should
> So then how do I add a Point to the screen? I was thinking
> REFRESH VIEWER
> REFRESH SHELL
execute a post_redraw() on that tableau. Not on every modification, but
after a block of modifications. (Not necessary to post the redraw on
any other tableau.) So
You may also want to consider making the input fully "GUIized", using
vgui_menu and vgui_dialog. There are some examples in vgui/examples
about how to set up callbacks for menu items, and how to construct
dialog boxes to read various input.