Browse Source

Update text_font_filters.c

pull/1632/head
Ray 3 years ago
parent
commit
c8ed231eca
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      examples/text/text_font_filters.c

+ 5
- 5
examples/text/text_font_filters.c View File

@ -40,8 +40,8 @@ int main(void)
Vector2 textSize = { 0.0f, 0.0f }; Vector2 textSize = { 0.0f, 0.0f };
// Setup texture scaling filter // Setup texture scaling filter
SetTextureFilter(font.texture, FILTER_POINT);
int currentFontFilter = 0; // FILTER_POINT
SetTextureFilter(font.texture, TEXTURE_FILTER_POINT);
int currentFontFilter = 0; // TEXTURE_FILTER_POINT
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -56,18 +56,18 @@ int main(void)
// Choose font texture filter method // Choose font texture filter method
if (IsKeyPressed(KEY_ONE)) if (IsKeyPressed(KEY_ONE))
{ {
SetTextureFilter(font.texture, FILTER_POINT);
SetTextureFilter(font.texture, TEXTURE_FILTER_POINT);
currentFontFilter = 0; currentFontFilter = 0;
} }
else if (IsKeyPressed(KEY_TWO)) else if (IsKeyPressed(KEY_TWO))
{ {
SetTextureFilter(font.texture, FILTER_BILINEAR);
SetTextureFilter(font.texture, TEXTURE_FILTER_BILINEAR);
currentFontFilter = 1; currentFontFilter = 1;
} }
else if (IsKeyPressed(KEY_THREE)) else if (IsKeyPressed(KEY_THREE))
{ {
// NOTE: Trilinear filter won't be noticed on 2D drawing // NOTE: Trilinear filter won't be noticed on 2D drawing
SetTextureFilter(font.texture, FILTER_TRILINEAR);
SetTextureFilter(font.texture, TEXTURE_FILTER_TRILINEAR);
currentFontFilter = 2; currentFontFilter = 2;
} }

Loading…
Cancel
Save