I take it ESNRP_SOLID2 and ESNRP_TRANSPARENT2 are for 2-layer materials?
What happens to nodes which contain more than one material? Like for example if I have a lightmapped model with glass windows, does it still get rendered in the transparent pass and solid2, with the render part of the node splitting these up? this is also bad imo (not your doing, it's always been like that)
okay i might be talking out of the wrong end here, but since we're discussing major scene manager changes i'll throw in my own idea (python pseudocode)
Code: Select all
// node::OnAnimate - called on each node once per loop
// node::OnRegisterSceneNode -
// 1) mesh buffers are split and added to render queue
// (node pointer needed for absolute transform and bounding box in light manager)
smgr.registerMesh(this, mesh)
// or 2) node draws its self in specific render pass(es)
// for special nodes, like the text, shadow or billboard node
smgr.registerNode(this, ESNRP_SOLID | ESNRP_SHADOW)
// or 3) camera registers its self with a priority
// so the camera list can be sorted
smgr.registerCamera(this, priority)
// node::render
// only called on nodes that set draw manually, also cameras
// smgr::drawAll
onRegisterSceneNode() // register all visible nodes
cull check // all cameras vs all registered nodes
onAnimate(time, isCulled) // animators operate on culled nodes, but skinning is optional
// loop through each active camera
for camera in cameraList:
// set render target, transform, and clip planes
camera.render()
// loop through all render passes
for listOfThingsToRender in allPasses:
// loop through all things to render in this pass
for SThing in listOfThingsToRender:
// render it if it isn't culled this pass
// each thing in the render list stores what cameras it can be seen by
if !SThing.isCulled[cameraNumber]:
// if it is a mesh buffer
if SThing.isBuffer:
lightManager.setLights(SThing.bbox, SThing.transform, SThing.buffer.getMaterial())
driver.setMaterial(SThing.buffer.getMaterial()) // usually the same
draw the buffer
else:
lightManager.setLights(SThing.node)
SThing.node.render()
flames/comments/suggestions appreciated


