Busy day today. Fixed 2 bugs/problems in my program.
The first one is my z-order problem. Had to recompile Irrlicht for that.
Second one is realizing that automatic culling is not based on the view frustrum but by some box by default, and that made my culling absolutely horrid. Went from 20 to 60 fps after setting my nodes to the EAC_FRUSTRUM_BOX state.
Changes I made (I'll forget to mention this later):
1) "AutomaticCullingState = EAC_FRUSTRUM_BOX;" instead of "AutomaticCullingState = EAC_BOX;" on line 27 in CLensFlareSceneNode.cpp.
2) Culling stuff:
Irrlichtwrapper.bi:
Code: Select all
' Enumeration for all types of automatic culling for built-in scene nodes.
ENUM IRR_E_CULLING_TYPE
EAC_OFF = 0
EAC_BOX = 1
EAC_FRUSTUM_BOX = 2
EAC_FRUSTUM_SPHERE = 4
END ENUM
Code: Select all
declare sub IrrSetNodeAutomaticCulling alias "IrrSetNodeAutomaticCulling" (byval node as irr_node, byval value as ubyte)
Code: Select all
void DLL_EXPORT IrrSetNodeAutomaticCulling (IAnimatedMeshSceneNode* node, u8 value) {
node->setAutomaticCulling((irr::scene::E_CULLING_TYPE)value);
}