Main Page | Alphabetical List | Class List | File List | Class Members

libTexture / libGlFont documentation

Work in progress ...

Download libTexture (zip)
Download libTexture (tar.gz)

Introduction

Supported formats

TGA, JPG, PNG.

Install (Linux)

Install (Windows)

Visual C++ project files are included.

Contents

Tutorial

Commented source code

Loading a texture in OpenGL

...

#include <gltex.h>

...

void main()
{
  GLuint texid;

  texid=gltex::gltexLoadTexture("my_picture.tga");

  ...
}

Displaying text

...

#include <glfont.h>

GLfont *g_Font;

...

void main()
{
  ...
  // load font
  g_Font=new GLfont("../font/default.tga");
  ...
}

void render()
{
  ...
  g_Font->printString(0.0,0.5,0.1,"Text at (0.0,0.5) of size 0.1");    
  ...
}

The text can also be translated and sized using MODELVIEW matrix.
The function printStringNeed retrieves the space needed on screen to display a text.


Generated on Tue Sep 21 17:28:12 2004 for libTexture by doxygen 1.3.5