mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoSW: Drop SetViewOffset.
Just use the global state.
This commit is contained in:
@ -52,8 +52,6 @@ namespace Clipper
|
||||
NUM_INDICES = NUM_CLIPPED_VERTICES + 3
|
||||
};
|
||||
|
||||
static float m_ViewOffset[2];
|
||||
|
||||
static OutputVertexData ClippedVertices[NUM_CLIPPED_VERTICES];
|
||||
static OutputVertexData *Vertices[NUM_INDICES];
|
||||
|
||||
@ -63,12 +61,6 @@ namespace Clipper
|
||||
Vertices[i+3] = &ClippedVertices[i];
|
||||
}
|
||||
|
||||
void SetViewOffset()
|
||||
{
|
||||
m_ViewOffset[0] = xfmem.viewport.xOrig - 342;
|
||||
m_ViewOffset[1] = xfmem.viewport.yOrig - 342;
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
@ -444,8 +436,8 @@ namespace Clipper
|
||||
Vec3 &screen = vertex->screenPosition;
|
||||
|
||||
float wInverse = 1.0f/projected.w;
|
||||
screen.x = projected.x * wInverse * xfmem.viewport.wd + m_ViewOffset[0];
|
||||
screen.y = projected.y * wInverse * xfmem.viewport.ht + m_ViewOffset[1];
|
||||
screen.x = projected.x * wInverse * xfmem.viewport.wd + xfmem.viewport.xOrig - 342;
|
||||
screen.y = projected.y * wInverse * xfmem.viewport.ht + xfmem.viewport.yOrig - 342;
|
||||
screen.z = projected.z * wInverse * xfmem.viewport.zRange + xfmem.viewport.farZ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user