Archived

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

Some help please

This topic is 5315 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

I have created a big room and i have added movement inside it. Because it is large the textured walls that are far away seem messed with the background.Only when i get closer i can see them solid.Is there a way to make the whole room look solid no matter how close you are? The walls are created using glQuads.

Share this post


Link to post
Share on other sites
In your ResizeGlScene() :


// ***********************************************************************
GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
{

// Prevent A Divide By Zero By making Height Equal One
if (height == 0)
height = 1;

// Reset The Current Viewport
glViewport(0,0,width,height);

// Select The Projection Matrix
glMatrixMode(GL_PROJECTION);

// Reset The Projection Matrix
glLoadIdentity();

// Calculate The Aspect Ratio Of The Window
gluPerspective(45.0f,(GLfloat) width / (GLfloat) height, 0.1f, 100.0f);

// Select The Modelview Matrix
glMatrixMode(GL_MODELVIEW);

// Reset The Modelview Matrix
glLoadIdentity();

}


Change the last params (100.0f in this example) with a number with thz size of your box :


// Calculate The Aspect Ratio Of The Window
gluPerspective(45.0f,(GLfloat) width / (GLfloat) height, 0.1f, 100.0f);



========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/

Share this post


Link to post
Share on other sites