Restore Editor viewport icon rendering (#879)

This introduces an EditorViewportIconDisplayInterface that will eventually be used to outright remove CIconManager, it provides a simple interface for loading 2D image assets and rendering them on-screen. It also introduces AtomBridge::PerViewportDynamicDraw for getting a dynamic draw instance on a per-viewport basis
This commit is contained in:
Nicholas Van Sickle
2021-05-26 16:36:54 -07:00
committed by GitHub
parent dc0f1ff0b1
commit d1863c6c5b
25 changed files with 1050 additions and 24 deletions
@@ -13,6 +13,7 @@
#include <AtomBridgeSystemComponent.h>
#include <AtomDebugDisplayViewportInterface.h>
#include <FlyCameraInputComponent.h>
#include <PerViewportDynamicDrawManager.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Serialization/EditContext.h>
@@ -104,10 +105,12 @@ namespace AZ
AzFramework::GameEntityContextRequestBus::BroadcastResult(m_entityContextId, &AzFramework::GameEntityContextRequestBus::Events::GetGameEntityContextId);
AZ::Render::Bootstrap::NotificationBus::Handler::BusConnect();
m_dynamicDrawManager = AZStd::make_unique<PerViewportDynamicDrawManager>();
}
void AtomBridgeSystemComponent::Deactivate()
{
m_dynamicDrawManager.reset();
AZ::RPI::ViewportContextManagerNotificationsBus::Handler::BusDisconnect();
RPI::Scene* scene = RPI::RPISystemInterface::Get()->GetDefaultScene().get();
// Check if scene is emptry since scene might be released already when running AtomSampleViewer