sdl 2x scale
This commit is contained in:
parent
f32007496c
commit
ff9032bc22
11
~/SDL/Scale2x/scale2x.c
Normal file
11
~/SDL/Scale2x/scale2x.c
Normal file
@ -0,0 +1,11 @@
|
||||
#define WIDTH 320
|
||||
#define HEIGHT 192
|
||||
|
||||
#define SCALE 2
|
||||
|
||||
SDL_Window * window = SDL_CreateWindow("SDL 2x scale",
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, 0);
|
||||
SDL_Renderer * renderer = SDL_CreateRenderer(window, -1, 0);
|
||||
|
||||
SDL_SetWindowSize(window, WIDTH * SCALE, HEIGHT * SCALE);
|
||||
SDL_RenderSetScale(renderer, SCALE, SCALE);
|
Loading…
Reference in New Issue
Block a user