diff options
author | Егор Львов <workregor@mail.ru> | 2023-03-27 11:25:27 +0300 |
---|---|---|
committer | Егор Львов <workregor@mail.ru> | 2023-03-27 11:25:27 +0300 |
commit | 3c0a3b8413ee58a3e5678075c862e95f7c8395c6 (patch) | |
tree | 8ca9eba9378f921636788fee7664c2bd63bc40ff /test.c |
Начальный коммит
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#include <stdio.h> +#include <stdlib.h> +#include <SDL2/SDL.h> +#include <SDL2/SDL_image.h> +#include <SDL2/SDL_timer.h> + +int main(){ + SDL_Window *window = NULL; + SDL_Renderer *renderer = NULL; + + SDL_Init(SDL_INIT_VIDEO); + + window = SDL_CreateWindow("test", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + 960, + 512, + 0); + + renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); + SDL_Texture *sky = NULL; + sky = IMG_LoadTexture(renderer, "/home/pupkich/Gameproj/textures/toxicclouds512.png"); + SDL_RenderCopy(renderer, sky, NULL, NULL); + SDL_RenderPresent(renderer); + SDL_DestroyTexture(sky); + SDL_Delay(200); +}
\ No newline at end of file |