diff options
author | numzero <numzer0@yandex.ru> | 2023-03-14 18:25:05 +0300 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-03-19 19:47:43 +0100 |
commit | 0160cdc51d020d590b7275178872ec93564dc857 (patch) | |
tree | a35a42021f57074c41e39a3e92e0651aa2e55aa4 /source | |
parent | 5a1565072abeecf9fc5a3ffc450d5ab8ff660021 (diff) | |
download | irrlicht-0160cdc51d020d590b7275178872ec93564dc857.tar.xz |
Drop unused dependency of SceneManager on GUIEnvironment
Diffstat (limited to 'source')
-rw-r--r-- | source/Irrlicht/CIrrDeviceStub.cpp | 2 | ||||
-rw-r--r-- | source/Irrlicht/CIrrDeviceStub.h | 3 | ||||
-rw-r--r-- | source/Irrlicht/CSceneManager.cpp | 24 | ||||
-rw-r--r-- | source/Irrlicht/CSceneManager.h | 9 |
4 files changed, 8 insertions, 30 deletions
diff --git a/source/Irrlicht/CIrrDeviceStub.cpp b/source/Irrlicht/CIrrDeviceStub.cpp index 92cda75..6990673 100644 --- a/source/Irrlicht/CIrrDeviceStub.cpp +++ b/source/Irrlicht/CIrrDeviceStub.cpp @@ -92,7 +92,7 @@ void CIrrDeviceStub::createGUIAndScene() GUIEnvironment = gui::createGUIEnvironment(FileSystem, VideoDriver, Operator);
// create Scene manager
- SceneManager = scene::createSceneManager(VideoDriver, FileSystem, CursorControl, GUIEnvironment);
+ SceneManager = scene::createSceneManager(VideoDriver, FileSystem, CursorControl);
setEventReceiver(UserReceiver);
}
diff --git a/source/Irrlicht/CIrrDeviceStub.h b/source/Irrlicht/CIrrDeviceStub.h index 5b7d92f..fd069b1 100644 --- a/source/Irrlicht/CIrrDeviceStub.h +++ b/source/Irrlicht/CIrrDeviceStub.h @@ -24,8 +24,7 @@ namespace irr namespace scene
{
- ISceneManager* createSceneManager(video::IVideoDriver* driver,
- io::IFileSystem* fs, gui::ICursorControl* cc, gui::IGUIEnvironment *gui);
+ ISceneManager* createSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs, gui::ICursorControl* cc);
}
namespace io
diff --git a/source/Irrlicht/CSceneManager.cpp b/source/Irrlicht/CSceneManager.cpp index 440a44d..568c754 100644 --- a/source/Irrlicht/CSceneManager.cpp +++ b/source/Irrlicht/CSceneManager.cpp @@ -34,9 +34,8 @@ namespace scene //! constructor
CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
- gui::ICursorControl* cursorControl, IMeshCache* cache,
- gui::IGUIEnvironment* gui)
-: ISceneNode(0, 0), Driver(driver), FileSystem(fs), GUIEnvironment(gui),
+ gui::ICursorControl* cursorControl, IMeshCache* cache)
+: ISceneNode(0, 0), Driver(driver), FileSystem(fs),
CursorControl(cursorControl),
ActiveCamera(0), ShadowColor(150,0,0,0), AmbientLight(0,0,0,0), Parameters(0),
MeshCache(cache), CurrentRenderPass(ESNRP_NONE)
@@ -58,9 +57,6 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs, if (CursorControl)
CursorControl->grab();
- if (GUIEnvironment)
- GUIEnvironment->grab();
-
// create mesh cache if not there already
if (!MeshCache)
MeshCache = new CMeshCache();
@@ -105,9 +101,6 @@ CSceneManager::~CSceneManager() if (CollisionManager)
CollisionManager->drop();
- if (GUIEnvironment)
- GUIEnvironment->drop();
-
u32 i;
for (i=0; i<MeshLoaderList.size(); ++i)
MeshLoaderList[i]->drop();
@@ -209,12 +202,6 @@ video::IVideoDriver* CSceneManager::getVideoDriver() }
-//! returns the GUI Environment
-gui::IGUIEnvironment* CSceneManager::getGUIEnvironment()
-{
- return GUIEnvironment;
-}
-
//! Get the active FileSystem
/** \return Pointer to the FileSystem
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
@@ -888,7 +875,7 @@ IMeshCache* CSceneManager::getMeshCache() //! Creates a new scene manager.
ISceneManager* CSceneManager::createNewSceneManager(bool cloneContent)
{
- CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache, GUIEnvironment);
+ CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache);
if (cloneContent)
manager->cloneMembers(this, manager);
@@ -926,10 +913,9 @@ IMeshWriter* CSceneManager::createMeshWriter(EMESH_WRITER_TYPE type) // creates a scenemanager
ISceneManager* createSceneManager(video::IVideoDriver* driver,
- io::IFileSystem* fs, gui::ICursorControl* cursorcontrol,
- gui::IGUIEnvironment *guiEnvironment)
+ io::IFileSystem* fs, gui::ICursorControl* cursorcontrol)
{
- return new CSceneManager(driver, fs, cursorcontrol, 0, guiEnvironment );
+ return new CSceneManager(driver, fs, cursorcontrol, nullptr);
}
diff --git a/source/Irrlicht/CSceneManager.h b/source/Irrlicht/CSceneManager.h index caf9dbe..1a74995 100644 --- a/source/Irrlicht/CSceneManager.h +++ b/source/Irrlicht/CSceneManager.h @@ -32,8 +32,7 @@ namespace scene //! constructor
CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
- gui::ICursorControl* cursorControl, IMeshCache* cache = 0,
- gui::IGUIEnvironment *guiEnvironment = 0);
+ gui::ICursorControl* cursorControl, IMeshCache* cache = nullptr);
//! destructor
virtual ~CSceneManager();
@@ -50,9 +49,6 @@ namespace scene //! returns the video driver
video::IVideoDriver* getVideoDriver() override;
- //! return the gui environment
- gui::IGUIEnvironment* getGUIEnvironment() override;
-
//! return the filesystem
io::IFileSystem* getFileSystem() override;
@@ -285,9 +281,6 @@ namespace scene //! file system
io::IFileSystem* FileSystem;
- //! GUI Enviroment ( Debug Purpose )
- gui::IGUIEnvironment* GUIEnvironment;
-
//! cursor control
gui::ICursorControl* CursorControl;
|