Skip to content

Commit 4b0568b

Browse files
authored
Create main_sdl001.cpp
1 parent e60b558 commit 4b0568b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

main_sdl001.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include <iostream>
2+
#include <SDL/SDL.h>
3+
#include <GL/glew.h>
4+
5+
using namespace std;
6+
7+
int main(int argc, char** argv) {
8+
SDL_Window* _window = nullptr;
9+
10+
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
11+
cout << "SDL Initialization Error!" << endl;
12+
}
13+
else {
14+
_window = SDL_CreateWindow("Dipesh Game",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,640,480,SDL_WINDOW_OPENGL);
15+
16+
if (_window == nullptr) {
17+
cout << "Creating window Error!" << endl;
18+
}
19+
}
20+
21+
SDL_DestroyWindow(_window);
22+
SDL_Quit();
23+
return 0;
24+
}

0 commit comments

Comments
 (0)