Explorar o código

Enable linear interpolation

rexim %!s(int64=5) %!d(string=hai) anos
pai
achega
5ca6ee7f24
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      main.cpp

+ 2 - 1
main.cpp

@@ -7,7 +7,6 @@
 #include "stb_image.h"
 #include "stb_image.h"
 
 
 // TODO: ascending timer
 // TODO: ascending timer
-// TODO: resize interpolation
 
 
 const size_t SCREEN_WIDTH = 800;
 const size_t SCREEN_WIDTH = 800;
 const size_t SCREEN_HEIGHT = 600;
 const size_t SCREEN_HEIGHT = 600;
@@ -130,6 +129,8 @@ int main(int argc, char **argv)
                 window, -1,
                 window, -1,
                 SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED));
                 SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED));
 
 
+    sec(SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"));
+
     SDL_Texture *digits = load_png_file_as_texture(renderer, "./digits.png");
     SDL_Texture *digits = load_png_file_as_texture(renderer, "./digits.png");
     sec(SDL_SetTextureColorMod(digits, MAIN_COLOR.r, MAIN_COLOR.g, MAIN_COLOR.b));
     sec(SDL_SetTextureColorMod(digits, MAIN_COLOR.r, MAIN_COLOR.g, MAIN_COLOR.b));