ortho2d poly intersection artifacts

Sorry if this is a beginner question but I’ll have you know I already banged my head against the GL spec reference and googled for weeks on this problem.

I have an ortho2d projection matrix with the parameters as so:
gluOrtho2D(0.0f,2.0f,-1.0f,1.0f);

I’m drawing/scrolling two large quads together and there are visible artifacts. They are more visible on lower end machines (On my GF3 you can barely notice it)

I have everything disabled (stencil test, depth test, blending, lighting) because it is 2d… and I am only using immediate mode calls for now. Everything looks good except for the line where the two polys meet.
Suggestions?
(BTW I’m using 43.03 drivers but it has shown up with a few different systems and drivers anyway)

[This message has been edited by deadalive (edited 04-14-2003).]

Hi,

You have depth test disabled and still you see artifacts at the intersection line? Weird. Could you maybe post a screenshot demonstrating the problem?

-Ilkka

Hmm, well a screenshot wouldn’t do much for you, it isn’t visible unless it’s moving around.

I don’t know if it’s “artifacts” per-se, it only happens when it scrolls, and it seems to be less noticable when scrolling at different rates.

Maybe it’s a sloppy time-based movement function…?

When I changed these from GL_REPEAT to GL_CLAMP it seemed to help a little, but not enough:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); // GL_CLAMP);

Could it be some kind of stencil buffer problem? I have that disabled, and the alpha test too.

[This message has been edited by deadalive (edited 04-15-2003).]

Ok, I think the problem is that the texture edges don’t line up correctly. Make sure that your textures have the exactly same colors on the edges that are supposed to be together. In addition to this, use GL_CLAMP_TO_EDGE and disable mipmapping. That should be enough to ensure a clean edge.

-Ilkka

Hey thanks! I didn’t even think of that, I haven’t tried it but it sounds like it should do the trick. I’ll try it when I get home.

It worked like a charm! THANK YOU!!
You don’t even know how much that helped me!

[This message has been edited by deadalive (edited 04-16-2003).]