瀏覽代碼

Enable linear interpolation

rexim 5 年之前
父節點
當前提交
5ca6ee7f24
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      main.cpp

+ 2 - 1
main.cpp

@@ -7,7 +7,6 @@
 #include "stb_image.h"
 
 // TODO: ascending timer
-// TODO: resize interpolation
 
 const size_t SCREEN_WIDTH = 800;
 const size_t SCREEN_HEIGHT = 600;
@@ -130,6 +129,8 @@ int main(int argc, char **argv)
                 window, -1,
                 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");
     sec(SDL_SetTextureColorMod(digits, MAIN_COLOR.r, MAIN_COLOR.g, MAIN_COLOR.b));