Fixes
This commit is contained in:
@ -19,8 +19,6 @@
|
||||
|
||||
#include <RenderCore/RenderCore.hpp>
|
||||
|
||||
#include <IAEngine/LibInterface.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
VOID View_Scene::Initialize()
|
||||
@ -28,21 +26,16 @@ namespace ia::iae
|
||||
SetName("Scene");
|
||||
SetIcon(ICON_FA_HASHTAG);
|
||||
|
||||
IAEngine::__Initialize(SCENE_EDITOR_RESOULTION, Editor::Instance().GetActiveProject()->AssetDirectory());
|
||||
|
||||
m_gamePreviewTexture = new RDC_Texture(RDC_Texture::EType::SAMPLED, SCENE_EDITOR_RESOULTION.x, SCENE_EDITOR_RESOULTION.y);
|
||||
}
|
||||
|
||||
VOID View_Scene::Terminate()
|
||||
{
|
||||
delete m_gamePreviewTexture;
|
||||
}
|
||||
|
||||
VOID View_Scene::Render()
|
||||
{
|
||||
PreRender();
|
||||
|
||||
ImGui::Image(m_gamePreviewTexture->GetHandle(), {SCENE_EDITOR_RESOULTION.x, SCENE_EDITOR_RESOULTION.y});
|
||||
|
||||
PostRender();
|
||||
}
|
||||
@ -51,49 +44,9 @@ namespace ia::iae
|
||||
{
|
||||
STATIC INT32 frameCounter{0};
|
||||
|
||||
IAEngine::__Update();
|
||||
|
||||
frameCounter++;
|
||||
if (frameCounter >= 60)
|
||||
{
|
||||
frameCounter = 0;
|
||||
IAEngine::__FixedUpdate();
|
||||
}
|
||||
|
||||
IAEngine::__RenderToTexture(m_gamePreviewTexture->GetHandle());
|
||||
}
|
||||
|
||||
VOID View_Scene::OnEvent(IN SDL_Event *event)
|
||||
{
|
||||
IAEngine::__ProcessEvent(event);
|
||||
}
|
||||
} // namespace ia::iae
|
||||
|
||||
C_DECL(GameRequestedConfig *Game_GetConfigRequest())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
C_DECL(VOID Game_OnInitialize())
|
||||
{
|
||||
}
|
||||
|
||||
C_DECL(VOID Game_OnTerminate())
|
||||
{
|
||||
}
|
||||
|
||||
C_DECL(VOID Game_OnDebugDraw())
|
||||
{
|
||||
}
|
||||
|
||||
C_DECL(VOID Game_OnFixedUpdate())
|
||||
{
|
||||
}
|
||||
|
||||
C_DECL(VOID Game_OnUpdate(IN FLOAT32 deltaTime))
|
||||
{
|
||||
}
|
||||
|
||||
C_DECL(VOID Game_OnResize(IN INT32 newWidth, IN INT32 newHeight))
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user