-
Writing to the screen
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.
Cheers,
-
Junior Member
Regular Contributor
Re: Writing to the screen
You can sprintf the int into a string, then print it...
-
Re: Writing to the screen
Nothing like a code example...
int value = 16;
char outputTxt[100];
sprintf( outputTxt, "I have %d textures in my map.", value );
The outputTxt character string says:
I have 16 textures in my map.
or
sprintf( outputTxt, "%d", value );
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules