Tucano  0.1
A library for rapid prototyping with modern OpenGL and GLSL
Tucano::GUI Namespace Reference

Classes

class  Base
 Base class for GUI, contains all elements and handles viewport and rendering transformations. More...
 
class  Button
 The button class draws a clickable rectangle on the screen to be used as a callback interface. More...
 
class  Element
 Base class for all GUI elements (buttons, sliders ...) More...
 
class  GroupBox
 The gui group box is just a placeholder for other gui elements. It can be used to group elements, so they can be moved or hidden together for example Visually it is also a protected clickable area, to avoid mis-clicking the elements. More...
 
class  Label
 A simple label to hold text or similar it has no callbacks, it is just a placeholder for rendering a texture. More...
 
class  SelectButton
 The button class draws a clickable rectangle on the screen to be used as a callback interface The select button toggles between pressed and not pressed when clicked. More...
 
class  SelectGroup
 The gui select group is a placeholder for many selection buttons, so only one can be active at a time Note, to visually group the buttons, you can use a groupbox and insert the selectgroup into the groupbox. More...
 
class  Slider
 The slide class draws a dragable cursor over a bar. More...
 

Enumerations

enum  ElementType : signed int {
  NONE, BUTTON, SELECTBUTTON, SLIDER,
  LABEL, GROUPBOX, SELECTGROUP
}
 

Variables

const string gui_fragment_code
 Default fragment shader for rendering gui elments. More...
 
const string gui_vertex_code
 Default vertex shader for rendering gui elements. More...
 

Enumeration Type Documentation

enum Tucano::GUI::ElementType : signed int
Enumerator
NONE 
BUTTON 
SELECTBUTTON 
SLIDER 
LABEL 
GROUPBOX 
SELECTGROUP 

Variable Documentation

const string Tucano::GUI::gui_fragment_code
Initial value:
= "\n"
"#version 430\n"
"in vec4 color;\n"
"in vec4 texcoords;\n"
"out vec4 out_Color;\n"
"uniform sampler2D shapetex;\n"
"void main(void)\n"
"{\n"
" vec4 tex = texture(shapetex, texcoords.xy).xyzw;\n"
" if (tex.w == 0.0)\n"
" discard;\n"
" out_Color = tex*color;\n"
"}\n"

Default fragment shader for rendering gui elments.

const string Tucano::GUI::gui_vertex_code
Initial value:
= "\n"
"#version 430\n"
"in vec4 in_Position;\n"
"in vec4 in_TexCoords;\n"
"out vec4 color;\n"
"out vec4 texcoords;\n"
"uniform mat4 modelMatrix;\n"
"uniform mat4 viewMatrix;\n"
"uniform mat4 projectionMatrix;\n"
"uniform vec4 in_Color;\n"
"void main(void)\n"
"{\n"
" vec4 v = projectionMatrix * viewMatrix * modelMatrix * in_Position;\n"
" gl_Position = v;\n"
" texcoords = in_TexCoords;\n"
" texcoords.y = 1.0 - texcoords.y;\n"
" color = in_Color;\n"
"}\n"

Default vertex shader for rendering gui elements.