From fde7592adab846cde1f2497ebe9ae8b75523cc04 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 17 Nov 2018 14:39:42 -0500 Subject: [PATCH] direct3d11: Fixed missing rendering of solid primitives. Fixes Bugzilla #4388. --- src/render/direct3d11/SDL_render_d3d11.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c index ea2fd3a5e..f61fb590f 100644 --- a/src/render/direct3d11/SDL_render_d3d11.c +++ b/src/render/direct3d11/SDL_render_d3d11.c @@ -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; @@ -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; @@ -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; @@ -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;