This commit is contained in:
2026-03-22 20:23:27 +01:00
parent fa4a2b9924
commit 0c0e7c41af
6 changed files with 16 additions and 7 deletions

View File

@@ -20,6 +20,11 @@ namespace Game::Renderer {
mTex = SDL_CreateTextureFromSurface(renderer, surf);
SDL_DestroySurface(surf);
// Apply a more pixelated scaling mode, since this is a pixel art game and the default linear filtering causes unwanted blurring when textures are scaled up
if (mTex && !SDL_SetTextureScaleMode(mTex, SDL_SCALEMODE_NEAREST)) {
WARN("Failed to set texture scale mode to NEAREST for '" << mId << "': " << SDL_GetError());
}
}
Texture::Texture(const Texture& other) {