TGUI  1.0-alpha
tgui::BackendRendererSDL Class Reference

Backend renderer that uses SDL_Renderer. More...

#include <TGUI/Backend/Renderer/SDL_Renderer/BackendRendererSDL.hpp>

Inheritance diagram for tgui::BackendRendererSDL:
tgui::BackendRenderer

Public Member Functions

 BackendRendererSDL (SDL_Renderer *renderer)
 Initializes the backend renderer. More...
 
std::shared_ptr< BackendTexturecreateTexture () override
 Creates a new empty texture object. More...
 
unsigned int getMaximumTextureSize () override
 Get the maximum allowed texture size. More...
 
SDL_Renderer * getInternalRenderer () const
 Returns a pointer to the SDL_Renderer object that was used to create this backend renderer. More...
 
- Public Member Functions inherited from tgui::BackendRenderer
virtual ~BackendRenderer ()=default
 Virtual destructor.
 
virtual std::shared_ptr< BackendTextcreateText ()
 Creates a new empty text object. More...
 
virtual std::shared_ptr< BackendTexturecreateTexture ()=0
 Creates a new empty texture object. More...
 
virtual unsigned int getMaximumTextureSize ()=0
 Get the maximum allowed texture size. More...
 

Detailed Description

Backend renderer that uses SDL_Renderer.

Constructor & Destructor Documentation

◆ BackendRendererSDL()

tgui::BackendRendererSDL::BackendRendererSDL ( SDL_Renderer *  renderer)

Initializes the backend renderer.

Parameters
rendererSDL_Renderer object that should be used for rendering

Member Function Documentation

◆ createTexture()

std::shared_ptr< BackendTexture > tgui::BackendRendererSDL::createTexture ( )
overridevirtual

Creates a new empty texture object.

Returns
Shared pointer to a new texture object

Implements tgui::BackendRenderer.

◆ getInternalRenderer()

SDL_Renderer * tgui::BackendRendererSDL::getInternalRenderer ( ) const

Returns a pointer to the SDL_Renderer object that was used to create this backend renderer.

Returns
SDL_Renderer pointer that was passed to the constructor of this object

◆ getMaximumTextureSize()

unsigned int tgui::BackendRendererSDL::getMaximumTextureSize ( )
overridevirtual

Get the maximum allowed texture size.

Returns
Maximum width and height that you should try to use in a single texture

This maximum size is defined by the graphics driver. Most likely this will return 8192 or 16384.

Implements tgui::BackendRenderer.


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