Manually draw scene node
Posted: Fri Aug 13, 2010 4:26 am
In my current project I've come across a draw order issue, you can see it here: http://dl.dropbox.com/u/592301/whatIsThis.jpg
The issue is that the transparent glass is being drawn before the transparent background objects, so they inevitably fail the zdepth test. I'm aware that I can disable zwrite on the glass, or add some more nodes to my background objects to work around this issue, but I'd much rather just draw the background items before the foreground. So far, I've created a new scene node for all my background nodes to attach to, I've detached this node from the scene manager via the 'grab(); then remove()' trick, but simply calling render() on the node doesn't do anything. I also tried calling onRegisterSceneNode() but that just seems to add it to the scene manager's draw list, so is there some easy way to just render this node and all of its children before I hit drawAll()?
The issue is that the transparent glass is being drawn before the transparent background objects, so they inevitably fail the zdepth test. I'm aware that I can disable zwrite on the glass, or add some more nodes to my background objects to work around this issue, but I'd much rather just draw the background items before the foreground. So far, I've created a new scene node for all my background nodes to attach to, I've detached this node from the scene manager via the 'grab(); then remove()' trick, but simply calling render() on the node doesn't do anything. I also tried calling onRegisterSceneNode() but that just seems to add it to the scene manager's draw list, so is there some easy way to just render this node and all of its children before I hit drawAll()?