minor optimizations over sprite path

This commit is contained in:
veclav talica 2024-10-15 19:32:42 +03:00
parent f2bbc1863e
commit 119b706638
2 changed files with 2 additions and 2 deletions

View File

@ -582,7 +582,7 @@ bool push_to_vertex_buffer_builder(VertexBufferBuilder *builder,
if (builder->bytes_left == 0) if (builder->bytes_left == 0)
return false; return false;
SDL_memcpy(builder->mapping, bytes, size); memcpy(builder->mapping, bytes, size);
builder->bytes_left -= size; builder->bytes_left -= size;
/* trigger data send */ /* trigger data send */

View File

@ -152,7 +152,7 @@ void render_sprite_batch(const Primitive2D primitives[],
Vec2 uv0, uv1, uv2, uv3; Vec2 uv0, uv1, uv2, uv3;
if (!sprite.repeat) { if (!batch.repeat) {
const float wr = srcrect.w / dims.w; const float wr = srcrect.w / dims.w;
const float hr = srcrect.h / dims.h; const float hr = srcrect.h / dims.h;
const float xr = srcrect.x / dims.w; const float xr = srcrect.x / dims.w;