Game Development Community

How to determine how long a SceneOjbect was rendered for...

by Lateral Punk · in Torque Game Engine · 07/13/2006 (2:04 pm) · 1 replies

Hi there,
I need to determine a time value that represents how long a SceneObject was rendered for. I was thinking of starting a timer on the first call to ::renderObject() would be my first step. However, I cannot determine when to stop this timer (i.e. when the object goes out of view NOT scope). Is there a function that let's me know that the object has gone out of view. Kind of like with triggers onEnterTrigger and onLeaveTrigger, but not really like them (cause I don't want to use them). I think this has to do with containers, bins, and all that good stuff, but basically I'm just looking for a hook-in (if one exists) that will show me when it started and when it stopped. I am obviously working at the engine level, so I'm not looking for a raycast kind of solution, I was just thinking of a hook-in into something that already exists, or if required, just adding some extra functionality that will give me this start/stop scenario.

thanks

#1
07/13/2006 (2:27 pm)
Well I just noticed that the determination of what sceneobjects are to be rendered occurs every frame. That is at the end of a frame render, the SceneObjects that were rendered before are not kept in any kind of list. I infer this because a new SceneState is created every frame. This would mean that I could not determine the required information from above. I hope I am wrong, but any clarification would be great.