TGUI  0.9-dev
tgui::BackendRendererOpenGL3 Class Reference

Backend renderer that uses OpenGL 3 or 4 (depending on the loaded OpenGL context that you have to provide) More...

#include </home/texus/Documents/TGUI-0.9/include/TGUI/Backend/Renderer/OpenGL3/BackendRendererOpenGL3.hpp>

Inheritance diagram for tgui::BackendRendererOpenGL3:
tgui::BackendRenderer

Public Member Functions

 BackendRendererOpenGL3 (ContextLoadFuncType contextLoadFunction)
 Initializes the backend renderer. This will initialize GLAD to use (modern) OpenGL. More...
 
 BackendRendererOpenGL3 (SDLContextLoadFuncType contextLoadFunction)
 Helper constructor so that you can pass SDL_GL_GetProcAddress without needing to cast the type. More...
 
std::shared_ptr< BackendTexturecreateTexture () override
 Creates a new empty texture object. More...
 
unsigned int getMaximumTextureSize () override
 Get the maximum allowed texture size. 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...
 

Detailed Description

Backend renderer that uses OpenGL 3 or 4 (depending on the loaded OpenGL context that you have to provide)

Constructor & Destructor Documentation

◆ BackendRendererOpenGL3() [1/2]

tgui::BackendRendererOpenGL3::BackendRendererOpenGL3 ( ContextLoadFuncType  contextLoadFunction)

Initializes the backend renderer. This will initialize GLAD to use (modern) OpenGL.

Parameters
contextLoadFunctionFunction that gets the address of an OpenGL function

Examples of load functions are sf::Context::getFunction, SDL_GL_GetProcAddress and glfwGetProcAddress.

Example usage:

backend->setRenderer(std::make_shared<BackendRendererOpenGL3>(glfwGetProcAddress));

◆ BackendRendererOpenGL3() [2/2]

tgui::BackendRendererOpenGL3::BackendRendererOpenGL3 ( SDLContextLoadFuncType  contextLoadFunction)

Helper constructor so that you can pass SDL_GL_GetProcAddress without needing to cast the type.

See also
BackendRendererOpenGL3(ContextLoadFuncType)
Parameters
contextLoadFunctionFunction that gets the address of an OpenGL function

Member Function Documentation

◆ createTexture()

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

Creates a new empty texture object.

Returns
Shared pointer to a new texture object

Implements tgui::BackendRenderer.

◆ getMaximumTextureSize()

unsigned int tgui::BackendRendererOpenGL3::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.

Reimplemented from tgui::BackendRenderer.


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