Skip to content

Commit

Permalink
Better fix for last point in D3D11 renderer, thanks to Nader Golbaz
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 6, 2016
1 parent 0396af6 commit 057bca8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/render/direct3d11/SDL_render_d3d11.c
Expand Up @@ -2576,7 +2576,12 @@ D3D11_RenderDrawLines(SDL_Renderer * renderer,
NULL);

D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP, count);
D3D11_RenderFinishDrawOp(renderer, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST, count);

if (points[0].x != points[count - 1].x || points[0].y != points[count - 1].y) {
ID3D11DeviceContext_IASetPrimitiveTopology(rendererData->d3dContext, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
ID3D11DeviceContext_Draw(rendererData->d3dContext, 1, count - 1);
}

SDL_stack_free(vertices);
return 0;
}
Expand Down

0 comments on commit 057bca8

Please sign in to comment.