Introduction of bge.types.KX_Scene.pre_render
Open, NormalPublic


With Blender CAVE, we have to synchronize the rendering nodes once per frame. This mechanism rely on gathering scene objects informations (mainly position and orientation) inside the master node and sending them to the slaves to update their own scene.
The previous version where instantiated as a python script controller attached to the camera. We don't have find a way to manage the schedule of each action of the logic. Thus, the synchronization occured before some object displacements Logic. Then, the slaves are one step later. Sometimes, the update didn't occur at all, even next step on the slaves.
The only solution is to be sure that the execution of BlenderCAVE synchronization mechanisme occurs after all other logic. We have found the bge.types.KX_Scene.pre_draw. But this method is call as many time as drawing is done. Thus, in case of stereoscopic rendering, it is drawn twice per frame.

So, we suggest to integrate a pre_draw method that is call just after the activation of the current scene. It is implemented the same way than pre_draw and post_draw.

You will find the patch as attachment.