#pragma once #include #include #include #include "WallpaperEngine/Render/CWallpaper.h" #include "WallpaperEngine/Render/Shaders/Variables/CShaderVariable.h" #include "CEventReceiver.h" namespace WallpaperEngine::Render { class CWallpaper; }; namespace WallpaperEngine::Irrlicht { class CContext { public: CContext (std::vector screens, bool isRootWindow = false); void setDevice (irr::IrrlichtDevice* device); void initializeContext (); void insertShaderVariable (Render::Shaders::Variables::CShaderVariable* variable); const std::vector& getShaderVariables () const; void renderFrame (Render::CWallpaper* wallpaper); irr::IrrlichtDevice* getDevice (); irr::io::path resolveMaterials (const std::string& materialName); irr::io::path resolveVertexShader (const std::string& vertexShader); irr::io::path resolveFragmentShader (const std::string& fragmentShader); irr::io::path resolveIncludeShader (const std::string& includeShader); private: void initializeViewports (irr::SIrrlichtCreationParameters& irrlichtCreationParameters); void drawWallpaper (Render::CWallpaper* wallpaper, bool backBuffer); irr::io::path resolveFile (const irr::io::path& file); irr::IrrlichtDevice* m_device; CEventReceiver* m_eventReceiver; std::vector m_globalShaderVariables; float m_time; irr::core::vector2df m_pointerPosition; std::vector m_screens; std::vector m_viewports; bool m_isRootWindow; }; };