Skip to content

Commit 74209cb

Browse files
committed
Fix scanlines with some OGL drivers
1 parent 519cde2 commit 74209cb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

platforms/shared/desktop/ogl_renderer.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static void render_emu_mix(void)
334334
glViewport(0, 0, viewportWidth, viewportHeight);
335335

336336
glBindVertexArray(quad_vao);
337-
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
337+
glDrawArrays(GL_TRIANGLES, 0, 3);
338338
glBindVertexArray(0);
339339
glUseProgram(0);
340340

@@ -435,7 +435,7 @@ static void render_quad(float tex_h, float tex_v)
435435
glViewport(0, 0, viewportWidth, viewportHeight);
436436

437437
glBindVertexArray(quad_vao);
438-
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
438+
glDrawArrays(GL_TRIANGLES, 0, 3);
439439
glBindVertexArray(0);
440440
glUseProgram(0);
441441
}
@@ -463,7 +463,7 @@ static void render_scanlines(void)
463463
glViewport(0, 0, viewportWidth, viewportHeight);
464464

465465
glBindVertexArray(quad_vao);
466-
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
466+
glDrawArrays(GL_TRIANGLES, 0, 3);
467467
glBindVertexArray(0);
468468

469469
glUseProgram(0);
@@ -563,9 +563,8 @@ static void init_shaders(void)
563563

564564
float quad_vertices[] = {
565565
-1.0f, -1.0f, 0.0f, 0.0f,
566-
1.0f, -1.0f, 1.0f, 0.0f,
567-
-1.0f, 1.0f, 0.0f, 1.0f,
568-
1.0f, 1.0f, 1.0f, 1.0f,
566+
3.0f, -1.0f, 2.0f, 0.0f,
567+
-1.0f, 3.0f, 0.0f, 2.0f,
569568
};
570569

571570
glGenVertexArrays(1, &quad_vao);

0 commit comments

Comments
 (0)