Merge pull request #556 from aws-lumberyard-dev/MoveDebugDisplayGlobalID
Move g_mainViewportEntityDebugDisplayId from AzToolsFramework to AzFramework Rename g_mainViewportEntityDebugDisplayId to g_defaultSceneEntityDebugDisplayId
This commit is contained in:
@@ -34,6 +34,8 @@ class ITexture;
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
inline constexpr 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
|
||||
|
||||
@@ -1100,7 +1100,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 =
|
||||
@@ -1523,7 +1523,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 =
|
||||
@@ -1655,7 +1655,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 =
|
||||
|
||||
@@ -905,7 +905,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 =
|
||||
|
||||
Reference in New Issue
Block a user