glob3mobile / g3m

The multiplatform advanced visualization framework
http://www.glob3mobile.com/
Other
116 stars 56 forks source link

Stereo mode pre-render and post-render hook #188

Open Matyooo opened 8 years ago

Matyooo commented 8 years ago

Hi @DiegoGomezDeck !

Another questions regarding stereo behaviour: In our app there is a lot of update code per frame. This code is running in a 'pre-render hook', that is created from a DefaultRenderer which is executed first as it is the first renderer given to the builder.

This approach works nicely until the app switches to Stereo mode because in stereo, all renderer is called twice. This causes our update code to run twice per frame. My suggestion would be to create a method hook that runs only once per frame. Maybe one before the frame starts and another after the frame ends.

What do you think?