Integrating github/staging through commit b0dd7ed
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
#include "EditorPreferencesPageGeneral.h"
|
||||
#include "ViewportManipulatorController.h"
|
||||
#include "LegacyViewportCameraController.h"
|
||||
#include "ModernViewportCameraController.h"
|
||||
|
||||
#include "ViewPane.h"
|
||||
#include "CustomResolutionDlg.h"
|
||||
@@ -92,6 +93,7 @@
|
||||
// Atom
|
||||
#include <Atom/RPI.Public/View.h>
|
||||
#include <Atom/RPI.Public/ViewportContextManager.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Math/MatrixUtils.h>
|
||||
|
||||
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||
@@ -106,6 +108,10 @@ void StartFixedCursorMode(QObject *viewport);
|
||||
#define RENDER_MESH_TEST_DISTANCE (0.2f)
|
||||
#define CURSOR_FONT_HEIGHT 8.0f
|
||||
|
||||
AZ_CVAR(
|
||||
bool, ed_useNewCameraSystem, false, nullptr, AZ::ConsoleFunctorFlags::Null,
|
||||
"Use the new Editor camera system (the Atom-native Editor viewport (experimental) must also be enabled)");
|
||||
|
||||
namespace AZ::ViewportHelpers
|
||||
{
|
||||
static const char TextCantCreateCameraNoLevel[] = "Cannot create camera when no level is loaded.";
|
||||
@@ -1236,7 +1242,16 @@ void EditorViewportWidget::SetViewportId(int id)
|
||||
viewportContext->ConnectProjectionMatrixChangedHandler(m_cameraProjectionMatrixChangeHandler);
|
||||
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ViewportManipulatorController>());
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
|
||||
|
||||
if (ed_useNewCameraSystem)
|
||||
{
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ModernViewportCameraController>());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
|
||||
}
|
||||
|
||||
UpdateScene();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
*/
|
||||
|
||||
#include "LegacyViewportCameraController.h"
|
||||
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzToolsFramework/Viewport/ViewportMessages.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
@@ -73,7 +75,8 @@ AZ::RPI::ViewportContextPtr LegacyViewportCameraControllerInstance::GetViewportC
|
||||
return viewportContextManager->GetViewportContextById(GetViewportId());
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& currentMousePos, const QPoint& previousMousePos)
|
||||
bool LegacyViewportCameraControllerInstance::HandleMouseMove(
|
||||
const AzFramework::ScreenPoint& currentMousePos, const AzFramework::ScreenPoint& previousMousePos)
|
||||
{
|
||||
if (previousMousePos == currentMousePos)
|
||||
{
|
||||
@@ -100,7 +103,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
Vec3 ydir = m.GetColumn1().GetNormalized();
|
||||
Vec3 pos = m.GetTranslation();
|
||||
|
||||
const float posDelta = 0.2f * (previousMousePos.y() - currentMousePos.y()) * speedScale;
|
||||
const float posDelta = 0.2f * (previousMousePos.m_y - currentMousePos.m_y) * speedScale;
|
||||
pos = pos - ydir * posDelta;
|
||||
m_orbitDistance = m_orbitDistance + posDelta;
|
||||
m_orbitDistance = fabs(m_orbitDistance);
|
||||
@@ -111,7 +114,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
}
|
||||
else if (m_inRotateMode)
|
||||
{
|
||||
Ang3 angles(-currentMousePos.y() + previousMousePos.y(), 0, -currentMousePos.x() + previousMousePos.x());
|
||||
Ang3 angles(-currentMousePos.m_y + previousMousePos.m_y, 0, -currentMousePos.m_x + previousMousePos.m_x);
|
||||
angles = angles * 0.002f * gSettings.cameraRotateSpeed;
|
||||
if (gSettings.invertYRotation)
|
||||
{
|
||||
@@ -143,7 +146,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
}
|
||||
|
||||
Vec3 pos = m.GetTranslation();
|
||||
pos += 0.1f * xdir * (currentMousePos.x() - previousMousePos.x()) * speedScale + 0.1f * zdir * (previousMousePos.y() - currentMousePos.y()) * speedScale;
|
||||
pos += 0.1f * xdir * (currentMousePos.m_x - previousMousePos.m_x) * speedScale + 0.1f * zdir * (previousMousePos.m_y - currentMousePos.m_y) * speedScale;
|
||||
m.SetTranslation(pos);
|
||||
|
||||
AZ::Transform transform = viewportContext->GetCameraTransform();
|
||||
@@ -153,7 +156,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
}
|
||||
else if (m_inOrbitMode)
|
||||
{
|
||||
Ang3 angles(-currentMousePos.y() + previousMousePos.y(), 0, -currentMousePos.x() + previousMousePos.x());
|
||||
Ang3 angles(-currentMousePos.m_y + previousMousePos.m_y, 0, -currentMousePos.m_x + previousMousePos.m_x);
|
||||
angles = angles * 0.002f * gSettings.cameraRotateSpeed;
|
||||
|
||||
if (gSettings.invertPan)
|
||||
@@ -289,14 +292,13 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra
|
||||
|
||||
if (id == AzFramework::InputDeviceMouse::SystemCursorPosition)
|
||||
{
|
||||
QPoint screenPosition = QPoint();
|
||||
bool result = false;
|
||||
AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Event(
|
||||
GetViewportId(),
|
||||
[this, &result](AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequests* mouseRequests)
|
||||
{
|
||||
auto previousMousePosition = mouseRequests->PreviousViewportCursorScreenPosition();
|
||||
if (previousMousePosition.has_value())
|
||||
if (auto previousMousePosition = mouseRequests->PreviousViewportCursorScreenPosition();
|
||||
previousMousePosition.has_value())
|
||||
{
|
||||
result = HandleMouseMove(mouseRequests->ViewportCursorScreenPosition(), previousMousePosition.value());
|
||||
}
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
#include <QtCore/qnamespace.h>
|
||||
#include <QPoint>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
struct ScreenPoint;
|
||||
}
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
class LegacyViewportCameraControllerInstance final
|
||||
@@ -45,7 +50,7 @@ namespace SandboxEditor
|
||||
|
||||
AZ::RPI::ViewportContextPtr GetViewportContext();
|
||||
|
||||
bool HandleMouseMove(const QPoint& currentMousePos, const QPoint& previousMousePos);
|
||||
bool HandleMouseMove(const AzFramework::ScreenPoint& currentMousePos, const AzFramework::ScreenPoint& previousMousePos);
|
||||
bool HandleMouseWheel(float zDelta);
|
||||
bool IsKeyDown(Qt::Key key) const;
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ModernViewportCameraController.h"
|
||||
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzFramework/Windowing/WindowBus.h>
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
static AZ::RPI::ViewportContextPtr RetrieveViewportContext(const AzFramework::ViewportId viewportId)
|
||||
{
|
||||
auto viewportContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
if (!viewportContextManager)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto viewportContext = viewportContextManager->GetViewportContextById(viewportId);
|
||||
if (!viewportContext)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return viewportContext;
|
||||
}
|
||||
|
||||
ModernViewportCameraControllerInstance::ModernViewportCameraControllerInstance(const AzFramework::ViewportId viewportId)
|
||||
: MultiViewportControllerInstanceInterface(viewportId)
|
||||
{
|
||||
// LYN-2315 TODO - move setup out of constructor, pass cameras in
|
||||
auto firstPersonRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::InputDeviceMouse::Button::Right);
|
||||
auto firstPersonPanCamera = AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::LookPan);
|
||||
auto firstPersonTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::LookTranslation);
|
||||
auto firstPersonWheelCamera = AZStd::make_shared<AzFramework::ScrollTranslationCameraInput>();
|
||||
|
||||
auto orbitCamera = AZStd::make_shared<AzFramework::OrbitCameraInput>();
|
||||
auto orbitRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::InputDeviceMouse::Button::Left);
|
||||
auto orbitTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::OrbitTranslation);
|
||||
auto orbitDollyWheelCamera = AZStd::make_shared<AzFramework::OrbitDollyScrollCameraInput>();
|
||||
auto orbitDollyMoveCamera = AZStd::make_shared<AzFramework::OrbitDollyCursorMoveCameraInput>();
|
||||
auto orbitPanCamera = AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::OrbitPan);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitRotateCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitTranslateCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitDollyWheelCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitDollyMoveCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitPanCamera);
|
||||
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonRotateCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonPanCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonTranslateCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonWheelCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(orbitCamera);
|
||||
|
||||
if (const auto viewportContext = RetrieveViewportContext(viewportId))
|
||||
{
|
||||
// set position but not orientation
|
||||
m_targetCamera.m_lookAt = viewportContext->GetCameraTransform().GetTranslation();
|
||||
|
||||
// LYN-2315 TODO https://www.geometrictools.com/Documentation/EulerAngles.pdf
|
||||
|
||||
m_camera = m_targetCamera;
|
||||
}
|
||||
}
|
||||
|
||||
bool ModernViewportCameraControllerInstance::HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event)
|
||||
{
|
||||
AzFramework::WindowSize windowSize;
|
||||
AzFramework::WindowRequestBus::EventResult(
|
||||
windowSize, event.m_windowHandle, &AzFramework::WindowRequestBus::Events::GetClientAreaSize);
|
||||
m_cameraSystem.HandleEvents(AzFramework::BuildInputEvent(event.m_inputChannel, windowSize));
|
||||
return true; // consume event
|
||||
}
|
||||
|
||||
void ModernViewportCameraControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event)
|
||||
{
|
||||
if (auto viewportContext = RetrieveViewportContext(GetViewportId()))
|
||||
{
|
||||
m_targetCamera = m_cameraSystem.StepCamera(m_targetCamera, event.m_deltaTime.count());
|
||||
m_camera = AzFramework::SmoothCamera(m_camera, m_targetCamera, m_smoothProps, event.m_deltaTime.count());
|
||||
|
||||
viewportContext->SetCameraTransform(m_camera.Transform());
|
||||
}
|
||||
}
|
||||
} // namespace SandboxEditor
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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 <AzFramework/Viewport/CameraInput.h>
|
||||
#include <AzFramework/Viewport/MultiViewportController.h>
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
class ModernViewportCameraControllerInstance final : public AzFramework::MultiViewportControllerInstanceInterface
|
||||
{
|
||||
public:
|
||||
explicit ModernViewportCameraControllerInstance(AzFramework::ViewportId viewportId);
|
||||
|
||||
// MultiViewportControllerInstanceInterface overrides ...
|
||||
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
|
||||
void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override;
|
||||
|
||||
private:
|
||||
AzFramework::Camera m_camera;
|
||||
AzFramework::Camera m_targetCamera;
|
||||
AzFramework::SmoothProps m_smoothProps;
|
||||
AzFramework::CameraSystem m_cameraSystem;
|
||||
};
|
||||
|
||||
using ModernViewportCameraController = AzFramework::MultiViewportController<ModernViewportCameraControllerInstance>;
|
||||
} // namespace SandboxEditor
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ImageTIF.h"
|
||||
|
||||
/// libTiff
|
||||
#include <libtiff/tiffio.h> // TIFF library
|
||||
#include <tiffio.h> // TIFF library
|
||||
|
||||
// Function prototypes
|
||||
static tsize_t libtiffDummyReadProc (thandle_t fd, tdata_t buf, tsize_t size);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <AzToolsFramework/ViewportSelection/EditorInteractionSystemViewportSelectionRequestBus.h>
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzCore/Script/ScriptTimePoint.h>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -99,18 +100,16 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram
|
||||
// Cache the ray trace results when doing manipulator interaction checks, no need to recalculate after
|
||||
if (event.m_priority == ManipulatorPriority)
|
||||
{
|
||||
QPoint screenPosition = QPoint();
|
||||
AzFramework::ScreenPoint screenPosition = AzFramework::ScreenPoint(0, 0);
|
||||
ViewportMouseCursorRequestBus::EventResult(
|
||||
screenPosition, GetViewportId(),
|
||||
&ViewportMouseCursorRequestBus::Events::ViewportCursorScreenPosition
|
||||
);
|
||||
m_state.m_mousePick.m_screenCoordinates = AzFramework::ScreenPoint{screenPosition.x(), screenPosition.y()};
|
||||
screenPosition, GetViewportId(), &ViewportMouseCursorRequestBus::Events::ViewportCursorScreenPosition);
|
||||
|
||||
m_state.m_mousePick.m_screenCoordinates = screenPosition;
|
||||
AZStd::optional<ProjectedViewportRay> ray;
|
||||
ViewportInteractionRequestBus::EventResult(
|
||||
ray, GetViewportId(),
|
||||
&ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay,
|
||||
screenPosition
|
||||
);
|
||||
ray, GetViewportId(), &ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay,
|
||||
QPoint(screenPosition.m_x, screenPosition.m_y));
|
||||
|
||||
if (ray.has_value())
|
||||
{
|
||||
m_state.m_mousePick.m_rayOrigin = ray.value().origin;
|
||||
|
||||
@@ -996,6 +996,8 @@ set(FILES
|
||||
ViewportManipulatorController.h
|
||||
LegacyViewportCameraController.cpp
|
||||
LegacyViewportCameraController.h
|
||||
ModernViewportCameraController.cpp
|
||||
ModernViewportCameraController.h
|
||||
RenderViewport.cpp
|
||||
RenderViewport.h
|
||||
TopRendererWnd.cpp
|
||||
|
||||
@@ -41,6 +41,65 @@
|
||||
|
||||
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
|
||||
|
||||
// Class to implement the WindowRequestBus::Handler instead of the QViewport class.
|
||||
// This is to bypass a link warning that occurs in unity builds if EditorCommon dll
|
||||
// is linked along with a gem that also implements WindowRequestBus::Handler. The
|
||||
// issue is that QViewport has a dllexport so it causes duplicate code to be linked
|
||||
// in and a warning that there will be two of the same symbol in memory
|
||||
class QViewportRequests
|
||||
: public AzFramework::WindowRequestBus::Handler
|
||||
{
|
||||
public:
|
||||
QViewportRequests(QViewport& viewport)
|
||||
: m_viewport(viewport)
|
||||
{
|
||||
}
|
||||
|
||||
~QViewportRequests() override
|
||||
{
|
||||
AzFramework::WindowRequestBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
// WindowRequestBus::Handler...
|
||||
void SetWindowTitle(const AZStd::string& title) override
|
||||
{
|
||||
m_viewport.SetWindowTitle(title);
|
||||
}
|
||||
|
||||
AzFramework::WindowSize GetClientAreaSize() const override
|
||||
{
|
||||
return m_viewport.GetClientAreaSize();
|
||||
}
|
||||
|
||||
void ResizeClientArea(AzFramework::WindowSize clientAreaSize) override
|
||||
{
|
||||
m_viewport.ResizeClientArea(clientAreaSize);
|
||||
}
|
||||
|
||||
bool GetFullScreenState() const override
|
||||
{
|
||||
return m_viewport.GetFullScreenState();
|
||||
}
|
||||
|
||||
void SetFullScreenState(bool fullScreenState) override
|
||||
{
|
||||
m_viewport.SetFullScreenState(fullScreenState);
|
||||
}
|
||||
|
||||
bool CanToggleFullScreenState() const override
|
||||
{
|
||||
return m_viewport.CanToggleFullScreenState();
|
||||
}
|
||||
|
||||
void ToggleFullScreenState() override
|
||||
{
|
||||
m_viewport.ToggleFullScreenState();
|
||||
}
|
||||
|
||||
private:
|
||||
QViewport& m_viewport;
|
||||
};
|
||||
|
||||
struct QViewport::SPreviousContext
|
||||
{
|
||||
CCamera renderCamera;
|
||||
@@ -188,6 +247,8 @@ QViewport::QViewport(QWidget* parent, StartupMode startupMode)
|
||||
, m_private(new SPrivate())
|
||||
, m_cameraControlMode(CameraControlMode::NONE)
|
||||
{
|
||||
m_viewportRequests = AZStd::make_unique<QViewportRequests>(*this);
|
||||
|
||||
if (startupMode & StartupMode_Immediate)
|
||||
Startup();
|
||||
}
|
||||
@@ -213,6 +274,8 @@ void QViewport::Startup()
|
||||
QViewport::~QViewport()
|
||||
{
|
||||
DestroyRenderContext();
|
||||
|
||||
m_viewportRequests.reset();
|
||||
}
|
||||
|
||||
void QViewport::UpdateBackgroundColor()
|
||||
@@ -316,7 +379,7 @@ bool QViewport::CreateRenderContext()
|
||||
|
||||
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
AzFramework::WindowRequestBus::Handler::BusConnect(windowHandle);
|
||||
m_viewportRequests.get()->BusConnect(windowHandle);
|
||||
AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle);
|
||||
|
||||
m_lastHwnd = windowHandle;
|
||||
@@ -346,7 +409,7 @@ void QViewport::DestroyRenderContext()
|
||||
m_renderContextCreated = false;
|
||||
|
||||
AzFramework::WindowNotificationBus::Event(windowHandle, &AzFramework::WindowNotificationBus::Handler::OnWindowClosed);
|
||||
AzFramework::WindowRequestBus::Handler::BusDisconnect();
|
||||
m_viewportRequests.get()->BusDisconnect();
|
||||
m_lastHwnd = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ struct SMouseEvent;
|
||||
struct SViewportSettings;
|
||||
struct SViewportState;
|
||||
class QElapsedTimer;
|
||||
class QViewportRequests;
|
||||
|
||||
class EDITOR_COMMON_API QViewport;
|
||||
struct SRenderContext
|
||||
@@ -66,7 +67,6 @@ AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING
|
||||
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
class EDITOR_COMMON_API QViewport
|
||||
: public QWidget
|
||||
, public AzFramework::WindowRequestBus::Handler
|
||||
{
|
||||
Q_OBJECT
|
||||
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
@@ -107,14 +107,14 @@ public:
|
||||
void SetSize(const QSize& size);
|
||||
void GetImageOffscreen(CImageEx& image, const QSize& customSize);
|
||||
|
||||
// WindowRequestBus::Handler...
|
||||
void SetWindowTitle(const AZStd::string& title) override;
|
||||
AzFramework::WindowSize GetClientAreaSize() const override;
|
||||
void ResizeClientArea(AzFramework::WindowSize clientAreaSize) override;
|
||||
bool GetFullScreenState() const override;
|
||||
void SetFullScreenState(bool fullScreenState) override;
|
||||
bool CanToggleFullScreenState() const override;
|
||||
void ToggleFullScreenState() override;
|
||||
// WindowRequestBus::Handler... (handler moved to cpp to resolve link issues in unity builds)
|
||||
void SetWindowTitle(const AZStd::string& title);
|
||||
AzFramework::WindowSize GetClientAreaSize() const;
|
||||
void ResizeClientArea(AzFramework::WindowSize clientAreaSize);
|
||||
bool GetFullScreenState() const;
|
||||
void SetFullScreenState(bool fullScreenState);
|
||||
bool CanToggleFullScreenState() const;
|
||||
void ToggleFullScreenState();
|
||||
|
||||
public slots:
|
||||
void Update();
|
||||
@@ -197,6 +197,7 @@ private:
|
||||
std::unique_ptr<SViewportSettings> m_settings;
|
||||
std::unique_ptr<SViewportState> m_state;
|
||||
std::vector<QViewportConsumer*> m_consumers;
|
||||
AZStd::unique_ptr<QViewportRequests> m_viewportRequests;
|
||||
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
HWND m_lastHwnd = 0;
|
||||
bool m_resizeWindowEvent = false;
|
||||
|
||||
Reference in New Issue
Block a user