NGL  6.5
The NCCA Graphics Library
Text.h File Reference

Basic text rendering for OpenGL 3.x. More...

#include "Colour.h"
#include "Types.h"
#include "Vec2.h"
#include "VAOFactory.h"
#include "SimpleVAO.h"
#include <memory>
#include <QFont>
#include "Mat4.h"
+ Include dependency graph for Text.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ngl::FontChar
 a structure to hold the font char texture id and the vao. The vao for each font will be a different size need to investigate is a scale would be quicker / more efficient than storing multiple billboards (some will be the same size) More...
 
class  ngl::Text
 

Namespaces

 ngl
 implementation files for RibExport class
 

Detailed Description

Basic text rendering for OpenGL 3.x.

Author
Jonathan Macey
Version
1.0
Date
10/10/11 Initial version
Todo:
support unicode ASCII is so 1980's ;-0 This class will generate billboard textures and VertexArrayObjects for each of the font glyphs, this means we need a valid OpenGL context before using this class, therefore it should be constructed in initalizeGL or after. Note for efficiency once the font has been created we can only change the colour, if you need different sizes / emphasis you will need to create a new Text object with the desired size / emphasis. This is accelerated as much as possible but text rendering will sometimes be slow as we bind a new texture for each char being drawn for more details look at the blog post here http://jonmacey.blogspot.com/2011/10/text-rendering-using-opengl-32.html

Definition in file Text.h.