The display manager class.
More...
#include <display_manager_sdl.h>
|
static std::string | text_ = "unset" |
| The text to display.
|
|
|
bool | initaliased_ = false |
| Initalized flag.
|
|
SDL_Window * | window_ = nullptr |
| The SDL window.
|
|
SDL_Surface * | surface_ = nullptr |
| The SDL surface.
|
|
SDL_Renderer * | renderer_ = nullptr |
| The SDL renderer.
|
|
SDL_Rect | texr_ = {0, 0, 0, 0} |
| The SDL texture rect.
|
|
|
Resolution | last_requested_resolution_ = {0, 0, 0} |
| Last requested resolution.
|
|
std::vector< uint8_t > | scaled_frame_buffer_ |
| Scaled frame buffer for resolutions that do not match the display.
|
|
std::string | name_ |
| The name of the display, can be used in the window title if windowing is supported.
|
|
The display manager class.
◆ DisplayBuffer()
Status mediax::sdl::DisplayManager::DisplayBuffer |
( |
uint8_t * |
frame_buffer, |
|
|
Resolution |
resolution, |
|
|
std::string |
text |
|
) |
| |
|
overridevirtual |
Buffer must be in the format RGBA.
- Parameters
-
frame_buffer | the frame buffer to display |
resolution | the resolution of the frame buffer |
text | The text to display |
- Returns
- Status
Implements mediax::DisplayManagerBase.
◆ Flush()
void mediax::sdl::DisplayManager::Flush |
( |
| ) |
|
|
overridevirtual |
◆ GetBytesPerPixel()
int mediax::sdl::DisplayManager::GetBytesPerPixel |
( |
| ) |
|
|
inlinefinalvirtual |
Get the Bits Per Pixel object.
- Returns
- int Always return for for RGB as we use Cairo which pads the upper 8 bits (unused)
Implements mediax::DisplayManagerBase.
◆ GetColourspace()
◆ GetResolution()
Resolution mediax::sdl::DisplayManager::GetResolution |
( |
| ) |
|
|
overridevirtual |
◆ Initalise() [1/2]
Status mediax::sdl::DisplayManager::Initalise |
( |
| ) |
|
|
overridevirtual |
◆ Initalise() [2/2]
Status mediax::sdl::DisplayManager::Initalise |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
bool |
fullscreen |
|
) |
| |
Initalise the display manager.
- Parameters
-
width | The width of the display |
height | The height of the display |
fullscreen | The flag to set fullscreen |
- Returns
- Status
-
StatusDisplayManager
◆ operator=()
◆ Run()
void mediax::sdl::DisplayManager::Run |
( |
| ) |
|
|
overridevirtual |
◆ Stop()
void mediax::sdl::DisplayManager::Stop |
( |
| ) |
|
|
overridevirtual |
◆ ToggleFullscreen()
void mediax::sdl::DisplayManager::ToggleFullscreen |
( |
| ) |
|
|
overridevirtual |
◆ draw_buffer_
std::vector< uint8_t > mediax::sdl::DisplayManager::draw_buffer_ |
|
staticprivate |
The draw buffer.
Draw buffer.
◆ frame_buffer_
std::vector< uint8_t > mediax::sdl::DisplayManager::frame_buffer_ |
|
staticprivate |
Frame buffer device.
Static frame buffer.
◆ frame_buffer_mutex_
std::mutex mediax::sdl::DisplayManager::frame_buffer_mutex_ |
|
staticprivate |
The mutex for the frame buffer.
Mutex.
◆ fullscreen_
int mediax::sdl::DisplayManager::fullscreen_ = 0 |
|
staticprivate |
The fullscreen flag.
Fullscreen flag.
◆ height_
The default height.
Initalise height (default)
◆ running_
bool mediax::sdl::DisplayManager::running_ = true |
|
staticprivate |
The SDL event loop.
Running flag.
◆ width_
The default width.
Initalise width (default)
The documentation for this class was generated from the following files: