Advertisement

SkyBox problems...

Started by September 04, 2001 02:56 PM
2 comments, last by MrKnister 23 years, 5 months ago
Hello... I have a big problem with a SkyBox. I switched off the Depth testing and so on, but it still looks as if the sky is very near. i've no idea anymore. Any help ???
    
const int   QuadDir[5][4]   = { {7,6,2,3}, {1,2,6,5}, {0,1,5,4}, {4,7,3,0}, {3,2,1,0} };
	
	const float SkyCoords[4][2] = { { 0.5f / 256.f, (256.f-0.5f) / 256.f }, 
									{ (256.f-0.5f) / 256.f, (256.f-0.5f) / 256.f },
									{ (256.f-0.5f) / 256.f, 0.5f / 256.f },
									{ 0.5f / 256.f, 0.5f / 256.f } };

	glDisable(GL_DEPTH_TEST);
	

	for (int q1 = 0; q1 <= 4; q1++)
	{
		glBindTexture(GL_TEXTURE_2D, skytex[q1]);
		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
		
		glBegin(GL_QUADS);
		
		for (int q2 = 0; q2 <= 3; q2++)
		{
			glTexCoord2d(SkyCoords[q2][0], SkyCoords[q2][1]);
			glVertex3fv(SkyVerts[QuadDir[q1][q2]]);
		}
		
		glEnd();

	}
	
	glEnable(GL_DEPTH_TEST);
    
Edited by - MrKnister on September 4, 2001 3:58:18 PM
perhaps use a larger FOV in your camera.
use diffeent skybox textures.
Advertisement
yeah using larger FOV values in your glPerspective procedure, or larger textures for that matter could make the skybox look less blurry and near.
Well, changing the fov value doesn''t bring the result I want.
I tested it, but it looked near (fov: 90).

In any other tutorials i downloaded the skybox looks great. But if i copy pieces of the tut source into my one, it has the same effect like my skybox. I also changed the textures, but no effect.

This topic is closed to new replies.

Advertisement