Abstract type for implementation specific management. More...
#include <gui_gl_manager.hpp>
Public Member Functions | |
manager (bool bInitGLEW=true) | |
Constructor. | |
~manager () | |
Destructor. | |
void | begin (utils::refptr< gui::render_target > pTarget=nullptr) const |
Begins rendering on a particular render target. | |
void | end () const |
Ends rendering. | |
virtual void | render_quad (const quad &mQuad) const |
Renders a quad. | |
virtual void | render_quads (const quad &mQuad, const std::vector< std::array< vertex, 4 >> &lQuadList) const |
Renders a set of quads. | |
utils::refptr< gui::material > | create_material (const std::string &sFileName) const |
Creates a new material from a texture file. | |
utils::refptr< gui::material > | create_material (const color &mColor) const |
Creates a new material from a plain color. | |
utils::refptr< gui::material > | create_material (utils::refptr< gui::render_target > pRenderTarget) const |
Creates a new material from a render target. | |
utils::refptr< gui::render_target > | create_render_target (uint uiWidth, uint uiHeight) const |
Creates a new render target. | |
utils::refptr< gui::font > | create_font (const std::string &sFontFile, uint uiSize) const |
Creates a new font. | |
Static Public Member Functions | |
static bool | is_gl_extension_supported (const std::string &sExtension) |
Checks if a given OpenGL extension is supported by the machine. |
Abstract type for implementation specific management.
Definition at line 14 of file gui_gl_manager.hpp.
gui::gl::manager::manager | ( | bool | bInitGLEW = true |
) |
Constructor.
Definition at line 16 of file gui_gl_manager.cpp.
gui::gl::manager::~manager | ( | ) |
Destructor.
Definition at line 26 of file gui_gl_manager.cpp.
void gui::gl::manager::begin | ( | utils::refptr< gui::render_target > | pTarget = nullptr |
) | const |
Begins rendering on a particular render target.
pTarget | The render target (main screen if nullptr) |
Definition at line 30 of file gui_gl_manager.cpp.
utils::refptr< gui::font > gui::gl::manager::create_font | ( | const std::string & | sFontFile, | |
uint | uiSize | |||
) | const [virtual] |
Creates a new font.
sFontFile | The file from which to read the font | |
uiSize | The requested size of the characters (in points) |
Implements gui::manager_impl.
Definition at line 206 of file gui_gl_manager.cpp.
utils::refptr< gui::material > gui::gl::manager::create_material | ( | utils::refptr< gui::render_target > | pRenderTarget | ) | const |
Creates a new material from a render target.
pRenderTarget | The render target from which to read the pixels |
Definition at line 196 of file gui_gl_manager.cpp.
utils::refptr< gui::material > gui::gl::manager::create_material | ( | const color & | mColor | ) | const [virtual] |
Creates a new material from a plain color.
mColor | The color to use |
Implements gui::manager_impl.
Definition at line 191 of file gui_gl_manager.cpp.
utils::refptr< gui::material > gui::gl::manager::create_material | ( | const std::string & | sFileName | ) | const [virtual] |
Creates a new material from a texture file.
sFileName | The name of the file |
Implements gui::manager_impl.
Definition at line 170 of file gui_gl_manager.cpp.
utils::refptr< gui::render_target > gui::gl::manager::create_render_target | ( | uint | uiWidth, | |
uint | uiHeight | |||
) | const [virtual] |
Creates a new render target.
uiWidth | The width of the render target | |
uiHeight | The height of the render target |
Implements gui::manager_impl.
Definition at line 201 of file gui_gl_manager.cpp.
void gui::gl::manager::end | ( | ) | const [virtual] |
bool gui::gl::manager::is_gl_extension_supported | ( | const std::string & | sExtension | ) | [static] |
Checks if a given OpenGL extension is supported by the machine.
Definition at line 223 of file gui_gl_manager.cpp.
void gui::gl::manager::render_quad | ( | const quad & | mQuad | ) | const [virtual] |
Renders a quad.
mQuad | The quad to render on the current render target |
Implements gui::manager_impl.
Definition at line 82 of file gui_gl_manager.cpp.
void gui::gl::manager::render_quads | ( | const quad & | mQuad, | |
const std::vector< std::array< vertex, 4 >> & | lQuadList | |||
) | const [virtual] |
Renders a set of quads.
mQuad | The base quad to use for rendering (material, blending, ...) | |
lQuadList | The list of the quads you want to render |
Implements gui::manager_impl.
Definition at line 121 of file gui_gl_manager.cpp.