Patch update - Scene window

This commit is contained in:
2025-01-16 21:02:17 +01:00
parent 06efdf6f6c
commit 15217a5df8
5 changed files with 95 additions and 19 deletions

View File

@@ -416,6 +416,8 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
WidgetEngineSettingsWindow(app);
}
WidgetRenderWindow(app, ImVec2(800, 600));
//render imgui
Render();
@@ -475,5 +477,30 @@ void imguiManager::WidgetEngineSettingsWindow(ApplicationClass* app)
app->SetFrustumTolerance(frustumTolerance);
}
ImGui::End();
}
void imguiManager::WidgetRenderWindow(ApplicationClass* app, ImVec2 availableSize)
{
ImGui::Begin("Render Window");
windowSize = ImGui::GetContentRegionAvail();
app->SetWindowSize(windowSize);
// Assurez-vous que la texture est valide
RenderTextureClass* renderTexture = app->GetRenderTexture();
if (renderTexture)
{
// Obtenez la vue de la ressource shader de la texture rendue
ID3D11ShaderResourceView* texture = renderTexture->GetShaderResourceView();
// Affichez la texture dans une fen<65>tre ImGui
ImGui::Image((ImTextureID)texture, windowSize);
}
else
{
ImGui::Text("Render texture is not available.");
}
ImGui::End();
}