Render only called when on screen
Render only called when on screen
I recently realised that my render() on my scene nodes are being called even when the objects aren't on screen, is there a standard way in the engine of culling those that aren't visible? I thought it was done automatically, was kind of surprised to see them called.
-
DarkDepths
- Posts: 126
- Joined: Sun Apr 02, 2006 1:21 am
- Location: Canada
I also thought they should be culled by Irrlicht automatically... are you sure they are actually be drawn? From what I know, Irrlicht culls be testing each Scene Node's position, so is it possible that what you are seeing is just Irrlicht checking whether they are in the frustum or not?
Also, check out Sudi's OctreeSceneManager, it's in the code snippets.
Also, check out Sudi's OctreeSceneManager, it's in the code snippets.
-
Lonesome Ducky
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Before rendering:
That makes the object be culled by the camera's view and its bounding box. I'm not sure if Irrlicht automatically culls custom scene nodes, but this definitely works.
Code: Select all
this->setAutomaticCulling(irr::scene::EAC_FRUSTUM_BOX)Ah, great. That did it. Thanks for the helpLonesome Ducky wrote:Before rendering:That makes the object be culled by the camera's view and its bounding box. I'm not sure if Irrlicht automatically culls custom scene nodes, but this definitely works.Code: Select all
this->setAutomaticCulling(irr::scene::EAC_FRUSTUM_BOX)