i hope someone knows a possible solution to this cause its been baffling me all day
im mapping some textures to some polys and their colors have been changed somehow.
i have lighting disabled and materials disabled
so that shouldnt be affecting the color.
they are 32 bit textures.
when i built them i specified
GL_RGBA8 for the internal texture format and
GL_RGBA for the texture type
i believe this is correct and should not be affecting the outcome color of the texture.
one more thing they are targa images.
i hope thats enough info for someone to be able to share a possible solution with me,
[This message has been edited by Warrior (edited 03-27-2001).]
Perhaps you set a polygon color with glColor and use GL_MODULATE in glTexEnv. Either set the color to white, or replace GL_MODULATE with GL_REPLACE. GL_MODULATE multiplies the polygon color with the texture color.
I had the same problem and it was the glcolor function before glbegin call. Use glcolor3f 1,1,1 (white) to view the real texture color.
it would help if you would post the piece of code…
i am setting my polygon color to 1, 1, 1
ill try replacing GL_MODULATE with GL_REPLACE
heh im at school right now, so if the above doesnt work ill paste some code when i get home
i think my problem is a bit more advanced than what previous posts have mentioned. ive checked all the obvious stuff. it has to be something else.
could it have something todo with the pixel packing alignment? im currently specifying no type of alignemt using glPixelStorei?? i believe.
could this be the problem?
that opengl is getting the data in the wrong order?
[This message has been edited by Warrior (edited 03-28-2001).]
Perhaps your image is in BGRA format rather than RGBA.
thanks for your reply, but no, ive changed it to rgba
k guys i figured it out.
i had rewritten my targa loader over the weekend and i had forget to update the position of the file pointer so it was reading in the wrong data. hehe
quite often i find that most programming problems are problems just like these that are so easy to fix, but cause the most grief while trying to debug.