Functions for drawing text in OpenGL ES.
GLint get_and_check_attrib_location(GLuint program, const GLchar *attrib_name)
Invoke glGetAttribLocation(), if it has returned a positive value. Otherwise, print a message and exi...
static const int textureCharacterHeight
The height (in pixels) of the characters in the text texture.
float * textTextureCoordinates
void clear(void)
Removes the current string from the class.
void draw(void)
Draw the text to the screen.
GLint get_and_check_uniform_location(GLuint program, const GLchar *uniform_name)
Invoke glGetUniformLocation, if it has returned a positive value. Otherwise, print a message and exit...
~Text(void)
Overloaded default destructor.
static const char fragmentShaderFilename[]
static const int textureCharacterWidth
The width (in pixels) of the characters in the text texture.
static const char textureFilename[]
Text(void)
Overloaded default constructor.
static const float scale
Scaling factor to use when rendering the text.
static const char vertexShaderFilename[]
void addString(int xPosition, int yPosition, const char *string, int red, int green, int blue, int alpha)
Add a std::string to be drawn to the screen.