Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MrKnister

SkyBox problems...

This topic is 6227 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!