Inviwo  0.9.10.1
Inviwo documentation
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::string > &files, const std::string &sourcePath)
 create a UI texture object representing the normal, pressed, and checked state for both the UI widget and its halo. More...
 
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::string > &textureFiles, const std::string &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::string > &  files,
const std::string &  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
Returns
pointer to texture array
Exceptions
Exceptionif not successful.

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