Jump to content
  • Advertisement


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


Strange line in a texture

This topic is 6116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Has anyone had a strange line thats color varies with the image go from the top right corner of your texture to the bottom left corner and half way up the left and bottom sides from the left corner, but it will go away if you reboot your computer? It doesn''t seem to matter if the image is generated with glTexImage2D() or gluBuild2DMipmaps(). Thanks for you input!

Share this post

Link to post
Share on other sites
Are you using an ATI video card?
It sounds like a driver problem to me.
Update your drivers, if you have an ATI card you may have to live with it, some do stuff like that, you could try to get them to replace it.

Jason Mickela
ICQ : 873518
E-Mail: jmickela@sbcglobal.net
"Evil attacks from all sides
but the greatest evil attacks
from within." Me

Share this post

Link to post
Share on other sites
Also, if I have several memory intensive programs running (i.e. MS Word, IE, Gimp, etc.) at the same time, the line appears. If I exit all the programs and make sure all the memory was restored (by using the Resource Meter) the line still shows up. If I reboot my computer the texture is displayed properly. So that leads me to believe it has something to do with memory, perhaps virtual memory.

System Specs:
256 MB of SDRAM
733 MHZ Pentium III
45.0 GB hard drive
17" HP M70 monitor
16 MB TNT2 Vanta AGP
(I know my video card drivers are up to date since I updated them about a week ago)


Share this post

Link to post
Share on other sites
I would try using
put those right before you use the glBuildTexture type thing or the gluBuild2DMipmaps might help

Share this post

Link to post
Share on other sites
I have already done that... Here is the code

// Set up texture with OpenGL

glBindTexture(GL_TEXTURE_2D, idNum);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

if((tgaImageWidth == 2 || tgaImageWidth == 4 || tgaImageWidth == 16 || tgaImageWidth == 32 || tgaImageWidth == 64 || tgaImageWidth == 128 || tgaImageWidth == 256 || tgaImageWidth == 512 || tgaImageWidth == 1024) && tgaImageWidth == tgaImageHeight)
glTexImage2D(GL_TEXTURE_2D, 0, textureFormat, tgaImageWidth, tgaImageHeight, 0, textureFormat, GL_UNSIGNED_BYTE, tgaImageData);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, tgaImageWidth, tgaImageHeight, textureFormat, GL_UNSIGNED_BYTE, tgaImageData);

Also is there a better way to check if a image''s length and width are the same and a power of 2? Or, is it more efficient just to call gluBuild2DMipmaps? It is an image loading class where I want it to be rather general (but only use RGB or RGB RLE for the TGA data type); that''s why I use that power of 2 if statement.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!