fix warnings
This commit is contained in:
parent
eff2d9c5e1
commit
5a08c01208
@ -801,7 +801,7 @@ void finally_draw_uncolored_space_traingle_batch(const MeshBatch *batch,
|
|||||||
command.textured = true;
|
command.textured = true;
|
||||||
command.texture_key = texture_key;
|
command.texture_key = texture_key;
|
||||||
|
|
||||||
const GLuint primitives_len = arrlenu(batch->primitives);
|
const GLsizei primitives_len = (GLsizei)arrlenu(batch->primitives);
|
||||||
command.primitive_count = 3 * primitives_len;
|
command.primitive_count = 3 * primitives_len;
|
||||||
|
|
||||||
DeferredCommand final_command = {
|
DeferredCommand final_command = {
|
||||||
|
@ -32,7 +32,7 @@ struct QuadBatch collect_rect_batch(const Primitive2D primitives[], size_t len)
|
|||||||
.constant_colored = true,
|
.constant_colored = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32_t uniform_color = *(const uint32_t *)&primitives[0].rect.color;
|
const uint32_t uniform_color = *(const uint32_t *)(void const *)&primitives[0].rect.color;
|
||||||
|
|
||||||
/* batch size is clamped so that reallocated short indices could be used */
|
/* batch size is clamped so that reallocated short indices could be used */
|
||||||
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
|
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
|
||||||
@ -50,7 +50,7 @@ struct QuadBatch collect_rect_batch(const Primitive2D primitives[], size_t len)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* if all are modulated the same we can skip sending the color data */
|
/* if all are modulated the same we can skip sending the color data */
|
||||||
if (*(const uint32_t *)¤t->rect.color != uniform_color)
|
if (*(const uint32_t *)(void const *)¤t->rect.color != uniform_color)
|
||||||
batch.constant_colored = false;
|
batch.constant_colored = false;
|
||||||
|
|
||||||
++batch.size;
|
++batch.size;
|
||||||
|
@ -75,7 +75,7 @@ struct QuadBatch collect_sprite_batch(const Primitive2D primitives[], size_t len
|
|||||||
.textured = true,
|
.textured = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32_t uniform_color = *(const uint32_t *)&primitives[0].sprite.color;
|
const uint32_t uniform_color = *(const uint32_t *)(void const*)&primitives[0].sprite.color;
|
||||||
|
|
||||||
/* batch size is clamped so that reallocated short indices could be used */
|
/* batch size is clamped so that reallocated short indices could be used */
|
||||||
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
|
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
|
||||||
@ -109,7 +109,7 @@ struct QuadBatch collect_sprite_batch(const Primitive2D primitives[], size_t len
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if all are modulated the same we can skip sending the color data */
|
/* if all are modulated the same we can skip sending the color data */
|
||||||
if (*(const uint32_t *)¤t->sprite.color != uniform_color)
|
if (*(const uint32_t *)(void const *)¤t->sprite.color != uniform_color)
|
||||||
batch.constant_colored = false;
|
batch.constant_colored = false;
|
||||||
|
|
||||||
++batch.size;
|
++batch.size;
|
||||||
@ -132,7 +132,7 @@ void render_sprite_batch(const Primitive2D primitives[],
|
|||||||
textures_get_dims(&ctx.texture_cache, primitives->sprite.texture_key);
|
textures_get_dims(&ctx.texture_cache, primitives->sprite.texture_key);
|
||||||
|
|
||||||
/* cached srcrect */
|
/* cached srcrect */
|
||||||
Rect cached_srcrect;
|
Rect cached_srcrect = {0};
|
||||||
TextureKey cached_srcrect_key = TEXTURE_KEY_INVALID;
|
TextureKey cached_srcrect_key = TEXTURE_KEY_INVALID;
|
||||||
|
|
||||||
/* vertex population over a vertex buffer builder interface */
|
/* vertex population over a vertex buffer builder interface */
|
||||||
|
Loading…
Reference in New Issue
Block a user