You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkinnedMesh/SkinnedMeshDebugDisplay.h

59 lines
2.2 KiB
C++

/*
* 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 <Atom/RPI.Public/Base.h>
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
#include <CrySystemBus.h>
#include <Atom/Bootstrap/BootstrapNotificationBus.h>
namespace AZ
{
namespace Render
{
//! This class is responsible for displaying stats about Atom's SkinnedMesh feature
class SkinnedMeshDebugDisplay
: private AzFramework::ViewportDebugDisplayEventBus::Handler
, private CrySystemEventBus::Handler
, private AZ::Render::Bootstrap::NotificationBus::Handler
{
public:
SkinnedMeshDebugDisplay();
~SkinnedMeshDebugDisplay();
private:
// CrySystemEventBus::Handler overrides
// Register the r_skinnedMeshDisplaySceneStats cvar
void OnCrySystemInitialized(ISystem&, const SSystemInitParams&) override;
void OnCrySystemShutdown(ISystem&) override;
void OnCryEditorInitialized() override;
// AzFramework::ViewportDebugDisplayEventBus overrides
// Display the debug text if r_skinnedMeshDisplaySceneStats = 1
void DisplayViewport2d(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) override;
// Get the RPI::SceneId, which can be used to query scene stats
void OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) override;
void GetSceneId();
// CVar for toggling the display of the scene stats
int r_skinnedMeshDisplaySceneStats = 0;
// SceneId to query for the stats
RPI::SceneId m_sceneId = RPI::SceneId::CreateNull();
};
}// namespace Render
}// namespace AZ