Ybalrid / Annwvyn

Annwvyn C++ Open Source designed-for-VR game engine and application developement framework
MIT License
41 stars 7 forks source link

Demo hub #51

Closed Ybalrid closed 8 years ago

Ybalrid commented 8 years ago

Made the example program create a hub of demos of the engine. Each demo is a level. The hub permit to teleport to each demo. There's only 2 thing in the demo "selection" but the hub is functional.

This permit to identify a bug when a level jump was performed when a callback of an event was performed, and the level was removing the event from the event manager, this invalidating an iterator there and causing a segfault. This was corrected by making the level manager wait for the next frame to be ran. LevelManager is the first updated subsystem by the engine, i.e. there's no significant delay is observable by doing this.

Other noteworthy changes are some clean up and correction of the OgreVRRender (and derived classes) API on the setting of near/far planes distances.

This also exposed the fact that the engine API has no easy way to expose events cauch by an event listener to a Level "logic code". The level logic consist only on a single method called by the engine at the start of a frame. There's some architectural work to be done there, but it's better explained in the DemoUtils.hpp file located under the example directory. This is the most useful thing to change on the engine now.