Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::glui::Renderer Class Reference

provides the basic rendering functionality required to render UI elements. Also provides a texture cache for different widgets. Each set of widget textures is represented by a 2D texture array consisting of six textures (widget state normal, pressed, checked plus corresponding halos). More...

#include <renderer.h>

Public Member Functions

Texture2DArraycreateUITextures (const std::string &name, const std::vector< std::filesystem::path > &files, const std::filesystem::path &sourcePath)
 create a UI texture object representing the normal, pressed, and checked state for both the UI widget and its halo.
 
ShadergetShader ()
 
const ShadergetShader () const
 
TextRenderergetTextRenderer (bool bold=false)
 
const TextRenderergetTextRenderer (bool bold=false) const
 
int getDefaultFontSize () const
 
TextureQuadRenderergetTextureQuadRenderer ()
 
const TextureQuadRenderergetTextureQuadRenderer () const
 
MeshDrawerGLgetMeshDrawer () const
 
Texture2DArraygetUITextures (const std::string &name) const
 
void setTextColor (const vec4 &color)
 
const vec4 & getTextColor () const
 
void setUIColor (const vec4 &color)
 
const vec4 & getUIColor () const
 
void setSecondaryUIColor (const vec4 &color)
 
const vec4 & getSecondaryUIColor () const
 
void setBorderColor (const vec4 &color)
 
const vec4 & getBorderColor () const
 
void setHoverColor (const vec4 &color)
 
const vec4 & getHoverColor () const
 
void setDisabledColor (const vec4 &color)
 
const vec4 & getDisabledColor () const
 

Protected Member Functions

void setupRectangleMesh ()
 
std::shared_ptr< Texture2DArraycreateUITextureObject (const std::vector< std::filesystem::path > &textureFiles, const std::filesystem::path &sourcePath) const
 

Protected Attributes

const int defaultFontSize_ = 13
 
Shader uiShader_
 
TextRenderer textRenderer_
 
TextRenderer textRendererBold_
 
TextureQuadRenderer quadRenderer_
 
std::shared_ptr< MeshDrawerGLmeshDrawer_
 
std::shared_ptr< MeshrectangleMesh_
 
std::map< std::string, std::shared_ptr< Texture2DArray > > uiTextureMap_
 
vec4 colorUI_
 
vec4 colorSecondaryUI_
 
vec4 colorBorder_
 
vec4 colorText_
 
vec4 colorHover_
 
vec4 colorDisabled_
 
double scaling_
 

Detailed Description

provides the basic rendering functionality required to render UI elements. Also provides a texture cache for different widgets. Each set of widget textures is represented by a 2D texture array consisting of six textures (widget state normal, pressed, checked plus corresponding halos).

See also
glui::Element

Member Function Documentation

◆ createUITextures()

Texture2DArray * inviwo::glui::Renderer::createUITextures ( const std::string & name,
const std::vector< std::filesystem::path > & files,
const std::filesystem::path & sourcePath )

create a UI texture object representing the normal, pressed, and checked state for both the UI widget and its halo.

Parameters
nameinternal name of the texture object
fileslist of file names representing the following states: texture: normal, pressed, checked halo: normal, pressed, checked
sourcePath
Returns
pointer to texture array
Exceptions
Exceptionif not successful.

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