Bluesoma
12-12-2006 04:16:24
I'm fairly new to Ogre and nxOgre, enough to screw up though ^^
So I've enabled Debug mode similar to the tutorials, but I'm having some troubles with it during runtime.
I the collision meshes shows up, as does the xyz axes. I also get a xyz axis at what seems to be the origin of the world.
The problem occurs while the program is running. I'll move my mesh, which the camera is attached to. And when the axes at the origin are out of view the collision mesh and axes disappear, overlay still remains though. The collision mesh reappears when I move the camera around to get the origin in view. So I know somewhat what the cause, it's only the solution I lack.
DaCracker
12-12-2006 07:39:23
There are some problems with debugging with nxOgre atm. This is because of it's dependency PhysX. Try to build your project in release mode and
see if it works there.
betajaen
12-12-2006 07:50:10
It may be due to bounding boxes; it (Ogre) is thinking that your not in view of the debug node thus not rendering it all.
I've also noted (although it won't apply to you at all, unless you've modified NxOgre) that the debug overlay will not render at all placed in a frameAfter event.
Bluesoma
12-12-2006 16:54:29
I'm compiling in release mode.
I was thinking it had to be due to bounding box of the debug node. Is there some function to make it always render even when not in view? Or maybe move the debug node with the camera or attach it to something?
I tried looking through the tutorials and seeing how it's done there since it seems to work fine there when the node isn't in view. Maybe I'm missing soemthing.
betajaen
12-12-2006 17:13:14
I can't see how, the bounding box is set to infinite.
Bluesoma
12-12-2006 17:36:07
Hmm. Maybe I'm screwing something up, because I kind of hacked to make the debug mode work hehe.
Here's what I have to start the debug when I press a button:
world::getSingleton().showDebugOverlay(mCamera,mRoot->getAutoCreatedWindow());
world::getSingleton().debug( world::getSingleton().isDebugRendering() ^ 1);
And then I have a material script
material NxOgre.debugNode
{
technique
{
pass
{
lighting on
scene_blend add
depth_check on
depth_write on
cull_hardware none
ambient 0.3 0.5 0.9
}
pass
{
lighting off
scene_blend add
depth_check off
depth_write off
cull_hardware none
texture_unit
{
texture axes.png
}
}
}
}
The material script is where I feel I hacked it alittle. With just one pass it'd display the collision mesh and axes in one color unless I turn the light off then the collision mesh would disappear.
Though...with some messing with it, it still goes away when the debug node is out of view.