diff --git a/framework/platform-dx/rendertarget.cpp b/framework/platform-dx/rendertarget.cpp index d154417..d89678b 100644 --- a/framework/platform-dx/rendertarget.cpp +++ b/framework/platform-dx/rendertarget.cpp @@ -37,8 +37,10 @@ namespace xna { Exception::Throw(Exception::FAILED_TO_APPLY); } - if(!render_impl->_renderTargetView) - Exception::Throw(Exception::INVALID_OPERATION); + if (!render_impl->_renderTargetView) + { + Initialize(); + } auto& context = m_device->impl->_context; context->OMSetRenderTargets(1, render_impl->_renderTargetView.GetAddressOf(), nullptr);