Commit d8888e468e28a5fce2726b7c8444e5b903981a44

Sylvain 2021-11-15T08:37:49

Fixed bug #4964 - opengles2 & batching = conjoined lines

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index 1c60d4e..45d1eba 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -1148,7 +1148,7 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
                 int ret;
                 while (nextcmd != NULL) {
                     const SDL_RenderCommandType nextcmdtype = nextcmd->command;
-                    if (nextcmdtype != thiscmdtype) {
+                    if (nextcmdtype != thiscmdtype || thiscmdtype == SDL_RENDERCMD_DRAW_LINES) {
                         break;  /* can't go any further on this draw call, different render command up next. */
                     } else if (nextcmd->data.draw.texture != thistexture || nextcmd->data.draw.blend != thisblend) {
                         break;  /* can't go any further on this draw call, different texture/blendmode copy up next. */