Jump to content
  • Advertisement


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


Problem with walls disappearing

This topic is 6410 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''m a mundo newbie to open gl, just started learning this week, so please excuse any idiocies you find in the following post... I''m making a program that generates a maze and lets the user walk around it using the numberpad, similar to that screensaver on a lot of windows computers with the brick walls and the rat running around on the floor. I''ve got the maze generation part down, and it draws in 3d fine if the camera is pretty far away from it - that is, if the camera is not actually in the maze it looks perfect. BUT: When the camera is in the maze, walls mysteriously get cut off at a certain distance from the camera. When you walk forward, the walls get eaten away gradually. This is kind of a big problems because mazes tend to get significantly easier when you can see through walls ;-) The distance from the camera appears to be approximately 1 when they start disappearing, but I don''t know that it is exactly 1. Is this a common problem or am I doing something completely stupidly? My suspicion first fell on
but I messed with it and it didn''t seem to change very much (for the better anyway, when I changed 1.0 to 0 hardly anything drew, but changing it to 10 didn''t have any noticable effects). Thanks for any help /riley

Share this post

Link to post
Share on other sites
if you use the gluperspective() command, the last 2 parameters are zclip near and far. set near to something like 0.5 or 1, and set far to as far away as you''d like (taking into account rendering issues).

so, if the maze was like a diameter of 50, the far value can safely be like 60 or so.


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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!