PDA

View Full Version : Texture problem



Forgetful Coder
06-30-2004, 09:07 AM
I am having a problem with the quad tesselation showing on the texture I applied to a square. I am needing to enable blending and the texture looks good, but when blending is enabled, there is a line drawn from the top right to the bottom left of my quad. The line is the current color.

glDisable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
glEnable(GL_TEXTURE_2D);

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glDisable(GL_ALPHA_TEST);

glBindTexture(GL_TEXTURE_2D, tex);

// set color to white
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);

glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex3f(0.0f, 0.0f, 1.0f); // Bottom Left Of The Texture and Quad
glTexCoord2f(1.0f, 0.0f); glVertex3f(maxExt, 0.0f, 1.0f); // Bottom Right Of The Texture and Quad
glTexCoord2f(1.0f, 1.0f); glVertex3f(maxExt, maxExt, 1.0f); // Top Right Of The Texture and Quad
glTexCoord2f(0.0f, 1.0f); glVertex3f(0.0, maxExt, 1.0f); // Top Left Of The Texture and Quad
glEnd();

ZbuffeR
06-30-2004, 01:54 PM
Your gl implementation seems buggy. What card/drivers/system/os ?

Try the software rendering ,ie with mesa dll.

Forgetful Coder
07-01-2004, 04:57 AM
I'm using an NVIDIA GeForce 3 Ti500 on Windows 2000.

NVIDIA Driver version 5.2.1.6

I'll try updating my driver.

....

Got the latest driver from NVIDIA, but didn't work.

ZbuffeR
07-02-2004, 09:59 AM
Very strange. Is multisampling/antialiasing activated ?

Forgetful Coder
07-06-2004, 08:10 AM
That was it! I had enabled polygon smoothing, so a simple call to glDisable(GL_POLYGON_SMOOTH) fixed the problem.

Thanks, ZbuffeR!