Move g_mainViewportEntityDebugDisplayId from AzToolsFramework to AzFramework and rename it to g_defaultSceneEntityDebugDisplayId
This commit is contained in:
@@ -34,6 +34,8 @@ class ITexture;
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
static constexpr const AZ::s32 g_defaultSceneEntityDebugDisplayId = AZ_CRC_CE("MainViewportEntityDebugDisplayId"); // default id to draw to all viewports in the default scene
|
||||
|
||||
/// DebugDisplayRequests provides a debug draw api to be used by components and viewport features.
|
||||
class DebugDisplayRequests
|
||||
: public AZ::EBusTraits
|
||||
|
||||
@@ -19,8 +19,6 @@ namespace AzToolsFramework
|
||||
{
|
||||
namespace ViewportInteraction
|
||||
{
|
||||
const AZ::s32 g_mainViewportEntityDebugDisplayId = AZ_CRC("MainViewportEntityDebugDisplayId", 0x58ae7fe8);
|
||||
|
||||
void ViewportInteractionReflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
|
||||
@@ -256,9 +256,5 @@ namespace AzToolsFramework
|
||||
|
||||
/// Reflect all viewport related types.
|
||||
void ViewportInteractionReflect(AZ::ReflectContext* context);
|
||||
|
||||
/// The Id the main DebugDisplayRequestBus will be connected on.
|
||||
extern const AZ::s32 g_mainViewportEntityDebugDisplayId;
|
||||
|
||||
} // namespace ViewportInteraction
|
||||
} // namespace AzToolsFramework
|
||||
|
||||
@@ -1105,7 +1105,7 @@ void CRenderViewport::Update()
|
||||
|
||||
AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus;
|
||||
AzFramework::DebugDisplayRequestBus::Bind(
|
||||
debugDisplayBus, AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
|
||||
debugDisplayBus, AzFramework::g_defaultSceneEntityDebugDisplayId);
|
||||
AZ_Assert(debugDisplayBus, "Invalid DebugDisplayRequestBus.");
|
||||
|
||||
AzFramework::DebugDisplayRequests* debugDisplay =
|
||||
@@ -1535,7 +1535,7 @@ void CRenderViewport::OnRender()
|
||||
|
||||
AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus;
|
||||
AzFramework::DebugDisplayRequestBus::Bind(
|
||||
debugDisplayBus, AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
|
||||
debugDisplayBus, AzFramework::g_defaultSceneEntityDebugDisplayId);
|
||||
AZ_Assert(debugDisplayBus, "Invalid DebugDisplayRequestBus.");
|
||||
|
||||
AzFramework::DebugDisplayRequests* debugDisplay =
|
||||
@@ -1681,7 +1681,7 @@ void CRenderViewport::RenderAll()
|
||||
|
||||
AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus;
|
||||
AzFramework::DebugDisplayRequestBus::Bind(
|
||||
debugDisplayBus, AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
|
||||
debugDisplayBus, AzFramework::g_defaultSceneEntityDebugDisplayId);
|
||||
AZ_Assert(debugDisplayBus, "Invalid DebugDisplayRequestBus.");
|
||||
|
||||
AzFramework::DebugDisplayRequests* debugDisplay =
|
||||
|
||||
@@ -907,7 +907,7 @@ void CComponentEntityObject::Display(DisplayContext& dc)
|
||||
|
||||
AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus;
|
||||
AzFramework::DebugDisplayRequestBus::Bind(
|
||||
debugDisplayBus, AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
|
||||
debugDisplayBus, AzFramework::g_defaultSceneEntityDebugDisplayId);
|
||||
AZ_Assert(debugDisplayBus, "Invalid DebugDisplayRequestBus.");
|
||||
|
||||
AzFramework::DebugDisplayRequests* debugDisplay =
|
||||
|
||||
@@ -167,7 +167,7 @@ void SandboxIntegrationManager::Setup()
|
||||
{
|
||||
m_debugDisplayBusImplementationActive = true;
|
||||
AzFramework::DebugDisplayRequestBus::Handler::BusConnect(
|
||||
AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
|
||||
AzFramework::g_defaultSceneEntityDebugDisplayId);
|
||||
}
|
||||
|
||||
AzFramework::DisplayContextRequestBus::Handler::BusConnect();
|
||||
|
||||
Reference in New Issue
Block a user