-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFramebuffer.hpp
More file actions
executable file
·40 lines (38 loc) · 1.02 KB
/
Copy pathFramebuffer.hpp
File metadata and controls
executable file
·40 lines (38 loc) · 1.02 KB
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
39
40
/**
* @file Framebuffer.hpp
* @author 8ScarleT8
* @brief Describes Framebuffer class
* @version 0.1
* @date 2018-11-02
*
* @copyright Copyright (c) 2018
*
*/
#pragma once
#include "geometry.hpp"
/**
* @brief Class for interaction with the screen through fb0.
* Determines actual and virtual size of the monitor, prepares pixel array
that will be written to fb0 in order to be displayed on the screen.
*/
class Framebuffer
{
pixel *data; /*!< @brief Reference to the beginning of pixel, that will be written on the screen */
int width; /*!< @brief Reference to the beginning of pixel, that will be written on the screen */
int height;
int xres;
int yres;
int w;
int h;
public:
Framebuffer();
~Framebuffer();
Framebuffer(Framebuffer const &) = delete;
Framebuffer(Framebuffer &&) = delete;
int get_width() const noexcept;
int get_height() const noexcept;
pixel *operator[](int i) noexcept;
pixel const *operator[](int i) const noexcept;
void update();
void clear();
};