Skip to main content
gamedev.net
🔒 Locked

Tutorial 17- D'Agata

Started by freaky3 0 replies 900+ views
Original Post
freaky3
freaky3
Hi!! I'm trying to write on the screen like described in Tutorial 17 by D'Agata. Now what happens is that i have a black screen - ok background is black - and the positions of my example writings are correct. The Count of letters, too. but you can't see any letter, the little quads are yellow. Maybe my texture is wrong? i created one where only 32 letters are used. (two rows in the 256x256 texture) White background, red letters. i found no advice in the tutorial which color the texture should have. Have you any other idea what the problem could be? WOuld be very kind!!
lazork357
lazork357
Quote:

found no advice in the tutorial which color the texture should have.


true, but you cuold just look at the image included in the tutorial.
It has a black background, and that's why the tutorial uses glBlendFunc(GL_SRC_ALPHA,GL_ONE).
Besides, if you're using a texture whith only 32 characters (which I guess are large twice the one of the tutorial) you should change the coordinates of each one of them when you create your DisplayLists, according to the one in your texture.
One more think:
in the glPrint function, be sure to change the argument of
glListBase(base-32+(128*set))
to the right value.
(remember that the value of 'A' is 65, while the first character of your texture is 0; so if the first character in your texture is 'A', you have to call glListBase(base-65). (128*set) is useful only if you have two sets of chars in your image).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.