Deleted AzFramework::AtomActiveInterface

This commit is contained in:
Aristo7
2021-05-03 15:40:32 -05:00
parent 71c5df040f
commit 64d980bc03
28 changed files with 26 additions and 283 deletions
@@ -37,8 +37,6 @@
#include <AzCore/Jobs/JobManager.h>
#include <AzCore/Interface/Interface.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
// Class to implement the WindowRequestBus::Handler instead of the QViewport class.
@@ -365,7 +363,7 @@ bool QViewport::CreateRenderContext()
HWND windowHandle = reinterpret_cast<HWND>(QWidget::winId());
if( AZ::Interface<AzFramework::AtomActiveInterface>::Get() && m_renderContextCreated && windowHandle == m_lastHwnd)
if( m_renderContextCreated && windowHandle == m_lastHwnd)
{
// the hwnd has not changed, no need to destroy and recreate context (and swap chain etc)
return false;
@@ -377,13 +375,10 @@ bool QViewport::CreateRenderContext()
{
m_renderContextCreated = true;
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
m_viewportRequests.get()->BusConnect(windowHandle);
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle);
m_viewportRequests.get()->BusConnect(windowHandle);
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle);
m_lastHwnd = windowHandle;
}
m_lastHwnd = windowHandle;
StorePreviousContext();
GetIEditor()->GetEnv()->pRenderer->CreateContext(windowHandle);