summaryrefslogtreecommitdiff
path: root/display.h
blob: e5fcc73530713ee9799717ec4fc28c7a54494936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef DISPLAY_INCLUDED_H
#define DISPLAY_INCLUDED_H

#include "ptr.hpp"
#include <SDL2/SDL.h>
#include <string>
#include <type_traits>

class Display {
public:
	Display(int width, int height, const std::string & title);

	Display(const Display &) = delete;
	void operator=(const Display &) = delete;

	virtual ~Display();

	void Clear(float r, float g, float b, float a) const;
	void SwapBuffers() const;

private:
	wrapped_ptr<SDL_Window> m_window;
	wrapped_ptr<std::remove_pointer_t<SDL_GLContext>> m_glContext;
};

#endif