killstealers / crashburn

This is the crashburn project, a simple 3D multiplayer video game, based on Crash Bash.
https://github.com/killstealers/crashburn
1 stars 0 forks source link

Display 2D text #5

Open NewbiZ opened 11 years ago

Taghazog commented 11 years ago

You can instantiate a 2D text item with Text2DItem Constructor and display it on the screen by simply calling its render() public member function. TODO: Pregenerate the bitmaps for the string to be displayed.

NewbiZ commented 11 years ago

Configuration:

Text2DItem text;
text.set_color(0.5, 1.0, 0.);
text.set_text("Hello world!");
text.set_position(50., 100.);

Rendering:

text.render();
NewbiZ commented 11 years ago

glColor() should be restored upon drawing the text.