Changed preview renderer states to use construction and destruction instead of start and stop functions to make sure everything is shut down cleanly
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
+1
-13
@@ -47,17 +47,6 @@ namespace AtomToolsFramework
|
||||
AZ::RPI::ViewPtr GetView() const;
|
||||
AZ::Uuid GetEntityContextId() const;
|
||||
|
||||
enum class State : AZ::s8
|
||||
{
|
||||
None,
|
||||
IdleState,
|
||||
LoadState,
|
||||
CaptureState
|
||||
};
|
||||
|
||||
void SetState(State state);
|
||||
State GetState() const;
|
||||
|
||||
void ProcessCaptureRequests();
|
||||
void CancelCaptureRequest();
|
||||
void CompleteCaptureRequest();
|
||||
@@ -91,7 +80,6 @@ namespace AtomToolsFramework
|
||||
AZStd::queue<CaptureRequest> m_captureRequestQueue;
|
||||
CaptureRequest m_currentCaptureRequest;
|
||||
|
||||
AZStd::unordered_map<State, AZStd::shared_ptr<PreviewRendererState>> m_states;
|
||||
State m_currentState = PreviewRenderer::State::None;
|
||||
AZStd::unique_ptr<PreviewRendererState> m_state;
|
||||
};
|
||||
} // namespace AtomToolsFramework
|
||||
|
||||
-6
@@ -23,12 +23,6 @@ namespace AtomToolsFramework
|
||||
|
||||
virtual ~PreviewRendererState() = default;
|
||||
|
||||
//! Start is called when state begins execution
|
||||
virtual void Start() = 0;
|
||||
|
||||
//! Stop is called when state ends execution
|
||||
virtual void Stop() = 0;
|
||||
|
||||
protected:
|
||||
PreviewRenderer* m_renderer = {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user