realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

TundraCore #549

Closed Stinkfist0 closed 11 years ago

Stinkfist0 commented 11 years ago

NOTE 2012-12-11: at the current state this pull request contains also a lot of misc. bug and compiler warning fixes, and code cleanup. The most substantial TundraCore changes are in the first five commits.

Regarding #199, introducing TundraCore: Asset, Audio, Console, Framework, Input, Scene, and Ui static libraries now combined into one dynamic library, TundraCore. Also while on the subject of leaner and meaner Tundra core, SceneInteract is now its own plugin (we don't want hardcoded application logic running in each scene) and Billboard, ParticleSystem (both core Ogre features), Sky, Fog, and EnvironmentLight (all of these four handle core Ogre::SceneManager functionality) ECs are moved to OgreRenderingModule.

As the result, depending on the case, the resulting plugin DLL's size can be even three times smaller compared to the non-TundraCore approach. Comparison done using RelWithDebInfo build configuration. The Tundra build (especially linking) and startup times seem to be also faster. Alternatively, TundraCore can be built as a single static library by setting TUDRACORE_SHARED to 0 in the root CMakeLists.txt.

The TundraCore source folder has the original libraries' sources in their own subdirectories. UseTundraCore() CMake macro can be used to to include all of the TundraCore subdirectories to your project in order to include the files using the shorter include path (f.ex. "Ui/UiAPI.h" vs. "UiApi.h").

Note: For now the Color class resides in Math library due to problematic nature of shared library and compile-time MATH_OGRE_INTEROP feature which creates dependency to Ogre and we don't want TundraCore to have Ogre dependency. Also note that, for now at least, kNet and Qt needs to be linked explicitly to the project in most cases.

juj commented 11 years ago

This will be postponed after Tundra 2.4 release.

jonnenauha commented 11 years ago

Oh thats a shame. I guess already quite many and big changes are ongoing. Are you worried this will break something or just lack of time?

Stinkfist0 commented 11 years ago

The commits are now duplicated due to my careless rebase with tundra2_lc. I will probably close this in the near future and make a new pull request.