opengles: use glDrawArrays() correctly with GL_LINE_STRIP.

Ryan C. Gordon 2020-11-08 19:56:12 -05:00
parent de6d0ac55a
commit da49f79500
2 changed files with 2 additions and 2 deletions

View File

@ -947,7 +947,7 @@ GLES_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vert
SDL_assert(count >= 2);
SetDrawState(data, cmd);
data->glVertexPointer(2, GL_FLOAT, 0, verts);
data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) ((count-1) * 2));
data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count);
break;
}

View File

@ -1340,7 +1340,7 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
const size_t count = cmd->data.draw.count;
SDL_assert(count >= 2);
if (SetDrawState(data, cmd, GLES2_IMAGESOURCE_SOLID) == 0) {
data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) ((count-1) * 2));
data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count);
}
break;
}