Add GEVulkanSceneManager
This commit is contained in:
parent
ca1f61b898
commit
b0cddc462a
@ -32,6 +32,7 @@ set(GE_SOURCES
|
||||
src/ge_vulkan_dynamic_buffer.cpp
|
||||
src/ge_vulkan_features.cpp
|
||||
src/ge_vulkan_mesh_cache.cpp
|
||||
src/ge_vulkan_scene_manager.cpp
|
||||
src/ge_vulkan_shader_manager.cpp
|
||||
src/ge_vulkan_texture.cpp
|
||||
src/ge_gl_texture.cpp
|
||||
|
26
lib/graphics_engine/include/ge_vulkan_scene_manager.hpp
Normal file
26
lib/graphics_engine/include/ge_vulkan_scene_manager.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef HEADER_GE_VULKAN_SCENE_MANAGER_HPP
|
||||
#define HEADER_GE_VULKAN_SCENE_MANAGER_HPP
|
||||
|
||||
#include "../source/Irrlicht/CSceneManager.h"
|
||||
|
||||
namespace GE
|
||||
{
|
||||
|
||||
class GEVulkanSceneManager : public irr::scene::CSceneManager
|
||||
{
|
||||
private:
|
||||
public:
|
||||
// ------------------------------------------------------------------------
|
||||
GEVulkanSceneManager(irr::video::IVideoDriver* driver,
|
||||
irr::io::IFileSystem* fs,
|
||||
irr::gui::ICursorControl* cursor_control,
|
||||
irr::scene::IMeshCache* cache,
|
||||
irr::gui::IGUIEnvironment* gui_environment);
|
||||
// ------------------------------------------------------------------------
|
||||
~GEVulkanSceneManager();
|
||||
// ------------------------------------------------------------------------
|
||||
}; // GEVulkanSceneManager
|
||||
|
||||
}
|
||||
|
||||
#endif
|
21
lib/graphics_engine/src/ge_vulkan_scene_manager.cpp
Normal file
21
lib/graphics_engine/src/ge_vulkan_scene_manager.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "ge_vulkan_scene_manager.hpp"
|
||||
|
||||
namespace GE
|
||||
{
|
||||
// ----------------------------------------------------------------------------
|
||||
GEVulkanSceneManager::GEVulkanSceneManager(irr::video::IVideoDriver* driver,
|
||||
irr::io::IFileSystem* fs,
|
||||
irr::gui::ICursorControl* cursor_control,
|
||||
irr::scene::IMeshCache* cache,
|
||||
irr::gui::IGUIEnvironment* gui_environment)
|
||||
: CSceneManager(driver, fs, cursor_control, cache,
|
||||
gui_environment)
|
||||
{
|
||||
} // GEVulkanSceneManager
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
GEVulkanSceneManager::~GEVulkanSceneManager()
|
||||
{
|
||||
} // ~GEVulkanSceneManager
|
||||
|
||||
}
|
@ -23,6 +23,7 @@
|
||||
#include "ge_main.hpp"
|
||||
#include "glad/gl.h"
|
||||
#include "ge_vulkan_driver.hpp"
|
||||
#include "ge_vulkan_scene_manager.hpp"
|
||||
#include "MoltenVK.h"
|
||||
|
||||
extern bool GLContextDebugBit;
|
||||
@ -189,7 +190,12 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
|
||||
createDriver();
|
||||
|
||||
if (VideoDriver)
|
||||
createGUIAndScene();
|
||||
{
|
||||
if (CreationParams.DriverType == video::EDT_VULKAN)
|
||||
createGUIAndVulkanScene();
|
||||
else
|
||||
createGUIAndScene();
|
||||
}
|
||||
#ifdef IOS_STK
|
||||
SDL_SetEventFilter(handle_app_event, NULL);
|
||||
#endif
|
||||
@ -1582,6 +1588,20 @@ s32 CIrrDeviceSDL::getRightPadding()
|
||||
}
|
||||
|
||||
|
||||
void CIrrDeviceSDL::createGUIAndVulkanScene()
|
||||
{
|
||||
#ifdef _IRR_COMPILE_WITH_GUI_
|
||||
// create gui environment
|
||||
GUIEnvironment = gui::createGUIEnvironment(FileSystem, VideoDriver, Operator);
|
||||
#endif
|
||||
|
||||
// create Scene manager
|
||||
SceneManager = new GE::GEVulkanSceneManager(VideoDriver, FileSystem, CursorControl, NULL, GUIEnvironment);
|
||||
|
||||
setEventReceiver(UserReceiver);
|
||||
}
|
||||
|
||||
|
||||
} // end namespace irr
|
||||
|
||||
#endif // _IRR_COMPILE_WITH_SDL_DEVICE_
|
||||
|
@ -327,6 +327,7 @@ class MoltenVK;
|
||||
#ifdef DLOPEN_MOLTENVK
|
||||
MoltenVK* m_moltenvk;
|
||||
#endif
|
||||
void createGUIAndVulkanScene();
|
||||
};
|
||||
|
||||
} // end namespace irr
|
||||
|
Loading…
x
Reference in New Issue
Block a user