This commit is contained in:
2018-12-03 21:11:14 +03:00
parent 2bf6fdb5a1
commit 636409281a
3 changed files with 25 additions and 40 deletions

BIN
testSDL/Lesson1/hello.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 KiB

25
testSDL/Lesson1/main.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include <SDL2/SDL.h>
#include <iostream>
using namespace std;
int main()
{
if (SDL_Init(SDL_INIT_EVERYTHING) != 0 )
{
cout << "SDL_Init error\n";
return 1;
}
SDL_Window* window = SDL_CreateWindow("Hello World!", 100, 100, 640, 480, SDL_WINDOW_SHOWN);
if (window == nullptr)
{
cout << "Window create error\n";
return 1;
}
SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED || SDL_RENDERER_PRESENTVSYNC);
if (renderer == nullptr)
{
cout << "Renderer error\n";
return 1;
}
}