Game Development Community

Lost in the new RenderInst...

by Chris Calef · in Torque Game Engine Advanced · 03/02/2009 (5:37 pm) · 3 replies

Hey, I'm trying to get my feet on the ground in 1.8 and am very unclear on the concept re: RenderInst & RenderPassManager...

Primary question I have is: does a class that wants to have a renderObject function need to be derived from SceneObject? All the examples I've seen so far are, but I have a physics manager class that is going to want to do a debug render, and this will just be a huge pile of verts and tris from the whole scene, not something that has any specific position of its own. It doesn't seem like making the physics manager itself be a scene object really makes sense. But can I have my physics manager insert itself into the scene graph and get called every time? (Or, am I even asking the right questions?)

Thanks for any assistance,
Chris

#1
03/03/2009 (1:36 am)
I do not claim my solution is perfect or the best, but I simply just gave the manager a render function, and called it from GameTSCtrl::renderWorld. I had formerly attached it to a SceneObject but the culling methods in SceneTraversal made it not so useful when facing away from the bounds box, which I didn't bother with as the geometry was pretty much everywhere.

Might or might not be useful to you. :) Have fun!
#2
03/03/2009 (10:10 am)
Ah, thanks Stefan, that sounds like a reasonable solution for what I want. Do not require perfection, functionality will suffice! :-)
#3
03/03/2009 (3:51 pm)
We've done the same thing before... added a ObjectRenderInst with a delegate that pointed to a non-SceneObject class. Its a perfectly valid use of the system.