mirror of
https://github.com/encounter/SDL.git
synced 2025-06-06 22:53:29 +00:00
Fixed bug #4671 - D3D_QueueGeometry: use "count / 3" (Thanks alittlesail!)
This commit is contained in:
parent
70c23b25f0
commit
e426bb80cb
@ -1493,10 +1493,10 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
|
|||||||
const size_t first = cmd->data.draw.first;
|
const size_t first = cmd->data.draw.first;
|
||||||
SetDrawState(data, cmd);
|
SetDrawState(data, cmd);
|
||||||
if (vbo) {
|
if (vbo) {
|
||||||
IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLELIST, (UINT) (first / sizeof (Vertex)), (UINT) count);
|
IDirect3DDevice9_DrawPrimitive(data->device, D3DPT_TRIANGLELIST, (UINT) (first / sizeof (Vertex)), (UINT) count / 3);
|
||||||
} else {
|
} else {
|
||||||
const Vertex* verts = (Vertex*)(((Uint8*)vertices) + first);
|
const Vertex* verts = (Vertex*)(((Uint8*)vertices) + first);
|
||||||
IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLELIST, (UINT) count, verts, sizeof(Vertex));
|
IDirect3DDevice9_DrawPrimitiveUP(data->device, D3DPT_TRIANGLELIST, (UINT) count / 3, verts, sizeof(Vertex));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user