Skip to content

Commit

Permalink
Don't use linear interpolation for text
Browse files Browse the repository at this point in the history
We're not scaling it, so nearest sampling will give the clearest text.
  • Loading branch information
slouken committed Oct 20, 2024
1 parent ecf0069 commit 3adac8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SDL_renderer_textengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static AtlasTexture *CreateAtlas(SDL_Renderer *renderer)
DestroyAtlas(atlas);
return NULL;
}
SDL_SetTextureScaleMode(atlas->texture, SDL_SCALEMODE_NEAREST);

int num_nodes = ATLAS_TEXTURE_SIZE / 4;
atlas->packing_nodes = (stbrp_node *)SDL_calloc(num_nodes, sizeof(*atlas->packing_nodes));
Expand Down

0 comments on commit 3adac8a

Please sign in to comment.