texture problem
I''m using tga files for my textures. When i map it to a triangle is repeats a bit of the top on the bottom and it looks real bad. Anyone know what might cause it to do this. I don''t think it''s the texture coordinates.
Sounds like the values you''re passing for format and/or type don''t match what''s actually in the TGA.
I''m using format GL_RGBA and type GL_UNSIGNED_BYTE. I''m also using gluBuild2DMipmaps(). When i try to use glTexImage2D() now the texture just appears as white.
If your texture coordinates are from 0 to 1 and you''re using bilinear filtering, the bottom pixels of the texture will be visible at the top and vice versa (blended halfway). This will be more visible if it''s using a smaller mipmap so adjusting the texture coordinates won''t always help. Have you tried using CLAMP_TO_EDGE?
trilinear would be GL_LINEAR_MIPMAP_LINEAR .. But any filtering besides GL_NEAREST (which you don''t want) will have the same problem. It''s just how texture coordinates work.
Edge clamping requires OpenGL 1.2 or later and you use it by putting GL_CLAMP_TO_EDGE (0x812f) in the texture parameters instead of GL_REPEAT or GL_CLAMP.
Edge clamping requires OpenGL 1.2 or later and you use it by putting GL_CLAMP_TO_EDGE (0x812f) in the texture parameters instead of GL_REPEAT or GL_CLAMP.
for stuff beyond 1.1 i recomend getting a hold of benjamin bunny''s GLee lib as it makes using ''em painless and fun :D
also, there is an artical on Gamedev about going beyond 1.1''s features, its probably a good idea for you to take a shifty at that as well
also, there is an artical on Gamedev about going beyond 1.1''s features, its probably a good idea for you to take a shifty at that as well
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement