Skybox Problems

Hi!
I have texturing problems with my Skybox. At the edges of the planes, which form my cube, some display errors appear. But when I align my 4 sky textures together in paint-program (like PSP) the edges appear smooth without any problems:
Here is a screenshot of my problem:

and here is the code for my cube:

texSky[0].Specify();
glBegin(GL_QUADS);

  	glTexCoord2f(0.0f,0.0f);
  	glVertex3f(-0.5f,-0.5f,0.0f);

  	glTexCoord2f(1.0f,0.0f);
  	glVertex3f(0.5f,-0.5f,0.0f);

  	glTexCoord2f(1.0f,1.0f);
  	glVertex3f(0.5f,-0.5f,-1.0f);

  	glTexCoord2f(0.0f,1.0f);
  	glVertex3f(-0.5f,-0.5f,-1.0f);
  	
  glEnd();

texSky[1].Specify();
glBegin(GL_QUADS);

  	glTexCoord2f(0.0f,0.0f);
  	glVertex3f(0.5f,-0.5f,0.0f);

  	glTexCoord2f(1.0f,0.0f);
  	glVertex3f(0.5f,0.5f,0.0f);

  	glTexCoord2f(1.0f,1.0f);
  	glVertex3f(0.5f,0.5f,-1.0f);

  	glTexCoord2f(0.0f,1.0f);
  	glVertex3f(0.5f,-0.5f,-1.0f);
  	
  glEnd();	

texSky[2].Specify();
glBegin(GL_QUADS);

  	glTexCoord2f(0.0f,0.0f);
  	glVertex3f(0.5f,0.5f,0.0f);

  	glTexCoord2f(1.0f,0.0f);
  	glVertex3f(-0.5f,0.5f,0.0f);

  	glTexCoord2f(1.0f,1.0f);
  	glVertex3f(-0.5f,0.5f,-1.0f);

  	glTexCoord2f(0.0f,1.0f);
  	glVertex3f(0.5f,0.5f,-1.0f);
  
  glEnd();	

texSky[3].Specify();
glBegin(GL_QUADS);

  	glTexCoord2f(0.0f,0.0f);
  	glVertex3f(-0.5f,0.5f,0.0f);

  	glTexCoord2f(1.0f,0.0f);
  	glVertex3f(-0.5f,-0.5f,0.0f);

  	glTexCoord2f(1.0f,1.0f);
  	glVertex3f(-0.5f,-0.5f,-1.0f);

  	glTexCoord2f(0.0f,1.0f);
  	glVertex3f(-0.5f,0.5f,-1.0f);

  glEnd();

texSky[4].Specify();
glBegin(GL_QUADS);

  	glTexCoord2f(0.0f,0.0f);
  	glVertex3f(-0.5f,-0.5f,-1.0f);

  	glTexCoord2f(1.0f,0.0f);
  	glVertex3f(0.5f,-0.5f,-1.0f);

  	glTexCoord2f(1.0f,1.0f);
  	glVertex3f(0.5f,0.5f,-1.0f);

  	glTexCoord2f(0.0f,1.0f);
  	glVertex3f(-0.5f,0.5f,-1.0f);
  glEnd();

I can´t figure out the mistake…
Thanks in Advance!

Why does my screenshot not appear??
The URL is correct: http://www.penetrator3d.de/Images/SkyBox.jpg

Try GL_CLAMP_TO_EDGE for texture wrap modes.

I think this might help:

glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE) and the same for WRAP_T

It’s discussed rather thoroughly here: http://www.gamedev.net/community/forums/topic.asp?topic_id=95991

Well that sounds great, but i figured out that my graphics-card doesn´t support GL_CLAMP_TO_EDGE…but it´s a GeForce1 !!! Can this be??

Ok…I got now that i didn´t use the latest glext.h. g Now I can use GL_CLAMP_TO_EDGE!!
But it doesn´t help at all…:frowning:

There’s also a pretty elaborate discussion going on in the Advanced Forum, I didn’t read the whole thing but perhaps it will help you:
http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/006422.html

I think that had a bug on the early Geforces so clamp to edge works just like clamp.

V-man

Hmmm…
Why use GL_CLAMP_TO_EDGE … Wouldnt GL_CLAMP just solve the problem?
I use GL_CLAMP which solved the problem you have!

Try it!
Btw. Nice skybox!!!

Best regards
Roquqkie

Ok, thanks for the replies!
GL_CLAMP and GL_CLAMP_TO_EDGE didn´t work, so I started to fake a little.
Instead of using 0.0f and 1.0f for Texture Coordinates, I tried tu use 0.0009f and 0.9991f!! This works! g It´s a bad solution, but I could´nt find a diffrent way.

I’m not sure about this but I think it is correct – I believe the problem is caused by filtering. With GL_CLAMP, texels on the edge are filtered with the border. If you don’t have a border, then it could be black or some random color. With GL_CLAMP_TO_EDGE, texels on the are not filtered with the border.

… or someting like that.