Patch update - Scene window
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user