Implemented basic game dll interaction
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user