triangles with borders

Started by
13 comments, last by deffer 18 years, 10 months ago
Hi. I got my program developed for a while. Lately I got it run on my friend's computer, and it behaved a bit differently than on mine. Specifically, all triangles have black edges. I suppose it is related to default opengl settings difference in another vendor's drivers. Am I right? Is this a normal gl option. How to turn it off? /def
Advertisement
use GL_CLAMP_TO_EDGE instead of GL_CLAMP
Nope, it didn't work.
But it's definitely something with textures, as the problem doesn't show in simple colored-vertices drawing.

Unless there's something else I should combine this with...
?
Could you show us a screenshot of this, perhaps? Also some code pertaining to your texture setup might also help lead toward the culprit of this bug. :)
The deal is: I'm not setting any texture-related options at all. Only binding buffers, enabling texture stages, and the family calls like:
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB );
glTexEnvi( GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE );

I will post a screenshot tomorrow, since the problem does not apear on my own machine.

@zedzeek:
What does the GL_CLAMP_TO_EDGE mean exactly? I couldn't find it in sgi's documentation.
Quote:What does the GL_CLAMP_TO_EDGE mean exactly?

goto www.opengl.org and download the opengl2.0 spec
background info
i assume its the borders but cant see without a screenshot
*nvidia drivers used to implement GL_CLAMP wrongly they used the GL_CLAMP_TO_EDGE method instead, they fixing the problem (3-5 years ago)
anyways which led to problems of black borders suddenly appearing(default border color is black) on apps that had (wrongly) used GL_CLAMP happily until then
*a lot of oldish cards eg gf2 dont support texture borders
Quote:Original post by zedzeek
goto www.opengl.org and download the opengl2.0 spec


Ok. I read that.
And it seems to me that it is not the source of the problem. Because the black border appears around all textured triangles. Even those with tex-coords not even near the clamping 0 and 1 values (eg. around 0.5).
And also, I need wrapping. I just use it (altough I could not to, it's not too much work to wrap by hand while initializing data).

I'll post a screenshot today.
/def
As I promised here's the shot.

Help.
/def
try using GL_NEAREST instead of GL_LINEAR in your call to glTexParameter*();

note: i might have this backwards, e.g. use linear instead of nearest. Just try it ;)
I am facing just the same problem as deffer. I am capturing screen pixels and storing them in a texture using glCopyTexImage2D.

The switch to GL_NEAREST got me rid of the black border but blocky pixelation is now more than obvious. I tried solving this new problem with mipmaps but failed. Do you have any suggestions?

This topic is closed to new replies.

Advertisement