Merge pull request #526 from aws-lumberyard-dev/Atom/olexl/ATOM-15349
Deleted AzFramework::AtomActiveInterface
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzFramework/Logging/MissingAssetLogger.h>
|
||||
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
|
||||
|
||||
@@ -1162,31 +1161,6 @@ void CSystem::SleepIfInactive()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
WIN_HWND hRendWnd = GetIRenderer()->GetHWND();
|
||||
if (!hRendWnd)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_TRACE_METHOD();
|
||||
// Loop here waiting for window to be activated.
|
||||
for (int nLoops = 0; nLoops < 5; nLoops++)
|
||||
{
|
||||
WIN_HWND hActiveWnd = ::GetActiveWindow();
|
||||
if (hActiveWnd == hRendWnd)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::PumpSystemEventLoopUntilEmpty);
|
||||
Sleep(5);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
#include <LyShine/Bus/UiSystemBus.h>
|
||||
#include <AzFramework/Logging/MissingAssetLogger.h>
|
||||
#include <AzFramework/Platform/PlatformDefaults.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
|
||||
@@ -2462,21 +2461,6 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
m_env.pRenderer->SetViewport(0, 0, screenWidth, screenHeight);
|
||||
|
||||
// Skip splash screen rendering
|
||||
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
// make sure it's rendered in full screen mode when triple buffering is enabled as well
|
||||
for (size_t n = 0; n < 3; n++)
|
||||
{
|
||||
m_env.pRenderer->BeginFrame();
|
||||
m_env.pRenderer->SetCullMode(R_CULL_NONE);
|
||||
m_env.pRenderer->SetState(GS_BLSRC_SRCALPHA | GS_BLDST_ONEMINUSSRCALPHA | GS_NODEPTHTEST);
|
||||
m_env.pRenderer->Draw2dImageStretchMode(true);
|
||||
m_env.pRenderer->Draw2dImage(x * vx, y * vy, w * vx, h * vy, pTex->GetTextureID(), 0.0f, 1.0f, 1.0f, 0.0f);
|
||||
m_env.pRenderer->Draw2dImageStretchMode(false);
|
||||
m_env.pRenderer->EndFrame();
|
||||
}
|
||||
}
|
||||
#if defined(AZ_PLATFORM_IOS) || defined(AZ_PLATFORM_MAC)
|
||||
// Pump system events in order to update the screen
|
||||
AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::PumpSystemEventLoopUntilEmpty);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
class AtomActiveInterface
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(AtomActiveInterface, "{4BB59C86-0848-485D-AB28-700540470B2B}");
|
||||
|
||||
AtomActiveInterface() = default;
|
||||
virtual ~AtomActiveInterface() = default;
|
||||
};
|
||||
} // namespace AzFramework
|
||||
@@ -14,7 +14,6 @@ set(FILES
|
||||
AzFrameworkModule.h
|
||||
AzFrameworkModule.cpp
|
||||
API/ApplicationAPI.h
|
||||
API/AtomActiveInterface.h
|
||||
Application/Application.cpp
|
||||
Application/Application.h
|
||||
Archive/Archive.cpp
|
||||
|
||||
-1
@@ -16,7 +16,6 @@
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzCore/std/containers/fixed_vector.h>
|
||||
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
|
||||
namespace AzQtComponents
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Objects/SelectionGroup.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
|
||||
// Qt
|
||||
|
||||
@@ -27,12 +27,6 @@
|
||||
// AzFramework
|
||||
#include <AzFramework/Archive/IArchive.h>
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzFramework/Viewport/CameraInput.h>
|
||||
|
||||
// Atom
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
|
||||
// AzToolsFramework
|
||||
#include <AzToolsFramework/Slice/SliceUtilities.h>
|
||||
@@ -68,6 +62,9 @@
|
||||
#include "StatObjBus.h"
|
||||
|
||||
// LmbrCentral
|
||||
#include <ModernViewportCameraController.h>
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <LmbrCentral/Rendering/EditorLightComponentBus.h> // for LmbrCentral::EditorLightComponentRequestBus
|
||||
|
||||
|
||||
@@ -2410,44 +2407,9 @@ void CCryEditDoc::InitEmptyLevel(int /*resolution*/, int /*unitSize*/, bool /*bU
|
||||
GetIEditor()->SetStatusText("Ready");
|
||||
}
|
||||
|
||||
void CCryEditDoc::CreateDefaultLevelAssets(int resolution, int unitSize)
|
||||
void CCryEditDoc::CreateDefaultLevelAssets([[maybe_unused]] int resolution, [[maybe_unused]] int unitSize)
|
||||
{
|
||||
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
AzToolsFramework::EditorLevelNotificationBus::Broadcast(&AzToolsFramework::EditorLevelNotificationBus::Events::OnNewLevelCreated);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
if (!isPrefabSystemEnabled)
|
||||
{
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(
|
||||
m_envProbeSliceAssetId, &AZ::Data::AssetCatalogRequests::GetAssetIdByPath, m_envProbeSliceRelativePath,
|
||||
azrtti_typeid<AZ::SliceAsset>(), false);
|
||||
|
||||
if (m_envProbeSliceAssetId.IsValid())
|
||||
{
|
||||
AZ::Data::Asset<AZ::Data::AssetData> asset = AZ::Data::AssetManager::Instance().FindOrCreateAsset<AZ::SliceAsset>(
|
||||
m_envProbeSliceAssetId, AZ::Data::AssetLoadBehavior::Default);
|
||||
if (asset)
|
||||
{
|
||||
m_terrainSize = resolution * unitSize;
|
||||
const float halfTerrainSize = m_terrainSize / 2.0f;
|
||||
|
||||
AZ::Transform worldTransform = AZ::Transform::CreateIdentity();
|
||||
worldTransform = AZ::Transform::CreateTranslation(AZ::Vector3(halfTerrainSize, halfTerrainSize, m_envProbeHeight / 2));
|
||||
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect();
|
||||
GetIEditor()->SuspendUndo();
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceRequestBus::Broadcast(
|
||||
&AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::InstantiateEditorSlice, asset, worldTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
AzToolsFramework::EditorLevelNotificationBus::Broadcast(&AzToolsFramework::EditorLevelNotificationBus::Events::OnNewLevelCreated);
|
||||
}
|
||||
|
||||
void CCryEditDoc::OnEnvironmentPropertyChanged(IVariable* pVar)
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
# include <AzFramework/Input/Buses/Notifications/RawInputNotificationBus_Platform.h>
|
||||
#endif // defined(AZ_PLATFORM_WINDOWS)
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h> // for AzFramework::InputDeviceMouse
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzFramework/Viewport/ViewportControllerList.h>
|
||||
|
||||
// AzQtComponents
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#include "IconManager.h"
|
||||
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
|
||||
// AzToolsFramework
|
||||
@@ -115,71 +114,6 @@ int CIconManager::GetIconTexture(const char* iconName)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
ITexture* texture = GetIEditor()->GetRenderer() ? GetIEditor()->GetRenderer()->EF_LoadTexture(iconName) : nullptr;
|
||||
if (texture)
|
||||
{
|
||||
id = texture->GetTextureID();
|
||||
m_textures[iconName] = id;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString ext = Path::GetExt(iconName);
|
||||
QString actualName = iconName;
|
||||
|
||||
char iconPath[AZ_MAX_PATH_LEN] = { 0 };
|
||||
gEnv->pFileIO->ResolvePath(actualName.toUtf8().data(), iconPath, AZ_MAX_PATH_LEN);
|
||||
|
||||
// if we can't find it at the resolved path, try the devroot if necessary:
|
||||
if (!gEnv->pFileIO->Exists(iconPath))
|
||||
{
|
||||
if (iconName[0] != '@') // it has no specified alias
|
||||
{
|
||||
if (QString::compare(ext, "dds", Qt::CaseInsensitive) != 0) // if its a DDS, it comes out of processed files in @assets@, and assets is assumed by default (legacy renderer)
|
||||
{
|
||||
// check for a source file
|
||||
AZStd::string iconFullPath;
|
||||
bool pathFound = false;
|
||||
using AssetSysReqBus = AzToolsFramework::AssetSystemRequestBus;
|
||||
AssetSysReqBus::BroadcastResult(pathFound, &AssetSysReqBus::Events::GetFullSourcePathFromRelativeProductPath, iconName, iconFullPath);
|
||||
|
||||
if (pathFound)
|
||||
{
|
||||
azstrncpy(iconPath, AZ_MAX_PATH_LEN, iconFullPath.c_str(), iconFullPath.length() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CImageEx image;
|
||||
// Load icon.
|
||||
if (CImageUtil::LoadImage(iconPath, image))
|
||||
{
|
||||
IRenderer* pRenderer(GetIEditor()->GetRenderer());
|
||||
if (pRenderer->GetRenderType() != eRT_DX11)
|
||||
{
|
||||
image.SwapRedAndBlue();
|
||||
}
|
||||
|
||||
if (QString::compare(ext, "bmp", Qt::CaseInsensitive) == 0 || QString::compare(ext, "jpg", Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
int sz = image.GetWidth() * image.GetHeight();
|
||||
uint8* buf = (uint8*)image.GetData();
|
||||
for (int i = 0; i < sz; i++)
|
||||
{
|
||||
uint32 alpha = max(max(buf[i * 4], buf[i * 4 + 1]), buf[i * 4 + 2]);
|
||||
alpha *= 2;
|
||||
buf[i * 4 + 3] = (alpha > 255) ? 255 : alpha;
|
||||
}
|
||||
}
|
||||
|
||||
id = pRenderer->DownLoadToVideoMemory((unsigned char*)image.GetData(), image.GetWidth(), image.GetHeight(), eTF_R8G8B8A8, eTF_R8G8B8A8, 0, 0, 0);
|
||||
m_textures[iconName] = id;
|
||||
}
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <QTextDocumentFragment>
|
||||
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzQtComponents/Components/Style.h> // for AzQtComponents::Style
|
||||
|
||||
// Editor
|
||||
|
||||
@@ -42,7 +42,6 @@ AZ_POP_DISABLE_WARNING
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/Network/SocketConnection.h>
|
||||
#include <AzFramework/Asset/AssetSystemComponent.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
|
||||
// AzToolsFramework
|
||||
#include <AzToolsFramework/Application/Ticker.h>
|
||||
@@ -1093,7 +1092,7 @@ void MainWindow::InitActions()
|
||||
QAction* saveLevelStatsAction =
|
||||
am->AddAction(ID_TOOLS_LOGMEMORYUSAGE, tr("Save Level Statistics"))
|
||||
.SetStatusTip(tr("Logs Editor memory usage."));
|
||||
if( saveLevelStatsAction && AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
if( saveLevelStatsAction )
|
||||
{
|
||||
saveLevelStatsAction->setEnabled(false);
|
||||
}
|
||||
@@ -1189,13 +1188,6 @@ void MainWindow::InitActions()
|
||||
.SetIcon(Style::icon("Audio"))
|
||||
.SetApplyHoverEffect();
|
||||
|
||||
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
am->AddAction(ID_TERRAIN_TIMEOFDAYBUTTON, tr("Time of Day Editor"))
|
||||
.SetToolTip(tr("Open Time of Day"))
|
||||
.SetApplyHoverEffect();
|
||||
}
|
||||
|
||||
am->AddAction(ID_OPEN_UICANVASEDITOR, tr(LyViewPane::UiEditor))
|
||||
.SetToolTip(tr("Open UI Editor"))
|
||||
.SetApplyHoverEffect();
|
||||
@@ -1652,10 +1644,6 @@ void MainWindow::RegisterStdViewClasses()
|
||||
AzAssetBrowserWindow::RegisterViewClass();
|
||||
AssetEditorWindow::RegisterViewClass();
|
||||
|
||||
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
CTimeOfDayDialog::RegisterViewClass();
|
||||
}
|
||||
#ifdef ThumbnailDemo
|
||||
ThumbnailsSampleWidget::RegisterViewClass();
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
# include <AzFramework/Input/Buses/Notifications/RawInputNotificationBus_Platform.h>
|
||||
#endif // defined(AZ_PLATFORM_WINDOWS)
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h> // for AzFramework::InputDeviceMouse
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
|
||||
// AzQtComponents
|
||||
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
|
||||
@@ -275,13 +274,10 @@ void CRenderViewport::resizeEvent(QResizeEvent* event)
|
||||
|
||||
gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_RESIZE, width(), height());
|
||||
|
||||
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
// We queue the window resize event because the render overlay may be hidden.
|
||||
// If the render overlay is not visible, the native window that is backing it will
|
||||
// also be hidden, and it will not resize until it becomes visible.
|
||||
m_windowResizedEvent = true;
|
||||
}
|
||||
// We queue the window resize event because the render overlay may be hidden.
|
||||
// If the render overlay is not visible, the native window that is backing it will
|
||||
// also be hidden, and it will not resize until it becomes visible.
|
||||
m_windowResizedEvent = true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -1553,14 +1549,6 @@ void CRenderViewport::OnRender()
|
||||
if (levelIsDisplayable)
|
||||
{
|
||||
m_renderer->SetViewport(0, 0, m_renderer->GetWidth(), m_renderer->GetHeight(), m_nCurViewportID);
|
||||
|
||||
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
m_engine->Tick();
|
||||
m_engine->Update();
|
||||
|
||||
m_engine->RenderWorld(SHDF_ALLOW_AO | SHDF_ALLOWPOSTPROCESS | SHDF_ALLOW_WATER | SHDF_ALLOWHDR | SHDF_ZPASS, SRenderingPassInfo::CreateGeneralPassRenderingInfo(m_Camera), __FUNCTION__);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3659,11 +3647,8 @@ bool CRenderViewport::CreateRenderContext()
|
||||
{
|
||||
m_bRenderContextCreated = true;
|
||||
|
||||
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
AzFramework::WindowRequestBus::Handler::BusConnect(renderOverlayHWND());
|
||||
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, renderOverlayHWND());
|
||||
}
|
||||
AzFramework::WindowRequestBus::Handler::BusConnect(renderOverlayHWND());
|
||||
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, renderOverlayHWND());
|
||||
|
||||
WIN_HWND oldContext = m_renderer->GetCurrentContextHWND();
|
||||
m_renderer->CreateContext(renderOverlayHWND());
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
// AzCore
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
|
||||
// Qt
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "EditorViewportWidget.h"
|
||||
#include "CryEditDoc.h"
|
||||
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
AZ_CVAR(bool, ed_useAtomNativeViewport, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Atom-native Editor viewport (experimental, not yet stable");
|
||||
@@ -42,7 +41,7 @@ AZ_CVAR(bool, ed_useAtomNativeViewport, true, nullptr, AZ::ConsoleFunctorFlags::
|
||||
bool CViewManager::IsMultiViewportEnabled()
|
||||
{
|
||||
// Enable multi-viewport for legacy renderer, or if we're using the new fully Atom-native viewport
|
||||
return !AZ::Interface<AzFramework::AtomActiveInterface>::Get() || ed_useAtomNativeViewport;
|
||||
return ed_useAtomNativeViewport;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -81,7 +80,7 @@ CViewManager::CViewManager()
|
||||
RegisterQtViewPane<C2DViewport_YZ>(GetIEditor(), "Left", LyViewPane::CategoryViewport, viewportOptions);
|
||||
|
||||
viewportOptions.viewportType = ET_ViewportCamera;
|
||||
if (ed_useAtomNativeViewport && AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
if (ed_useAtomNativeViewport)
|
||||
{
|
||||
RegisterQtViewPaneWithName<EditorViewportWidget>(GetIEditor(), "Perspective", LyViewPane::CategoryViewport, viewportOptions);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
// AzFramework
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
|
||||
// Editor
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <AzFramework/Entity/EntityContextBus.h>
|
||||
#include <AzFramework/Physics/Material.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
#include <AzToolsFramework/API/EntityCompositionRequestBus.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
@@ -162,13 +161,6 @@ void SandboxIntegrationManager::Setup()
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect();
|
||||
// turn on the this debug display request bus implementation if no other implementation is active
|
||||
if( !(AZ::Interface<AzFramework::AtomActiveInterface>::Get() && AzFramework::DebugDisplayRequestBus::HasHandlers()))
|
||||
{
|
||||
m_debugDisplayBusImplementationActive = true;
|
||||
AzFramework::DebugDisplayRequestBus::Handler::BusConnect(
|
||||
AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
|
||||
}
|
||||
|
||||
AzFramework::DisplayContextRequestBus::Handler::BusConnect();
|
||||
SetupFileExtensionMap();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user