minor optimizations over sprite path
This commit is contained in:
parent
f2bbc1863e
commit
119b706638
@ -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 */
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user