PDA

View Full Version : how to do clipping?



candy
04-11-2004, 02:23 AM
hi all, I have one qusetion abt building a game world. Suppose the world is of size 1000 unit x 1000 unit and I want to limit the visiion of the player to 100 unit by gluPerspective. However, once i say the clipping plane in this way, there is a grey plane 100 unit away the player, I know that it is the clipping plane. But since I have a skybox of blue, it is indeed ugly for having such a grey plane. I would like to ask is there any way to eliminate that grey while can limit the player vision? Thanks a lot

04-11-2004, 04:02 AM
No, clipping planes are invisible. The grey must be something else.

Maybe you've set glClearColor to a grey and you're clipping your skybox against the viewing volume, so you're seeing the background colour in that area?

candy
04-11-2004, 04:36 AM
Dear Bobbob,

Really THANK YOU very much for your reply!!!!!!!!!! I am really stupid and get struck by it for a long time!!!! Now, I undersatnd the problem (Thanks again..) However, I wonder if my skybox is textured, how can I make the clipping plane "invisible" from the player? Since when I try to use glClearColor(1.0f, 1.0f, 1.0f, 0.0f); instead, the clipping plane is still visible... (as I think that using white color can make it disappear...)