gl: frame upside down with GLES 2.0 if video shift is on
drawQuad ignores the swapY param if vertices are provided so swap Y coords of vertices.
This commit is contained in:
parent
4fafa91506
commit
98a0f2b821
|
@ -771,15 +771,15 @@ bool OpenGLRenderer::renderLastFrame()
|
||||||
if (gl.ofbo.shiftX != 0 || gl.ofbo.shiftY != 0)
|
if (gl.ofbo.shiftX != 0 || gl.ofbo.shiftY != 0)
|
||||||
{
|
{
|
||||||
static float sverts[20] = {
|
static float sverts[20] = {
|
||||||
-1.f, 1.f, 1.f, 0.f, 1.f,
|
-1.f, -1.f, 1.f, 0.f, 1.f,
|
||||||
-1.f, -1.f, 1.f, 0.f, 0.f,
|
-1.f, 1.f, 1.f, 0.f, 0.f,
|
||||||
1.f, 1.f, 1.f, 1.f, 1.f,
|
1.f, -1.f, 1.f, 1.f, 1.f,
|
||||||
1.f, -1.f, 1.f, 1.f, 0.f,
|
1.f, -1.f, 1.f, 1.f, 0.f,
|
||||||
};
|
};
|
||||||
sverts[0] = sverts[5] = -1.f + gl.ofbo.shiftX * 2.f / framebuffer->getWidth();
|
sverts[0] = sverts[5] = -1.f + gl.ofbo.shiftX * 2.f / framebuffer->getWidth();
|
||||||
sverts[10] = sverts[15] = sverts[0] + 2;
|
sverts[10] = sverts[15] = sverts[0] + 2;
|
||||||
sverts[1] = sverts[11] = 1.f - gl.ofbo.shiftY * 2.f / framebuffer->getHeight();
|
sverts[1] = sverts[11] = -1.f - gl.ofbo.shiftY * 2.f / framebuffer->getHeight();
|
||||||
sverts[6] = sverts[16] = sverts[1] - 2;
|
sverts[6] = sverts[16] = sverts[1] + 2;
|
||||||
vertices = sverts;
|
vertices = sverts;
|
||||||
}
|
}
|
||||||
glcache.Disable(GL_BLEND);
|
glcache.Disable(GL_BLEND);
|
||||||
|
|
Loading…
Reference in New Issue