aboutsummaryrefslogtreecommitdiff
path: root/src/GPU3D_OpenGL.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-08-24 12:00:13 +0200
committerArisotura <thetotalworm@gmail.com>2020-08-24 12:00:13 +0200
commitc29e6303140af7aa7744d4bc4650399e286a3ac1 (patch)
tree1b90779213850b6a97e455a3d1aceac0cc4c9565 /src/GPU3D_OpenGL.cpp
parentb5f9278b3a12dbeca2a3b33e8c6331dd9995d5e0 (diff)
oops.
fixes #725
Diffstat (limited to 'src/GPU3D_OpenGL.cpp')
-rw-r--r--src/GPU3D_OpenGL.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp
index 72b3fc6..ba77a0c 100644
--- a/src/GPU3D_OpenGL.cpp
+++ b/src/GPU3D_OpenGL.cpp
@@ -519,6 +519,27 @@ u32* SetupVertex(Polygon* poly, int vid, Vertex* vtx, u32 vtxattr, u32* vptr)
y = vtx->FinalPosition[1];
}
+ // correct nearly-vertical edges that would look vertical on the DS
+ /*{
+ int vtopid = vid - 1;
+ if (vtopid < 0) vtopid = poly->NumVertices-1;
+ Vertex* vtop = poly->Vertices[vtopid];
+ if (vtop->FinalPosition[1] >= vtx->FinalPosition[1])
+ {
+ vtopid = vid + 1;
+ if (vtopid >= poly->NumVertices) vtopid = 0;
+ vtop = poly->Vertices[vtopid];
+ }
+ if ((vtop->FinalPosition[1] < vtx->FinalPosition[1]) &&
+ (vtx->FinalPosition[0] == vtop->FinalPosition[0]-1))
+ {
+ if (ScaleFactor > 1)
+ x = (vtop->HiresPosition[0] * ScaleFactor) >> 4;
+ else
+ x = vtop->FinalPosition[0];
+ }
+ }*/
+
*vptr++ = x | (y << 16);
*vptr++ = z | (w << 16);
@@ -1076,9 +1097,9 @@ void RenderSceneChunk(int y, int h)
glStencilMask(0);
glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, FramebufferTex[4]);
+ glBindTexture(GL_TEXTURE_2D, FramebufferTex[FrontBuffer ? 6 : 4]);
glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, FramebufferTex[5]);
+ glBindTexture(GL_TEXTURE_2D, FramebufferTex[FrontBuffer ? 7 : 5]);
glBindBuffer(GL_ARRAY_BUFFER, ClearVertexBufferID);
glBindVertexArray(ClearVertexArrayID);