From f0ad9b9a8a44eccaa62a64d9103ed2ce6608f6fe Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 14 Jan 2025 23:47:59 +0300 Subject: [PATCH] twn_textures.c: fix repeated bind to work over varying channel count --- src/twn_textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twn_textures.c b/src/twn_textures.c index f4838ac..d6558d4 100644 --- a/src/twn_textures.c +++ b/src/twn_textures.c @@ -573,7 +573,7 @@ void textures_bind_repeating(const TextureCache *cache, TextureKey key) { upload_gpu_texture(repeating_texture, texture.data->pixels, - 4, + texture.data->format->BytesPerPixel, texture.data->w, texture.data->h);