implemented basic shader expressions

This commit is contained in:
Dynamitos
2023-02-24 22:09:07 +01:00
parent 48fa098546
commit f46262b66e
67 changed files with 1390 additions and 852 deletions
@@ -0,0 +1,10 @@
target_sources(Engine
PRIVATE
GameInterface.h
GameInterface.cpp)
target_sources(Engine
PUBLIC FILE_SET HEADERS
FILES
GameInterface.h)
@@ -0,0 +1,31 @@
#include "GameInterface.h"
using namespace Seele;
GameInterface::GameInterface(std::string dllPath)
: dllPath(dllPath)
{
}
GameInterface::~GameInterface()
{
}
Game* GameInterface::getGame()
{
return game;
}
void GameInterface::reload(AssetRegistry* registry)
{
if(lib != NULL)
{
destroyInstance(game);
FreeLibrary(lib);
}
lib = LoadLibraryA(dllPath.c_str());
createInstance = (decltype(createInstance))GetProcAddress(lib, "createInstance");
destroyInstance = (decltype(destroyInstance))GetProcAddress(lib, "destroyInstance");
game = createInstance(registry);
}
@@ -0,0 +1,21 @@
#pragma once
#include "Game.h"
#include "Windows.h"
namespace Seele
{
class GameInterface
{
public:
GameInterface(std::string dllPath);
~GameInterface();
Game* getGame();
void reload(AssetRegistry* registry);
private:
HMODULE lib = NULL;
std::string dllPath;
Game* game;
Game* (*createInstance)(AssetRegistry*) = nullptr;
void (*destroyInstance)(Game*) = nullptr;
};
} // namespace Seele