
TGA textures with Alpha...not showing up
Well, its me again with another problem
I converted my code from using the bmp textures to the tga method used in lesson 33. I had one texture show up, but the text wouldnt show up, i could map the font texture to a square and it would show up, but not if i tried to print it. I left for work and when i cam ehome, none of the textures show up!!! Lol, what happened? I made sure i had just about everything i needed from lesson 33 in my code, everything dealing with the buildfont, glprint loadtga functions and also the initialization code too. Any ideas? Once again, i had a square mapped with one texture, but now that wont show up, i know the textures are good cause they would load and i could map them, but the print function wouldnt work...?

With the alpha-blended fonts, draw them _after_ every non-transparent object.
You do have lighting disabled & texturing & blending enabled right?
hopefully you''re specifying the right texture co-ords for each font letter in the image.
hopefully you''re specifying the right texture co-ords for each font letter in the image.
Using same code as in lesson 33. I have lightning disabled, blending is on, texturing is on, here is the code from my initialize func
LoadTextures...blah blah blah
glClearColor(0.0f, 0.0f, 0.0f, 0.5f); glClearDepth(1.0f);
glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND);
// glAlphaFunc(GL_GREATER,0.1f);
// glEnable(GL_ALPHA_TEST);
glEnable(GL_TEXTURE_2D); glEnable(GL_CULL_FACE);
glDisable(GL_LIGHTING);
Just like in lesson 33 and the glBuiltfont, loadTGA and glPrint are the same code as in lesson 33, except i changed the variable name. I cant get anything to show up what so ever! Really getting frustrated
LoadTextures...blah blah blah
glClearColor(0.0f, 0.0f, 0.0f, 0.5f); glClearDepth(1.0f);
glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND);
// glAlphaFunc(GL_GREATER,0.1f);
// glEnable(GL_ALPHA_TEST);
glEnable(GL_TEXTURE_2D); glEnable(GL_CULL_FACE);
glDisable(GL_LIGHTING);
Just like in lesson 33 and the glBuiltfont, loadTGA and glPrint are the same code as in lesson 33, except i changed the variable name. I cant get anything to show up what so ever! Really getting frustrated

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement