1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 20:02:40 +01:00
openrw/rwgame/GameWindow.hpp
2016-06-23 22:43:00 +01:00

39 lines
490 B
C++

#ifndef GAMEWINDOW_HPP
#define GAMEWINDOW_HPP
#include <string>
#include <SDL2/SDL.h>
#include <glm/vec2.hpp>
#include <render/GameRenderer.hpp>
class GameWindow
{
SDL_Window* window;
SDL_GLContext glcontext;
public:
GameWindow();
void create(size_t w, size_t h, bool fullscreen);
void close();
void showCursor();
void hideCursor();
glm::ivec2 getSize() const;
void swap() const
{
SDL_GL_SwapWindow(window);
}
bool isOpen() const
{
return !!window;
}
};
#endif