1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00
openrw/rwgame/GameWindow.hpp
Christoph Heiss 649f7b144d Replace SFML with SDL2
This entirely replaces all remaining SFML pieces with SDL2 and
brings OpenRW up to OpenGL 3.3
2016-06-22 12:29:39 +02:00

41 lines
561 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();
void captureToFile(const std::string& path, GameRenderer* renderer);
glm::ivec2 getSize() const;
void swap() const
{
SDL_GL_SwapWindow(window);
}
bool isOpen() const
{
return !!window;
}
};
#endif