made Editor non reliant on GLFW aka i added an IRenderTexture interface of use in non renderer specific aplications

This commit is contained in:
2026-01-18 18:49:15 +01:00
parent 23e7707122
commit a453612b9a
17 changed files with 87 additions and 49 deletions

View File

@@ -2,7 +2,7 @@
TSE::EDITOR::CameraView::CameraView() : GuiWindow("Camera", ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)
{
fb = new TSE::GLFW::RenderTexture({100,100});
fb = IRenderTexture::factory->CreateTextureHeap({100,100});
}
void TSE::EDITOR::CameraView::Define()
@@ -19,9 +19,9 @@ void TSE::EDITOR::CameraView::Define()
ImGuiWindowFlags flags2 = ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar;
if(ImGui::BeginChild("##SceneChild", {0,0}, ImGuiChildFlags_None, flags2))
{
ImGui::Image(fb->GetTextureId(), {fb->width(), fb->height()},{0,1}, {1,0});
ImGui::Image(fb->GetTextureId(), {fb->Width(), fb->Height()},{0,1}, {1,0});
auto vec2 = ImGui::GetWindowSize();
if(fb->width() != vec2.x || fb->height() != vec2.y)
if(fb->Width() != vec2.x || fb->Height() != vec2.y)
{
fb->SetSize({vec2.x, vec2.y});
}