spacebox/src/Display.hpp

36 lines
717 B
C++

#ifndef Display_h_
#define Display_h_
#define GLM_ENABLE_EXPERIMENTAL
#include "glm/vec2.hpp"
#include "SDL.h"
#include <SDL_image.h>
#include "sdl2-gfx/SDL2_gfxPrimitives.h"
#include "sdl2-gfx/SDL2_rotozoom.h"
#include "Node.hpp"
#include "Box.hpp"
class Display : public Node
{
public:
const static int bpp = 32;
Display(Node*);
glm::ivec2 window_size() const;
Uint32 pixel_format(int = 0) const;
Box window_box() const;
void screen_pixels(unsigned char*, int, int, int = 0, int = 0) const;
SDL_Surface* screen_surface() const;
SDL_Surface* screen_surface_from_pixels(unsigned char*, bool) const;
void respond(SDL_Event&);
void toggle_fullscreen() const;
};
#endif