mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -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
|
NUM_INDICES = NUM_CLIPPED_VERTICES + 3
|
||||||
};
|
};
|
||||||
|
|
||||||
static float m_ViewOffset[2];
|
|
||||||
|
|
||||||
static OutputVertexData ClippedVertices[NUM_CLIPPED_VERTICES];
|
static OutputVertexData ClippedVertices[NUM_CLIPPED_VERTICES];
|
||||||
static OutputVertexData *Vertices[NUM_INDICES];
|
static OutputVertexData *Vertices[NUM_INDICES];
|
||||||
|
|
||||||
@ -63,12 +61,6 @@ namespace Clipper
|
|||||||
Vertices[i+3] = &ClippedVertices[i];
|
Vertices[i+3] = &ClippedVertices[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetViewOffset()
|
|
||||||
{
|
|
||||||
m_ViewOffset[0] = xfmem.viewport.xOrig - 342;
|
|
||||||
m_ViewOffset[1] = xfmem.viewport.yOrig - 342;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -444,8 +436,8 @@ namespace Clipper
|
|||||||
Vec3 &screen = vertex->screenPosition;
|
Vec3 &screen = vertex->screenPosition;
|
||||||
|
|
||||||
float wInverse = 1.0f/projected.w;
|
float wInverse = 1.0f/projected.w;
|
||||||
screen.x = projected.x * wInverse * xfmem.viewport.wd + m_ViewOffset[0];
|
screen.x = projected.x * wInverse * xfmem.viewport.wd + xfmem.viewport.xOrig - 342;
|
||||||
screen.y = projected.y * wInverse * xfmem.viewport.ht + m_ViewOffset[1];
|
screen.y = projected.y * wInverse * xfmem.viewport.ht + xfmem.viewport.yOrig - 342;
|
||||||
screen.z = projected.z * wInverse * xfmem.viewport.zRange + xfmem.viewport.farZ;
|
screen.z = projected.z * wInverse * xfmem.viewport.zRange + xfmem.viewport.farZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@ namespace Clipper
|
|||||||
{
|
{
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
void SetViewOffset();
|
|
||||||
|
|
||||||
void ProcessTriangle(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2);
|
void ProcessTriangle(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2);
|
||||||
|
|
||||||
void ProcessLine(OutputVertexData *v0, OutputVertexData *v1);
|
void ProcessLine(OutputVertexData *v0, OutputVertexData *v1);
|
||||||
|
@ -79,7 +79,6 @@ void SWVertexLoader::vFlush(bool useDstAlpha)
|
|||||||
m_SetupUnit->Init(primitiveType);
|
m_SetupUnit->Init(primitiveType);
|
||||||
|
|
||||||
// set all states with are stored within video sw
|
// set all states with are stored within video sw
|
||||||
Clipper::SetViewOffset();
|
|
||||||
Rasterizer::SetScissor();
|
Rasterizer::SetScissor();
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user