tex
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user