Isolate irrlicht references and use a singleton (#6041)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Mon, 26 Jun 2017 18:11:17 +0000 (20:11 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Jun 2017 18:11:17 +0000 (20:11 +0200)
commitb3a36f7378ea0f299cfa36c81de42e00adb7292d
tree23d056b575ff0dba8cc759cc00f732099a1f3bce
parenta8650e785df3f12efa5f8cd3c6a695fb9e22a598
Isolate irrlicht references and use a singleton (#6041)

* Add Device3D class which will contain IrrlichtDevice interface

move getSupportedVideoDrivers to Device3D

Add Device3D singleton & use it in various places

Rename Device3D to Rendering engine & add helper functions to various device pointers

More singleton work

RenderingEngine owns draw_load_screen

move draw functions to RenderingEngine

Reduce IrrlichtDevice exposure and guienvironment

RenderingEngine: Expose get_timer_time() to remove device from guiEngine

Make irrlichtdevice & scene manager less exposed

* Code style fixes

* Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine

Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly

* enum paralax => enum parallax
50 files changed:
build/android/jni/Android.mk
src/CMakeLists.txt
src/camera.cpp
src/client.cpp
src/client.h
src/client/CMakeLists.txt
src/client/clientlauncher.cpp
src/client/clientlauncher.h
src/client/inputhandler.h
src/client/renderingengine.cpp [new file with mode: 0644]
src/client/renderingengine.h [new file with mode: 0644]
src/client/tile.cpp
src/client/tile.h
src/clientenvironment.cpp
src/clientenvironment.h
src/clientmap.cpp
src/clientmap.h
src/clouds.cpp
src/clouds.h
src/content_mapblock.cpp
src/content_mapblock.h
src/drawscene.cpp [deleted file]
src/drawscene.h [deleted file]
src/fontengine.cpp
src/game.cpp
src/game.h
src/guiEngine.cpp
src/guiEngine.h
src/guiFormSpecMenu.cpp
src/guiFormSpecMenu.h
src/guiTable.cpp
src/guiscalingfilter.cpp
src/guiscalingfilter.h
src/hud.cpp
src/mainmenumanager.h
src/mapblock_mesh.cpp
src/mapblock_mesh.h
src/minimap.cpp
src/minimap.h
src/nodedef.cpp
src/particles.cpp
src/particles.h
src/porting.cpp
src/porting.h
src/script/lua_api/l_mainmenu.cpp
src/shader.cpp
src/shader.h
src/sky.cpp
src/sky.h
util/travis/clang-format-whitelist.txt