spacebox/src/Display.hpp

37 lines
718 B
C++
Raw Normal View History

2019-05-07 03:33:54 -04:00
#ifndef Display_h_
#define Display_h_
#define GLM_ENABLE_EXPERIMENTAL
#include "glm/vec2.hpp"
2019-05-16 03:51:36 -04:00
#define GL_GLEXT_PROTOTYPES
#define GLEW_STATIC
#include "glew/glew.h"
#include "SDL.h"
2019-05-16 03:51:36 -04:00
#include <SDL_image.h>
#include "sdl2-gfx/SDL2_gfxPrimitives.h"
#include "sdl2-gfx/SDL2_rotozoom.h"
2019-05-07 03:33:54 -04:00
#include "Node.hpp"
#include "Box.hpp"
2019-05-07 03:33:54 -04:00
struct Display : Node
{
2019-06-16 03:05:02 -04:00
const static int bpp = 32;
2019-05-16 03:51:36 -04:00
2019-05-07 03:33:54 -04:00
Display(Node*);
glm::ivec2 get_window_size();
Box get_window_box();
2019-05-16 03:51:36 -04:00
void get_screen_pixels(unsigned char*, int, int, int = 0, int = 0);
2019-05-22 04:27:15 -04:00
SDL_Surface* get_screen_surface();
2019-06-16 03:05:02 -04:00
SDL_Surface* get_screen_surface_from_pixels(unsigned char*, bool);
void respond(SDL_Event&);
void toggle_fullscreen();
2019-05-07 03:33:54 -04:00
};
#endif