As we mentioned last time, Ogre-Next 2.4 will be mostly focusing on maintenance and fixing code debt.

Over a week we’ve fixed a lot of warnings.

With default settings on Clang on Linux, there’s no errors (except on OgreMeshTool).

But we haven’t taken a look at deprecated warnings yet.

On Apple/XCode and MSVC there’s very few warnings now

GCC needs Wconversion off because it’s incredibly dumb. It’s got too many false positives.
Fixing them would hurt readability too much, causing more harm than good.

Some CMake settings may cause warnings, e.g. we generate lots of warnings if OGRE_CONFIG_DOUBLE is on.

We also applied clang format to everything, and added C++11 override everywhere.

We’ve also removed dead code and added an option to turn off custom memory allocators off which is the default.

We’ve removed Boost, thus CMake won’t waste its time (and that was a lot) looking for an optional dependency we didn’t really need anymore.

Overall in Debug builds we’re seeing a 20% reduction in binary size (incl. symbols)!!
While Release builds have between 1% and 3% reductions.

The only drawback is that merging code 2.3 -> 2.4 is now harder as it’s almost guaranteed to cause a merge conflict, since nearly every line got touched.

Nonetheless it seems that merging by “merge using always theirs”, then applying clang format, then seeing the diff of what’s going to be merge is a good approach to prevent bad merges and fix accidentally introducing bugs

The numbers are in MBs

Linux Clang 9 – Debug

Lib Name

Before (2.3)

After (2.4)

Diff

libOgreHlmsPbs_d.so

8,69

7,53

-15,48 %

libOgreHlmsUnlit_d.so

1,92

1,59

-20,48 %

libOgreMain_d.so

65,00

55,01

-18,17 %

libOgreMeshLodGenerator_d.so

4,27

3,71

-15,11 %

libOgreOverlay_d.so

3,87

3,30

-17,23 %

libOgreSamplesCommon_d.a

10,80

9,10

-18,64 %

libOgreSceneFormat_d.so

2,55

2,03

-25,44 %

Plugin_ParticleFX_d.so

1,79

1,63

-9,85 %

RenderSystem_GL3Plus_d.so

6,97

5,23

-33,25 %

RenderSystem_NULL_d.so

1,70

1,35

-25,87 %

RenderSystem_Vulkan_d.so

15,82

14,63

-8,18 %





Total

123,39

105,12

-17,39 %

Linux Clang 9 – Release

Lib Name

Before (2.3)

After (2.4)

Diff

libOgreHlmsPbs.so

0,80

0,78

-3,03 %

libOgreHlmsUnlit.so

0,19

0,19

-3,58 %

libOgreMain.so

7,31

6,93

-5,61 %

libOgreMeshLodGenerator.so

0,24

0,22

-5,21 %

libOgreOverlay.so

1,00

1,00

-0,14 %

libOgreSamplesCommon.a

0,43

0,41

-3,85 %

libOgreSceneFormat.so

0,23

0,23

0,95 %

Plugin_ParticleFX.so

0,25

0,24

-5,38 %

RenderSystem_GL3Plus.so

0,85

0,76

-11,86 %

RenderSystem_NULL.so

0,16

0,16

-0,94 %

RenderSystem_Vulkan.so

7,93

7,91

-0,22 %





Total

19,40

18,83

-3,02 %

MSVC 2019 – Debug

Lib Name

Before (2.3)

After (2.4)

Diff

OgreHlmsPbs_d.dll

1,89

1,82

-3,45 %

OgreHlmsPbs_d.pdb

15,53

12,82

-21,15 %

OgreHlmsUnlit_d.dll

0,47

0,45

-4,50 %

OgreHlmsUnlit_d.pdb

9,51

6,89

-37,96 %

OgreMain_d.dll

24,28

22,81

-6,45 %

OgreMain_d.pdb

101,56

81,94

-23,94 %

OgreMeshLodGenerator_d.dll

1,02

0,98

-4,90 %

OgreMeshLodGenerator_d.pdb

10,57

8,64

-22,34 %

OgreMeshTool_d.pdb

11,95

8,66

-37,98 %

OgreOverlay_d.dll

1,77

1,75

-1,45 %

OgreOverlay_d.pdb

13,28

9,50

-39,70 %

OgreSceneFormat_d.dll

0,58

0,57

-1,78 %

OgreSceneFormat_d.pdb

11,07

8,04

-37,82 %

Plugin_ParticleFX_d.dll

0,39

0,37

-5,59 %

Plugin_ParticleFX_d.pdb

6,18

5,12

-20,59 %

RenderSystem_Direct3D11_d.dll

2,02

1,90

-6,32 %

RenderSystem_Direct3D11_d.pdb

17,13

14,11

-21,37 %

RenderSystem_GL3Plus_d.dll

2,00

1,69

-18,41 %

RenderSystem_GL3Plus_d.pdb

16,17

12,25

-32,03 %

RenderSystem_NULL_d.dll

0,39

0,36

-8,09 %

RenderSystem_NULL_d.pdb

8,96

6,26

-43,04 %

RenderSystem_Vulkan_d.dll

17,69

17,58

-0,66 %

RenderSystem_Vulkan_d.pdb

104,54

87,89

-18,94 %

OgreSamplesCommon_d.lib

12,83

11,63

-10,28 %

OgreSamplesCommon_d.pdb

7,74

6,78

-14,18 %





Total

399,51

330,81

-20,77 %

MSVC 2019 – Release

Lib Name

Before (2.3)

After (2.4)

Diff

OgreHlmsPbs.dll

0,55

0,55

0,09 %

OgreHlmsUnlit.dll

0,14

0,13

-1,45 %

OgreMain.dll

6,91

6,82

-1,32 %

OgreMeshLodGenerator.dll

0,20

0,21

2,12 %

OgreOverlay.dll

0,71

0,71

-0,28 %

OgreSceneFormat.dll

0,17

0,17

0,00 %

Plugin_ParticleFX.dll

0,14

0,14

0,35 %

RenderSystem_Direct3D11.dll

0,52

0,51

-0,38 %

RenderSystem_GL3Plus.dll

0,59

0,54

-9,37 %

RenderSystem_NULL.dll

0,12

0,12

-2,54 %

RenderSystem_Vulkan.dll

3,81

3,80

-0,18 %

OgreSamplesCommon.lib

1,48

1,41

-4,72 %





Total

15,33

15,11

-1,44 %

That’s all for now. Ogre 2.3 was released just a week ago and we wanted to share such an exciting development already happening on 2.4.

Discussion in forum thread.