New game interface
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
#include "Window/Window.h"
|
||||
#include "Component/KeyboardInput.h"
|
||||
#include "Actor/CameraActor.h"
|
||||
#include "Asset/AssetRegistry.h"
|
||||
|
||||
using namespace Seele;
|
||||
|
||||
AssetRegistry* instance = new AssetRegistry();
|
||||
|
||||
GameView::GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo &createInfo)
|
||||
: View(graphics, window, createInfo, "Game")
|
||||
, gameInterface("C:\\Users\\Dynamitos\\TrackClear\\bin\\TrackCleard.dll")
|
||||
@@ -20,8 +23,10 @@ GameView::GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreate
|
||||
))
|
||||
{
|
||||
scene = new Scene(graphics);
|
||||
gameInterface.reload(instance);
|
||||
gameInterface.getGame()->importAssets();
|
||||
systemGraph = new SystemGraph();
|
||||
gameInterface.reloadGame()->setupScene(scene, systemGraph);
|
||||
gameInterface.getGame()->setupScene(scene, systemGraph);
|
||||
renderGraph.updateViewport(viewport);
|
||||
}
|
||||
|
||||
@@ -52,6 +57,7 @@ void GameView::commitUpdate()
|
||||
lightCullingData.lightEnv = scene->getLightBuffer();
|
||||
basePassData.staticDrawList = scene->getStaticMeshes();
|
||||
basePassData.sceneDataBuffer = scene->getSceneDataBuffer();
|
||||
skyboxData.skybox = scene->getSkybox();
|
||||
#ifdef EDITOR
|
||||
if(showDebug)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ private:
|
||||
dp::thread_pool<> threadPool;
|
||||
float updateTime = 0;
|
||||
#ifdef EDITOR
|
||||
bool showDebug = true;
|
||||
bool showDebug = false;
|
||||
#endif
|
||||
|
||||
virtual void keyCallback(Seele::KeyCode code, Seele::InputAction action, Seele::KeyModifier modifier) override;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Actor/Actor.h"
|
||||
#include "Window/Window.h"
|
||||
#include "Asset/AssetRegistry.h"
|
||||
#include "Asset/FontLoader.h"
|
||||
#include "UI/System.h"
|
||||
|
||||
using namespace Seele;
|
||||
@@ -15,7 +16,9 @@ InspectorView::InspectorView(Gfx::PGraphics graphics, PWindow window, const View
|
||||
))
|
||||
, uiSystem(new UI::System())
|
||||
{
|
||||
AssetRegistry::importFile("./fonts/Calibri.ttf");
|
||||
AssetRegistry::importFont(FontImportArgs{
|
||||
.filePath = "./fonts/Calibri.ttf",
|
||||
});
|
||||
renderGraph.updateViewport(viewport);
|
||||
uiSystem->updateViewport(viewport);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ SceneView::SceneView(Gfx::PGraphics graphics, PWindow owner, const ViewportCreat
|
||||
|
||||
//AssetRegistry::importFile("D:\\Private\\Programming\\Unreal Engine\\Assets\\Ely\\Ely.fbx");
|
||||
//AssetRegistry::importFile("D:\\Private\\Programming\\Unreal Engine\\Assets\\Cube\\cube.obj");
|
||||
AssetRegistry::importFile("D:\\Private\\Programming\\Unreal Engine\\Assets\\Plane\\plane.fbx");
|
||||
//AssetRegistry::importFile("D:\\Private\\Programming\\Unreal Engine\\Assets\\Plane\\plane.fbx");
|
||||
|
||||
cameraSystem.update(viewportCamera, static_cast<float>(Gfx::currentFrameDelta));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user