Skip to main content
gamedev.net
🔒 Locked

32-bit texture problem?

Started by charlieC Jan 21, 2003 at 7:54 AM 1 replies 850+ views
Original Post
charlieC
charlieC
I've been trying to debug my font class for the last 3 hours but I cannot figure out what's wrong. I create a font using a 32-bit texture and then store it in a display list. Everything seems to be working fine until I try to print some text. Instead of showing text, it shows white boxes where it should be characters. Really weird. glGetError() shows no errors! I generate the texture with glTexImage2D() and since it's a 32-bit texture I use GL_RGBA. The width and height of the TGA file I'm loading is a power of 2. (256x256) But here's the weirdest thing, if I replace glTexImage2D() with gluBuild2DMipmaps() it suddenly works but with mipmapped textures(which look awful). But if I draw just the loaded TGA to the screen using glDrawPixels() it displays the TGA file perfectly. There's something fishy about glTexImage2D(), that's for sure. What do you think? Thanks in advance, charlieC [edited by - charlieC on January 21, 2003 9:36:36 AM]
charlieC
charlieC
Using only
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
as the only texture parameter seems to solve it..
MazyNoc
MazyNoc
gl_linear will work to, but not gl_linear_mipmap_linear, becourse then you need mipmaps

Topic Locked

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

Sign in to reply to this topic.