Jump to content

  • Log In with Google      Sign In   
  • Create Account

Strange line in a texture


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Viscous-Flow   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 2001 - 11:01 AM

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!

Sponsor:

#2 griffenjam   Members   -  Reputation: 193

Like
Likes
Like

Posted 23 October 2001 - 11:12 AM

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
------------------------------


#3 Viscous-Flow   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 2001 - 11:17 AM

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)

Thanks!

#4 Derilect101   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 2001 - 01:45 PM

I would try using
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
put those right before you use the glBuildTexture type thing or the gluBuild2DMipmaps might help


#5 Viscous-Flow   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 2001 - 05:35 PM

I have already done that... Here is the code

  
// Set up texture with OpenGL

glBindTexture(GL_TEXTURE_2D, idNum);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

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);
else
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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS