Developer documentation
Version 3.0.3-105-gd3941f44
MR::GUI::GL::Font Class Reference

#include "gui/opengl/font.h"

Public Member Functions

 Font (const QFont font)
 
void initGL (bool with_shadow=true)
 
void start (int width, int height, float red, float green, float blue) const
 
void stop () const
 
void render (const std::string &text, int x, int y) const
 

Public Attributes

const QFontMetrics metric
 

Protected Attributes

const QFont font
 
GL::Texture tex
 
GL::VertexBuffer vertex_buffer [2]
 
GL::VertexArrayObject vertex_array_object
 
GL::Shader::Program program
 
int font_width [256]
 
int font_height
 
float font_tex_pos [256]
 
float font_tex_width [256]
 

Detailed Description

Definition at line 29 of file font.h.

Constructor & Destructor Documentation

◆ Font()

MR::GUI::GL::Font::Font ( const QFont  font)
inline

Definition at line 31 of file font.h.

Member Function Documentation

◆ initGL()

void MR::GUI::GL::Font::initGL ( bool  with_shadow = true)

◆ render()

void MR::GUI::GL::Font::render ( const std::string &  text,
int  x,
int  y 
) const

◆ start()

void MR::GUI::GL::Font::start ( int  width,
int  height,
float  red,
float  green,
float  blue 
) const
inline

Definition at line 39 of file font.h.

◆ stop()

void MR::GUI::GL::Font::stop ( ) const
inline

Definition at line 54 of file font.h.

Member Data Documentation

◆ font

const QFont MR::GUI::GL::Font::font
protected

Definition at line 63 of file font.h.

◆ font_height

int MR::GUI::GL::Font::font_height
protected

Definition at line 68 of file font.h.

◆ font_tex_pos

float MR::GUI::GL::Font::font_tex_pos[256]
protected

Definition at line 69 of file font.h.

◆ font_tex_width

float MR::GUI::GL::Font::font_tex_width[256]
protected

Definition at line 69 of file font.h.

◆ font_width

int MR::GUI::GL::Font::font_width[256]
protected

Definition at line 68 of file font.h.

◆ metric

const QFontMetrics MR::GUI::GL::Font::metric

Definition at line 37 of file font.h.

◆ program

GL::Shader::Program MR::GUI::GL::Font::program
protected

Definition at line 67 of file font.h.

◆ tex

GL::Texture MR::GUI::GL::Font::tex
protected

Definition at line 64 of file font.h.

◆ vertex_array_object

GL::VertexArrayObject MR::GUI::GL::Font::vertex_array_object
protected

Definition at line 66 of file font.h.

◆ vertex_buffer

GL::VertexBuffer MR::GUI::GL::Font::vertex_buffer[2]
protected

Definition at line 65 of file font.h.


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