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

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.
const vec4 & getBorderColor () const
int getDefaultFontSize () const
const vec4 & getDisabledColor () const
const vec4 & getHoverColor () const
MeshDrawerGLgetMeshDrawer () const
const vec4 & getSecondaryUIColor () const
ShadergetShader ()
const ShadergetShader () const
const vec4 & getTextColor () const
TextRenderergetTextRenderer (bool bold=false)
const TextRenderergetTextRenderer (bool bold=false) const
TextureQuadRenderergetTextureQuadRenderer ()
const TextureQuadRenderergetTextureQuadRenderer () const
const vec4 & getUIColor () const
Texture2DArraygetUITextures (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< Texture2DArraycreateUITextureObject (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< MeshDrawerGLmeshDrawer_
TextureQuadRenderer quadRenderer_
std::shared_ptr< MeshrectangleMesh_
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:
  • modules/userinterfacegl/include/modules/userinterfacegl/glui/renderer.h