mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_State/Clear): set render targets before clear
This commit is contained in:
@@ -24,6 +24,14 @@ namespace MG_GL::GL {
|
|||||||
MG_Diligent::GLFramebufferInfo& fbInfo = it->second;
|
MG_Diligent::GLFramebufferInfo& fbInfo = it->second;
|
||||||
auto& commonState = *MG_State_T::commonState;
|
auto& commonState = *MG_State_T::commonState;
|
||||||
|
|
||||||
|
MG_Util::Debug::LogD("Setting render targets: %zu color attachments", fbInfo.ColorRTVs.size());
|
||||||
|
MG_Diligent::g_pContext->SetRenderTargets(
|
||||||
|
static_cast<Diligent::Uint32>(fbInfo.ColorRTVs.size()),
|
||||||
|
fbInfo.ColorRTVs.data(),
|
||||||
|
fbInfo.pDepthStencilRTV,
|
||||||
|
::Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION
|
||||||
|
);
|
||||||
|
|
||||||
// if (MG_Diligent::IsInRenderPass) {
|
// if (MG_Diligent::IsInRenderPass) {
|
||||||
// MG_Util::Debug::LogD("Ending render pass before clear operation");
|
// MG_Util::Debug::LogD("Ending render pass before clear operation");
|
||||||
// MG_Diligent::g_pContext->EndRenderPass();
|
// MG_Diligent::g_pContext->EndRenderPass();
|
||||||
|
|||||||
Reference in New Issue
Block a user