From cd9c04ac08a1dbf9d1ad61e897ffdadb366d969a Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Tue, 17 Jun 2025 16:46:06 +1000 Subject: [PATCH] Fix some embarrassing typos --- src/c/nehe.c | 4 ++-- src/rust/nehe/context/copypass.rs | 2 +- src/swift/NeHe/NeHeCopyPass.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/c/nehe.c b/src/c/nehe.c index edfe5bf..f7ae0c5 100644 --- a/src/c/nehe.c +++ b/src/c/nehe.c @@ -245,7 +245,7 @@ SDL_GPUTexture* NeHe_CreateGPUTextureFromSurface(NeHeContext* restrict ctx, cons bool needsConvert = false; switch (surface->format) { - // FIMXE: I'm not sure that these are endian-safe + // FIXME: I'm not sure that these are endian-safe case SDL_PIXELFORMAT_RGBA32: info.format = SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM; break; case SDL_PIXELFORMAT_RGBA64: info.format = SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM; break; case SDL_PIXELFORMAT_RGB565: info.format = SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM; break; @@ -284,7 +284,7 @@ SDL_GPUTexture* NeHe_CreateGPUTextureFromSurface(NeHeContext* restrict ctx, cons if (genMipmaps) { info.usage |= SDL_GPU_TEXTUREUSAGE_COLOR_TARGET; - // floor(log₂(max(𝑤,ℎ)) + 1 + // floor(log₂(max(𝑤,ℎ))) + 1 info.num_levels = (Uint32)SDL_MostSignificantBitIndex32(SDL_max(info.width, info.height)) + 1; } diff --git a/src/rust/nehe/context/copypass.rs b/src/rust/nehe/context/copypass.rs index 37fa268..bc49a25 100644 --- a/src/rust/nehe/context/copypass.rs +++ b/src/rust/nehe/context/copypass.rs @@ -163,7 +163,7 @@ impl NeHeCopyPass<'_> if gen_mipmaps { info.usage |= SDL_GPU_TEXTUREUSAGE_COLOR_TARGET; - info.num_levels = max(info.width, info.height).ilog2() + 1; // floor(log₂(max(𝑤,ℎ)) + 1 + info.num_levels = max(info.width, info.height).ilog2() + 1; // floor(log₂(max(𝑤,ℎ))) + 1 } if needs_convert diff --git a/src/swift/NeHe/NeHeCopyPass.swift b/src/swift/NeHe/NeHeCopyPass.swift index b6d4ad9..085f1cd 100644 --- a/src/swift/NeHe/NeHeCopyPass.swift +++ b/src/swift/NeHe/NeHeCopyPass.swift @@ -194,7 +194,7 @@ public extension NeHeCopyPass if genMipmaps { info.usage |= SDL_GPU_TEXTUREUSAGE_COLOR_TARGET - // floor(log₂(max(𝑤,ℎ)) + 1 + // floor(log₂(max(𝑤,ℎ))) + 1 info.num_levels = 31 - UInt32(max(info.width, info.height).leadingZeroBitCount) + 1 }