rename UpdateViewport to SetViewport like all others setters in RenderBase.h

This commit is contained in:
degasus
2014-02-04 10:45:38 +01:00
parent 3cd6918dec
commit 5a660c27bc
7 changed files with 14 additions and 19 deletions

View File

@ -509,8 +509,8 @@ void Renderer::RecordVideoMemory()
FifoRecorder::GetInstance().SetVideoMemory(bpMem, cpMem, xfMem, xfRegs, sizeof(XFRegisters) / 4);
}
void UpdateViewport()
void SetViewport()
{
if (xfregs.viewport.wd != 0 && xfregs.viewport.ht != 0)
g_renderer->UpdateViewport();
g_renderer->SetViewport();
}

View File

@ -57,6 +57,7 @@ public:
virtual void SetLineWidth() = 0;
virtual void SetSamplerState(int stage,int texindex) = 0;
virtual void SetInterlacingMode() = 0;
virtual void SetViewport() = 0;
virtual void ApplyState(bool bUseDstAlpha) = 0;
virtual void RestoreState() = 0;
@ -107,8 +108,6 @@ public:
// Finish up the current frame, print some stats
virtual void Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& rc,float Gamma = 1.0f) = 0;
virtual void UpdateViewport() = 0;
virtual bool SaveScreenshot(const std::string &filename, const TargetRectangle &rc) = 0;
static unsigned int GetPrevPixelFormat() { return prev_efb_format; }
@ -160,4 +159,5 @@ private:
extern Renderer *g_renderer;
void UpdateViewport();
extern void SetViewport();

View File

@ -18,6 +18,7 @@
#include "XFMemory.h"
#include "VideoCommon.h"
#include "VertexManagerBase.h"
#include "RenderBase.h"
#include "RenderBase.h"
float GC_ALIGNED16(g_fProjectionMatrix[16]);
@ -173,8 +174,6 @@ static void ViewportCorrectionMatrix(Matrix44& result)
result.data[4*1+3] = (-intendedHt + 2.f * (Y - intendedY)) / Ht + 1.f;
}
void UpdateViewport();
void VertexShaderManager::Init()
{
Dirty();
@ -373,7 +372,7 @@ void VertexShaderManager::SetConstants()
constants.depthparams[1] = xfregs.viewport.zRange / 16777216.0f;
dirty = true;
// This is so implementation-dependent that we can't have it here.
UpdateViewport();
SetViewport();
// Update projection if the viewport isn't 1:1 useable
if(!g_ActiveConfig.backend_info.bSupportsOversizedViewports)