I just published the Ogre 1.12.4 holiday release. Besides wishing you all a merry Christmas, there are new features that deserve an in-depth description.
OGRE_NODELESS_POSITIONING
Using Cameras and Lights without having them attached to a SceneNode was already deprecated with the 1.10 release and you got compiler warnings if you attempted to so since then.
With the OGRE_NODELESS_POSITIONING=OFF
build option, we now allow actually taking advantage of having the positioning code in the Nodes.
With this option all positioning code in Cameras and Lights will be disabled, which results in faster updates and notably smaller memory footprint, which is
- 12% less for Lights
- 7% less for Cameras
As the node-less positioning API will be gone as well, you should make sure that you trigger no warnings in this regard.
For the most part the porting should look like
// before
mLight->setDirection(...);
// after
mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(mLight);
mLight->getParentSceneNode()->setDirection(..., Node::TS_WORLD);
Also refer to the notes on the deprecation page. Some additional caveats to look out are:
SceneNodes
do not use a fixed yaw axis, while Cameras doSceneNode::setDirection
usesTS_LOCAL
by default while Cameras and Lights behaved likeTS_WORLD
Background shader compilation
The GpuProgram code got refactored and now properly respects the prepare and load states. This means that the shaders can be loaded and pre-processed in a background thread.
With D3D this additionally allows compiling the shaders in the background, which is quite handy given that HLSL compilation times range in the order of seconds.
You probably are thinking “This is great and all, but how to do background resource loading in Ogre?”. Given that was a common question for years, there is finally an according tutorial.
Other notable changes
- Continued effort of porting Samples away from Cg
- Documented the Matrix conversion behavior between OGRE (row-major) and GLSL (column-major)
- compilation with
OGRE_CONFIG_DOUBLE=TRUE
works again - The built-in shadow Renderer now correctly handles multiple shadow casting lights with the RTSS
- The RTSS now fully supports linear skinning and Dual Quaternion skinning with shearing (GLSL, GLSLES and HLSL). The manual was updated for the available options.