mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vulkan] Update the number of drawn quads correctly
They should increment by one for each pic, not 4 (I think some fluff remaining from copying glsl's draw code). I noticed the problem when I saw large gaps of 0s in the vertex data in renderdoc.
This commit is contained in:
parent
be7216e660
commit
4d1e8b2375
1 changed files with 2 additions and 2 deletions
|
@ -448,12 +448,12 @@ draw_pic (float x, float y, int w, int h, qpic_t *pic,
|
|||
int srcx, int srcy, int srcw, int srch,
|
||||
float *color, drawframe_t *frame)
|
||||
{
|
||||
if (frame->num_quads + VERTS_PER_QUAD > MAX_QUADS) {
|
||||
if (frame->num_quads >= MAX_QUADS) {
|
||||
return;
|
||||
}
|
||||
|
||||
drawvert_t *verts = frame->verts + frame->num_quads * VERTS_PER_QUAD;
|
||||
frame->num_quads += VERTS_PER_QUAD;
|
||||
frame->num_quads++;
|
||||
|
||||
subpic_t *subpic = *(subpic_t **) pic->data;
|
||||
srcx += subpic->rect->x;
|
||||
|
|
Loading…
Reference in a new issue