Skip to content

Commit

Permalink
direct3d11: Fixed missing rendering of solid primitives.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #4388.
  • Loading branch information
icculus committed Nov 17, 2018
1 parent 782f168 commit fde7592
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/render/direct3d11/SDL_render_d3d11.c
Expand Up @@ -1565,6 +1565,8 @@ D3D11_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL
return -1;
}

cmd->data.draw.count = count;

for (i = 0; i < count; i++) {
verts->pos.x = points[i].x + 0.5f;
verts->pos.y = points[i].y + 0.5f;
Expand Down Expand Up @@ -1595,6 +1597,8 @@ D3D11_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_
return -1;
}

cmd->data.draw.count = count;

for (i = 0; i < count; i++) {
verts->pos.x = rects[i].x;
verts->pos.y = rects[i].y;
Expand Down Expand Up @@ -1662,6 +1666,8 @@ D3D11_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t
return -1;
}

cmd->data.draw.count = 1;

verts->pos.x = dstrect->x;
verts->pos.y = dstrect->y;
verts->pos.z = 0.0f;
Expand Down Expand Up @@ -1743,6 +1749,8 @@ D3D11_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture *
miny = -center->y;
maxy = dstrect->h - center->y;

cmd->data.draw.count = 1;

verts->pos.x = minx;
verts->pos.y = miny;
verts->pos.z = 0.0f;
Expand Down

0 comments on commit fde7592

Please sign in to comment.