On Tue, 2009-03-24 at 02:45 -0700, Nicolas Verbeke wrote:
> Hi all
> I'm new to OpenVRML (actually I'm even new to VRML at all.)
> I created a sub-class of openvrml::gl::viewer in C++ with the required
> functions: post_dedraw, set_cursor, swap_buffers and set_timer. I also
> created an openvrml::browser and did the correct binding between the viewer
> and the brower.
> The first three functions seem to work as expected, and I have no problem
> viewing still scenes.
> Now I'm trying to display an animated scene. I created a VRML file that I
> load with myBrower->load_url.
> The problem is, the function set_timer in the viewer is never called.
> I suppose that I forgot to do something somewhere, either in the VRML file
> or in the C++ code.
> Does anyone have any idea about what I did wrong?
It sounds like perhaps you don't have an event loop. OpenVRML doesn't
provide you with such a loop; you need to drive it from one you provide.
Have a look at how this works in the sdl-viewer example; especially
sdl_viewer::run and update_timer_callback.
--
Braden McDaniel e-mail: <br...@en...>
<http://endoframe.com> Jabber: <br...@ja...>
|