mirror of
https://github.com/ScrelliCopter/NeHe-SDL_GPU.git
synced 2025-06-19 21:49:17 +10:00
Fix some embarrassing typos
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user