1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,31 @@ |
1 |
+#ifdef GLBACKEND_SDL |
|
2 |
+ |
|
3 |
+ |
|
4 |
+#include <SDL2/SDL.h> |
|
5 |
+#include <SDL2/SDL_video.h> |
|
6 |
+ |
|
7 |
+ |
|
8 |
+constexpr auto width = 640; |
|
9 |
+constexpr auto height = 480; |
|
10 |
+ |
|
11 |
+ |
|
12 |
+int main() |
|
13 |
+{ |
|
14 |
+ if (SDL_Init(SDL_INIT_VIDEO) < 0) |
|
15 |
+ return 1; |
|
16 |
+ auto * window = SDL_CreateWindow( |
|
17 |
+ "baseline_sdl", |
|
18 |
+ SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, // NOLINT |
|
19 |
+ width, height, |
|
20 |
+ SDL_WINDOW_OPENGL |
|
21 |
+ ); |
|
22 |
+ if (!window) |
|
23 |
+ return 1; |
|
24 |
+ SDL_DestroyWindow(window); |
|
25 |
+ SDL_Quit(); |
|
26 |
+} |
|
27 |
+ |
|
28 |
+ |
|
29 |
+#else |
|
30 |
+int main() {} |
|
31 |
+#endif |