Ogre 1.12.9 was just released. Typically we do not write a specific announcement for minor updates, however this one contains some major new features that warrant this one.

Multi Language GPU Programs

As noted in the last progress report, even when using OgreUnifiedShader.h one had to duplicate the GpuProgram definitions in the Ogre .material files. This has been fixed in master by allowing multi-language programs to be defined like

fragment_program myFragmentShader glsl glsles hlsl
{
    source example.frag
}

This change allowed us to drop around 900 redundant loc inside the samples.

Ogre Assimp Plugin

The separate ogre-assimp project was merged into the main repository as the Codec_Assimp Plugin, which allows loading arbitrary meshes and runtime and the OgreAssimpConverter Tool for converting meshes to the Ogre .mesh format offline (which improves loading time).

Especially the introduction of Codec_Assimp is notable, as mesh loading now goes through the same Codec dispatching as image formats.

On the application side, you can then just call sceneManager->createEntity("Bike.obj") like I did in OgreMeshViewer below:

so simply loading Codec_Assimp turned that into a general-purpose mesh-viewer.

Descriptive Hardware Buffer Usage

Did you ever wonder whether your buffer usage is rather static or rather dynamic? Well at least I did as these rather abstract names do not tell you much what it means in terms of memory allocation – but wonder no more! There are now new, actually descriptive, aliases:

Old NameNew descriptive alias
HBU_STATIC_WRITE_ONLYHBU_GPU_ONLY
HBU_DYNAMIC_WRITE_ONLYHBU_CPU_TO_GPU
HBU_STATICHBU_GPU_TO_CPU
HBU_DYNAMICHBU_CPU_ONLY

So while previously you were told to use HBU_STATIC_WRITE_ONLY, you now immediately see that the buffer will end up in GPU memory. Likewise, if you use the DYNAMIC variant, the buffer will be optimized for recurrent CPU writes.

I came up with those when planning the Vulkan RenderSystem backport and those are actually borrowed from the Vulkan Memory Allocator library. There you can also find all the subtleties regarding Vulkan, that I did not bother copying to the Ogre manual.

While these flags were named with Vulkan in mind, they map surprisingly well to the Ogre ones and, most importantly, to the actual Ogre usage. After refining the meaning, it allowed dropping several superficial copies and readbacks in the D3D11 & D3D9 RenderSystems. Yes, these even map well to D3D9.

Super-fast debug drawing

Debug drawing in Ogre has been refactored and is now abstracted by the DebugDrawer API with a DefaultDebugDrawer implementation.

One advantage of this is that debug drawing code will not be sprayed across core classes. At least with 1.13 – for now we keep things as is not to break any obscure use-cases.

The main advantage however is, that debug drawing is now properly batched – whereas there was one draw-call per WireBox previously, there is now one draw-call for all wireboxes in the scene. This is also true for coordinate crosses and camera frustums.

Other highlights

  • Ogre can now be built using the latest Emscripten SDK, thaks to a contribution by Gustavo Branco
  • The Config dialog on Windows & Linux was updated to use the new Ogre logo