PDA

View Full Version : Texture Artifacts



MutantJedi
09-18-2006, 10:02 AM
The version of OpenGL I've got is 1.5.2
OS is Windows XP Professional, Service Pack 2

I was getting the following 'artifacts' when I was using GL_REPEAT.
http://www.cetuscript.com/shared/texture3.png

When I changed to GL_CLAMP_TO_EDGE or GL_CLAMP, the artifact went away... unless the quad is moving.
http://www.cetuscript.com/shared/texture4.png

While the quad is moving, the line flickers - seems like a rounding issue?

How do I get rid of this line?

Mark

k_szczech
09-18-2006, 10:30 AM
I've never had such problems on any hardware. Make sure your texture data is correct.
What's the width of your texture? Perhaps it's an allignment problem.

MutantJedi
09-18-2006, 10:42 AM
Could be an alignment issue.

What I'm doing is making a texture (power of 2 dimension).
Then I'm allocating a block of data to draw into.

I'm using Gdiplus to draw into the data before copying the data to the texture with glTexSubImage2D.

What I want to try is using a texture of arbitrary size. Then I'll use the actual dimensions of the texture instead of floats... however I don't know where to find documentation on this feature -- other than buying the book from Amazon...

MutantJedi
09-18-2006, 10:58 AM
http://www.opengl.org/registry/specs/ARB/texture_rectangle.txt
This should be the ticket to using NPOTS, eh :)

MutantJedi
09-18-2006, 12:00 PM
That did the trick! using GL_TEXTURE_RECTANGLE_ARB removed the artifact!