From 119b70663894be0dd16da193cdec159e77527959 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 15 Oct 2024 19:32:42 +0300 Subject: [PATCH] minor optimizations over sprite path --- src/rendering/twn_gl_15_rendering.c | 2 +- src/rendering/twn_sprites.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index c685139..6db99d3 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -582,7 +582,7 @@ bool push_to_vertex_buffer_builder(VertexBufferBuilder *builder, if (builder->bytes_left == 0) return false; - SDL_memcpy(builder->mapping, bytes, size); + memcpy(builder->mapping, bytes, size); builder->bytes_left -= size; /* trigger data send */ diff --git a/src/rendering/twn_sprites.c b/src/rendering/twn_sprites.c index acaa540..0f5bc26 100644 --- a/src/rendering/twn_sprites.c +++ b/src/rendering/twn_sprites.c @@ -152,7 +152,7 @@ void render_sprite_batch(const Primitive2D primitives[], Vec2 uv0, uv1, uv2, uv3; - if (!sprite.repeat) { + if (!batch.repeat) { const float wr = srcrect.w / dims.w; const float hr = srcrect.h / dims.h; const float xr = srcrect.x / dims.w;