TinyGPU
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DisplayDriverSDL< RGB_T > Class Template Reference

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>

Inheritance diagram for DisplayDriverSDL< RGB_T >:
Inheritance graph
[legend]
Collaboration diagram for DisplayDriverSDL< RGB_T >:
Collaboration graph
[legend]

Public Member Functions

 DisplayDriverSDL (size_t width, size_t height)
 
 DisplayDriverSDL (const ISurface< RGB_T > &surface)
 
bool begin () override
 
bool writeData (ISurface< RGB_T > &surface) 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
 

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 x_ = 0
 
size_t y_ = 0
 
size_t w_ = 0
 
size_t h_ = 0
 
SDL_Window * window_ = nullptr
 
SDL_Renderer * renderer_ = nullptr
 
SDL_Texture * texture_ = nullptr
 

Detailed Description

template<typename RGB_T = RGB565>
class tinygpu::DisplayDriverSDL< RGB_T >

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.

Constructor & Destructor Documentation

◆ DisplayDriverSDL() [1/2]

DisplayDriverSDL ( size_t  width,
size_t  height 
)
inline

◆ DisplayDriverSDL() [2/2]

DisplayDriverSDL ( const ISurface< RGB_T > &  surface)
inline

Member Function Documentation

◆ begin()

bool begin ( )
inlineoverridevirtual

◆ end()

void end ( )
inlineoverridevirtual

Reimplemented from DisplayDriver< RGB_T >.

◆ setAddressWindow()

bool setAddressWindow ( size_t  x,
size_t  y,
size_t  w,
size_t  h 
)
inlineoverrideprotectedvirtual

◆ writeData()

bool writeData ( ISurface< RGB_T > &  surface)
inlineoverridevirtual

Member Data Documentation

◆ h_

size_t h_ = 0
protected

◆ renderer_

SDL_Renderer* renderer_ = nullptr
protected

◆ texture_

SDL_Texture* texture_ = nullptr
protected

◆ w_

size_t w_ = 0
protected

◆ window_

SDL_Window* window_ = nullptr
protected

◆ x_

size_t x_ = 0
protected

◆ y_

size_t y_ = 0
protected

The documentation for this class was generated from the following file: