#include <Display.hpp>
Definition at line 16 of file Display.hpp.
◆ Display()
| Display::Display |
( |
int | width, |
|
|
int | height ) |
◆ ~Display()
◆ init()
◆ notifyDone()
| void Display::notifyDone |
( |
| ) |
|
◆ pushPixel()
| void Display::pushPixel |
( |
int | x, |
|
|
int | y, |
|
|
const Pixel & | px ) |
◆ run()
Definition at line 33 of file Display.cpp.
34{
35 sf::Image image;
37
39 sf::Event ev;
41 if (ev.type == sf::Event::Closed)
43 else if (ev.type == sf::Event::KeyPressed) {
44 if (ev.key.code == sf::Keyboard::Enter)
46 }
47 }
48
49 {
50 std::unique_lock<std::mutex> lock(
_queueMtx);
52
56 image.setPixel(entry.x, entry.y, sf::Color(entry.color.r, entry.color.g, entry.color.b));
57 }
58 }
59
64 }
65}
References _done, _height, _pixelQueue, _queueCv, _queueMtx, _sprite, _texture, _width, and _window.
◆ _done
| bool Display::_done = false |
|
private |
◆ _height
◆ _pixelQueue
◆ _queueCv
| std::condition_variable Display::_queueCv |
|
private |
◆ _queueMtx
| std::mutex Display::_queueMtx |
|
private |
◆ _sprite
| sf::Sprite Display::_sprite |
|
private |
◆ _texture
| sf::Texture Display::_texture |
|
private |
◆ _width
◆ _window
| sf::RenderWindow Display::_window |
|
private |
The documentation for this class was generated from the following files: