Sign in to follow this  

Clipping planes, how to set them up?

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

Ello all, I'm trying to set a clipping plane while doing reflections (to stop things behind the reflective surface being reflected back upwards, like in the Direct3d mirror example), but I keep getting a breakpoint whenever I call: device->SetClipPlane(0, p); // HERE device->SetRenderState(D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0); Where p is the plane I'm reflecting in. The error in the debug spew is: Direct3D9: (ERROR) :Plane index is too big. SetClipPlane failed. How can index zero be too big!? Is there a function I need to call to set up the number of clipping planes allowable or something? Cheers for any help, Duncan.

Share this post


Link to post
Share on other sites
(1) Check the MaxUserClipPlanes member of your D3DCAPS9 structure. Does your graphics card even support user clip planes?

(2) Have you set the appropriate D3DRS_CLIPPLANEENABLE renderstate? Check out the D3DCLIPPLANE* macros.

Share this post


Link to post
Share on other sites

This topic is 4744 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this