mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
VideoCommon: remove VertexShaderManager functions instead preferring the direct freelook camera methods
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
#include "InputCommon/ControlReference/ControlReference.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
#include "VideoCommon/FreeLookCamera.h"
|
||||
#include "VideoCommon/OnScreenDisplay.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/VertexShaderManager.h"
|
||||
@ -545,25 +546,25 @@ void HotkeyScheduler::Run()
|
||||
fl_speed = 1.0;
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_UP, true))
|
||||
VertexShaderManager::TranslateView(0.0, 0.0, -fl_speed);
|
||||
g_freelook_camera.MoveVertical(-fl_speed);
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_DOWN, true))
|
||||
VertexShaderManager::TranslateView(0.0, 0.0, fl_speed);
|
||||
g_freelook_camera.MoveVertical(fl_speed);
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_LEFT, true))
|
||||
VertexShaderManager::TranslateView(fl_speed, 0.0);
|
||||
g_freelook_camera.MoveHorizontal(fl_speed);
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_RIGHT, true))
|
||||
VertexShaderManager::TranslateView(-fl_speed, 0.0);
|
||||
g_freelook_camera.MoveHorizontal(-fl_speed);
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_ZOOM_IN, true))
|
||||
VertexShaderManager::TranslateView(0.0, fl_speed);
|
||||
g_freelook_camera.Zoom(fl_speed);
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_ZOOM_OUT, true))
|
||||
VertexShaderManager::TranslateView(0.0, -fl_speed);
|
||||
g_freelook_camera.Zoom(-fl_speed);
|
||||
|
||||
if (IsHotkey(HK_FREELOOK_RESET, true))
|
||||
VertexShaderManager::ResetView();
|
||||
g_freelook_camera.Reset();
|
||||
|
||||
// Savestates
|
||||
for (u32 i = 0; i < State::NUM_STATES; i++)
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "DolphinQt/Resources.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
#include "VideoCommon/FreeLookCamera.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/VertexShaderManager.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
@ -238,12 +239,12 @@ void RenderWidget::OnFreeLookMouseMove(QMouseEvent* event)
|
||||
if (event->buttons() & Qt::RightButton)
|
||||
{
|
||||
// Camera Pitch and Yaw:
|
||||
VertexShaderManager::RotateView(mouse_move.y() / 200.f, mouse_move.x() / 200.f, 0.f);
|
||||
g_freelook_camera.Rotate(Common::Vec3{mouse_move.y() / 200.f, mouse_move.x() / 200.f, 0.f});
|
||||
}
|
||||
else if (event->buttons() & Qt::MidButton)
|
||||
{
|
||||
// Camera Roll:
|
||||
VertexShaderManager::RotateView(0.f, 0.f, mouse_move.x() / 200.f);
|
||||
g_freelook_camera.Rotate({0.f, 0.f, mouse_move.x() / 200.f});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user