|
TinyGPU
|
Display class for rendering a Surface<RGB565> using the SDL2 library. This class can be used to display the contents of a TinyGPU Surface<RGB565> on a desktop environment for testing and debugging purposes. More...
#include <DisplayDriverSDL.h>


Public Member Functions | |
| DisplayDriverSDL (size_t width, size_t height) | |
| DisplayDriverSDL (const ISurface< RGB_T > &surface) | |
| size_t | width () const override |
| size_t | height () const override |
| bool | begin () override |
| bool | writeData (ISurface< RGB_T > &surface) override |
| bool | writeData (ISurface< RGB_T > &surface, size_t x, size_t y) override |
| void | end () override |
Public Member Functions inherited from DisplayDriver< RGB_T > | |
| virtual | ~DisplayDriver ()=default |
| virtual bool | begin ()=0 |
| virtual void | end () |
| virtual bool | writeData (ISurface< RGB_T > &surface)=0 |
| virtual bool | writeData (ISurface< RGB_T > &surface, size_t x, size_t y)=0 |
| virtual void | setRotation (DisplayRotation rotation) |
| virtual size_t | width () const =0 |
| virtual size_t | height () const =0 |
| void | writeColor (size_t width, size_t height, RGB_T color) |
Protected Member Functions | |
| bool | setAddressWindow (size_t x, size_t y, size_t w, size_t h) override |
| virtual bool | setAddressWindow (size_t x, size_t y, size_t w, size_t h)=0 |
Protected Attributes | |
| size_t | w_ = 0 |
| size_t | h_ = 0 |
| SDL_Window * | window_ = nullptr |
| SDL_Renderer * | renderer_ = nullptr |
| SDL_Texture * | texture_ = nullptr |
| std::vector< uint8_t > | scratch_ |
Protected Attributes inherited from DisplayDriver< RGB_T > | |
| Font5x7< RGB_T > | defaultFont |
Display class for rendering a Surface<RGB565> using the SDL2 library. This class can be used to display the contents of a TinyGPU Surface<RGB565> on a desktop environment for testing and debugging purposes.
writeData() drains the SDL event queue on every call and exits the process on SDL_QUIT (i.e. the window's close button), since sketches that never touch a TouchDriverSDL - the only other place that pumps events - would otherwise leave the window unresponsive to being closed: with no one calling SDL_PollEvent, the window manager's close request just piles up in SDL's queue and the OS reports the window as hung.
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements DisplayDriver< RGB_T >.
|
inlineoverridevirtual |
Reimplemented from DisplayDriver< RGB_T >.
|
inlineoverridevirtual |
Implements DisplayDriver< RGB_T >.
|
inlineoverrideprotectedvirtual |
Implements DisplayDriver< RGB_T >.
|
inlineoverridevirtual |
Current addressable panel width/height in pixels - for a driver that supports setRotation(), these reflect the current rotation (landscape vs portrait swaps them; see isLandscapeFamily()), not necessarily the panel's native/physical orientation. Callers that need to lay out content (e.g. OutputTinyGPU's scale_to_fit target, or clearScreen()'s band loop) should read these fresh rather than caching their own copy, so a setRotation() call is picked up automatically without needing separate bookkeeping.
Implements DisplayDriver< RGB_T >.
|
inlineoverridevirtual |
Implements DisplayDriver< RGB_T >.
|
inlineoverridevirtual |
Implements DisplayDriver< RGB_T >.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |