Sandbox App is no longer an editor, Editor setup has moved to the editor project

This commit is contained in:
2022-10-22 15:21:48 +02:00
parent 955eeabb48
commit 23ac663667
5 changed files with 180 additions and 42 deletions

View File

@ -18,7 +18,6 @@ const std::string vertexShaderSource = "build/Debug/test.vs";
const std::string fragmentShaderSource = "build/Debug/test.fs";
BarinkEngine::ModelImporter* MI = new BarinkEngine::ModelImporter();
Framebuffer* framebuffer;
Scene* Level1;
BarinkEngine::SceneObject* cube;
/*
@ -26,8 +25,6 @@ BarinkEngine::SceneObject* cube;
* - USe to initialize the game/sandbox/demo
*/
void Start() {
// Build a basic test scene
// NOTE: This will later be done through an editor
// Create a level and load it as the current level
std::string levelName("Test Level");
@ -49,9 +46,7 @@ void Start() {
Level1->GetRoot().addChild(*cube);
memset(code, '\0', 254);
framebuffer = new Framebuffer();
std::cout << "Colour attachment id; "<< framebuffer->GetColourAttachment() << std::endl;
// TODO: Move to runtime/ Engine
// NOTE: Submits should later be done through walking the sceneTree
@ -67,14 +62,6 @@ void ImmediateGraphicsDraw()
{
// Show internal BarinkEngine stats
ShowStats();
SceneView(*framebuffer);
// Show different tooling for this specific sandbox
CameraTool();
ScriptingTool(code);
SceneExplorer( "Scene Explorer");
}
/*
@ -83,11 +70,9 @@ void ImmediateGraphicsDraw()
*/
void Update()
{
// glBindFramebuffer(GL_FRAMEBUFFER, framebuffer->GetId());
renderer.Render(*framebuffer);
renderer.Render();
// glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
/*
@ -96,7 +81,6 @@ void Update()
*/
void Stop()
{
delete framebuffer;
delete MI;
delete shader;
}