Implemented basic game dll interaction

This commit is contained in:
Dynamitos
2023-01-29 18:58:59 +01:00
parent 2208ab438a
commit 0dce84459e
72 changed files with 1297 additions and 350 deletions
+2
View File
@@ -10,6 +10,8 @@ View::View(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo &vi
, name(name)
{
viewport = graphics->createViewport(owner->getGfxHandle(), viewportInfo);
owner->addView(this);
setFocused();
}
View::~View()
+2 -7
View File
@@ -1,22 +1,17 @@
#include "WindowManager.h"
#include "Graphics/Vulkan/VulkanGraphics.h"
#include "Graphics/Graphics.h"
using namespace Seele;
Gfx::PGraphics WindowManager::graphics;
WindowManager::WindowManager()
{
graphics = new Vulkan::Graphics();
GraphicsInitializer initializer;
graphics->init(initializer);
}
WindowManager::~WindowManager()
{
}
PWindow WindowManager::addWindow(const WindowCreateInfo &createInfo)
PWindow WindowManager::addWindow(Gfx::PGraphics graphics, const WindowCreateInfo &createInfo)
{
Gfx::PWindow handle = graphics->createWindow(createInfo);
PWindow window = new Window(this, handle);
+2 -8
View File
@@ -1,22 +1,17 @@
#pragma once
#include "Graphics/GraphicsResources.h"
#include "Graphics/Graphics.h"
#include "Containers/Array.h"
#include "Window.h"
namespace Seele
{
DECLARE_NAME_REF(Gfx, Graphics)
class WindowManager
{
public:
WindowManager();
~WindowManager();
PWindow addWindow(const WindowCreateInfo &createInfo);
PWindow addWindow(Gfx::PGraphics graphics, const WindowCreateInfo &createInfo);
void notifyWindowClosed(PWindow window);
static Gfx::PGraphics getGraphics()
{
return graphics;
}
inline bool isActive() const
{
return windows.size();
@@ -24,7 +19,6 @@ public:
private:
Array<PWindow> windows;
static Gfx::PGraphics graphics;
};
DEFINE_REF(WindowManager)
} // namespace Seele