Graphics: Fix viewport effect rendering bug
We didn't account for the spec dictating that scissor test does affect FBO blit operations, which resulted in corrupted output if more than one viewport with an active effect (tone, color) was created. The reason I never caught this before must be that the fglrx-legacy driver is actually bugged in this aspect and ignores the scissor on blit.
This commit is contained in:
parent
94119baeee
commit
5328d17090
|
@ -175,7 +175,13 @@ public:
|
||||||
void requestViewportRender(Vec4 &c, Vec4 &f, Vec4 &t)
|
void requestViewportRender(Vec4 &c, Vec4 &f, Vec4 &t)
|
||||||
{
|
{
|
||||||
pp.swapRender();
|
pp.swapRender();
|
||||||
|
|
||||||
|
/* Scissor test _does_ affect FBO blit operations,
|
||||||
|
* and since we're inside the draw cycle, it will
|
||||||
|
* be turned on, so turn it off temporarily */
|
||||||
|
glState.scissorTest.pushSet(false);
|
||||||
pp.blitFBOs();
|
pp.blitFBOs();
|
||||||
|
glState.scissorTest.pop();
|
||||||
|
|
||||||
PlaneShader &shader = shState->planeShader();
|
PlaneShader &shader = shState->planeShader();
|
||||||
shader.bind();
|
shader.bind();
|
||||||
|
|
Loading…
Reference in New Issue