source: opengl-game/game-gui-sdl.cpp@ f898c5f

feature/imgui-sdl points-test
Last change on this file since f898c5f was f898c5f, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago

Add files from the vulkan tutorial

  • Property mode set to 100644
File size: 648 bytes
Line 
1#include "game-gui-sdl.hpp"
2
3#include <SDL.h>
4
5#include <iostream>
6
7using namespace std;
8
9bool GameGui_SDL::Init() {
10 // may want to define SDL_INIT_NOPARACHUTE when I start handling crashes since it
11 // prevents SDL from setting up its own handlers for SIG_SEGV and stuff like that
12
13 // If this function fails, I can call SDL_GetError() for more info
14 // I should create a generic error retrieval function, similar to SDL_GetError()
15
16 // cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << endl;
17
18 return SDL_Init(SDL_INIT_EVERYTHING) < 0 ? RTWO_ERROR : RTWO_SUCCESS;
19}
20
21void GameGui_SDL::Shutdown() {
22 SDL_Quit();
23}
Note: See TracBrowser for help on using the repository browser.