PDA

View Full Version : Help please



Kronos259
05-29-2003, 04:32 AM
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.

Leyder Dylan
05-29-2003, 04:46 AM
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);