mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
Merge pull request #1771 from Armada651/geom-viewport
GeometryShaderManager: Set viewport in SetConstants().
This commit is contained in:
commit
c66b4bc327
@ -20,6 +20,7 @@ GeometryShaderConstants GeometryShaderManager::constants;
|
|||||||
bool GeometryShaderManager::dirty;
|
bool GeometryShaderManager::dirty;
|
||||||
|
|
||||||
static bool s_projection_changed;
|
static bool s_projection_changed;
|
||||||
|
static bool s_viewport_changed;
|
||||||
|
|
||||||
void GeometryShaderManager::Init()
|
void GeometryShaderManager::Init()
|
||||||
{
|
{
|
||||||
@ -64,13 +65,21 @@ void GeometryShaderManager::SetConstants()
|
|||||||
|
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s_viewport_changed)
|
||||||
|
{
|
||||||
|
s_viewport_changed = false;
|
||||||
|
|
||||||
|
constants.lineptparams[0] = 2.0f * xfmem.viewport.wd;
|
||||||
|
constants.lineptparams[1] = -2.0f * xfmem.viewport.ht;
|
||||||
|
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryShaderManager::SetViewportChanged()
|
void GeometryShaderManager::SetViewportChanged()
|
||||||
{
|
{
|
||||||
constants.lineptparams[0] = 2.0f * xfmem.viewport.wd;
|
s_viewport_changed = true;
|
||||||
constants.lineptparams[1] = -2.0f * xfmem.viewport.ht;
|
|
||||||
dirty = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryShaderManager::SetProjectionChanged()
|
void GeometryShaderManager::SetProjectionChanged()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user