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 <modules/userinterfacegl/glui/renderer.h>

Public Member Functions

Texture2DArray * 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.
 
const vec4 & getBorderColor () const
 
int getDefaultFontSize () const
 
const vec4 & getDisabledColor () const
 
const vec4 & getHoverColor () const
 
MeshDrawerGL * getMeshDrawer () const
 
const vec4 & getSecondaryUIColor () const
 
Shader & getShader ()
 
const Shader & getShader () const
 
const vec4 & getTextColor () const
 
TextRenderer & getTextRenderer (bool bold=false)
 
const TextRenderer & getTextRenderer (bool bold=false) const
 
TextureQuadRenderer & getTextureQuadRenderer ()
 
const TextureQuadRenderer & getTextureQuadRenderer () const
 
const vec4 & getUIColor () const
 
Texture2DArray * getUITextures (const std::string &name) const
 
void setBorderColor (const vec4 &color)
 
void setDisabledColor (const vec4 &color)
 
void setHoverColor (const vec4 &color)
 
void setSecondaryUIColor (const vec4 &color)
 
void setTextColor (const vec4 &color)
 
void setUIColor (const vec4 &color)
 

Protected Member Functions

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

Protected Attributes

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

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: