-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.hxx
38 lines (34 loc) · 881 Bytes
/
window.hxx
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
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <cstdint>
#include <SDL2/SDL.h>
#include "color.hxx"
namespace escript {
class WindowConfig {
private:
int width;
int height;
public:
WindowConfig(int windowWidth, int windowHeight);
int getWindowWidth();
int getWindowHeight();
void setWindowWidth(int width);
void setWindowHeight(int height);
};
class Window {
private:
SDL_Renderer* renderer;
SDL_Window* window;
WindowConfig config;
const int drawingWidth;
const int drawingHeight;
public:
Window(WindowConfig config);
~Window();
void clearScreen(Color color);
void drawPixel(Color color, int xPosition, int yPosition);
void presentBuffer();
WindowConfig& getConfig();
int getDrawingHeight();
int getDrawingWidth();
};
};