Archived

This topic is now archived and is closed to further replies.

aker_jus

Texture mapped fonts....

Recommended Posts

aker_jus    122
Hello, I am using DevIL to load my images and manually generate the texture, not GLaux lib. So, the problem is that I am adding texture mapped fonts in my class, based on the 17 lesson. The text seems flipped horizontally and vertical!! Also, only BMP images work, no JPG or PCX (supported also by devIL) Any ideas?

Share this post


Link to post
Share on other sites
cANaBiTz    122
are you using the jpg.lib? because encoding of jpeg starts at the end of the file and stops at the beginning. So the first encoded row you will get is the last data row of the actual image. so you have to swap your data array( simply switch pointers to reversed order and it should be ok ). about pcx i do not know. just know the problem of the jpg format. gametutorials does this wrong, too and has jpgs with the wrong side up (f.e. look at their QBSP tutorials).

Share this post


Link to post
Share on other sites
aker_jus    122
Nevermind, I just fixed it. But it is weird cause I just swapped the glVertex2f coordinates. In the tutorial it was the other way round and it just swapped it and it worked. it was mirrored. Anyway, weird problem, but so far only BMP fonts work. TGA arent tested yet. Cya

Share this post


Link to post
Share on other sites