Migrate fixes from CodeCommit branch
This commit is contained in:
@@ -192,6 +192,9 @@ namespace AZ
|
||||
{
|
||||
m_defaultView = view;
|
||||
UpdatePipelineView();
|
||||
|
||||
m_viewMatrixChangedEvent.Signal(view->GetWorldToViewMatrix());
|
||||
m_projectionMatrixChangedEvent.Signal(view->GetViewToClipMatrix());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace AZ
|
||||
params.renderScene
|
||||
);
|
||||
viewportContext->GetWindowContext()->RegisterAssociatedViewportContext(viewportContext);
|
||||
RegisterViewportContext(contextName, viewportContext);
|
||||
RegisterViewportContext(nameToUse, viewportContext);
|
||||
return viewportContext;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,9 @@ namespace AZ
|
||||
AZ_Assert(false, "Attempted to rename ViewportContext \"%s\" to \"%s\", but \"%s\" is already assigned to another ViewportContext", viewportContext->m_name.GetCStr(), newContextName.GetCStr(), newContextName.GetCStr());
|
||||
return;
|
||||
}
|
||||
RegisterViewportContext(newContextName, viewportContext);
|
||||
GetOrCreateViewStackForContext(newContextName);
|
||||
viewportContext->m_name = newContextName;
|
||||
UpdateViewForContext(newContextName);
|
||||
}
|
||||
|
||||
void ViewportContextManager::EnumerateViewportContexts(AZStd::function<void(ViewportContextPtr)> visitorFunction)
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace AtomToolsFramework
|
||||
params.device = AZ::RHI::RHISystemInterface::Get()->GetDevice();
|
||||
params.windowHandle = reinterpret_cast<AzFramework::NativeWindowHandle>(winId());
|
||||
params.id = id;
|
||||
AzFramework::WindowRequestBus::Handler::BusConnect(params.windowHandle);
|
||||
m_viewportContext = viewportContextManager->CreateViewportContext(AZ::Name(), params);
|
||||
|
||||
SetControllerList(AZStd::make_shared<AzFramework::ViewportControllerList>());
|
||||
|
||||
@@ -21,7 +21,7 @@ ly_add_target(
|
||||
Include
|
||||
COMPILE_DEFINITIONS
|
||||
PRIVATE
|
||||
ENABLE_ATOM_DEBUG_DISPLAY=0
|
||||
ENABLE_ATOM_DEBUG_DISPLAY=1
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
AZ::AtomCore
|
||||
@@ -43,7 +43,7 @@ ly_add_target(
|
||||
Include
|
||||
COMPILE_DEFINITIONS
|
||||
PRIVATE
|
||||
ENABLE_ATOM_DEBUG_DISPLAY=0
|
||||
ENABLE_ATOM_DEBUG_DISPLAY=1
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Gem::Atom_AtomBridge.Static
|
||||
|
||||
@@ -165,7 +165,7 @@ void CAtomShimRenderer::EF_EndEf3D([[maybe_unused]] const int nFlags, [[maybe_un
|
||||
|
||||
// Only render the UI Canvas and the Console on the main window
|
||||
// If we're not in the editor, don't bother to check viewport.
|
||||
if (!gEnv->IsEditor() || m_currContext->m_isMainViewport)
|
||||
if (!gEnv->IsEditor() || m_currContext == nullptr || m_currContext->m_isMainViewport)
|
||||
{
|
||||
EBUS_EVENT(AZ::RenderNotificationsBus, OnScene3DEnd);
|
||||
}
|
||||
|
||||
@@ -295,7 +295,12 @@ void CAtomShimRenderer::EndFrame()
|
||||
if (!m_viewportContext)
|
||||
{
|
||||
auto viewContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
m_viewportContext = viewContextManager->GetViewportContextByName(viewContextManager->GetDefaultViewportContextName());
|
||||
auto viewportContext = viewContextManager->GetDefaultViewportContext();
|
||||
// If the viewportContext exists and is created with the default ID, we can safely assume control
|
||||
if (viewportContext && viewportContext->GetId() == -10)
|
||||
{
|
||||
m_viewportContext = viewportContext;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_viewportContext)
|
||||
|
||||
Reference in New Issue
Block a user