View Full Version : Writing to the screen
04-03-2004, 04:23 AM
I need to write to my window. I use glutBitmapCharacter and i can use an array of characters but then i need to write numbers to the screen that are stored as an int variable. Can anyone help me with this, if you can make any sense of what ive jsut written.
04-03-2004, 10:38 AM
You can sprintf the int into a string, then print it...
04-04-2004, 01:31 PM
Nothing like a code example...
int value = 16;
sprintf( outputTxt, "I have %d textures in my map.", value );
The outputTxt character string says:
I have 16 textures in my map.
sprintf( outputTxt, "%d", value );
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.