• Advertisement
Sign in to follow this  

Rotated clipping

This topic is 2034 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 need to implement clipping of primitives at any rotation but I'm unsure of how to do it. Currently I'm using IDirect3dDevice9::SetScissorRect to clip things, but that obviously won't work at any rotation. So my question to all of you is how do I clip using a rotated rectangle?

I've been searching for a while and found some people suggesting to use iDirect3DDevice9::SetClipPlane, but I'm not 100% sure how to use that or if it would be the best thing to use. The important thing to note is that the scene is not 3D at all, this is for a completely flat 2D application.

EDIT: Feel free to close this thread. Spent the whole day getting clipping planes to work, which works fine until I realized that clipping needs to use weird funky shapes so it got a LOT more complicated really fast. I did, however, find a free third-party library that handles clipping all sorts of things that I'm going to try to use when I have free time in the future. Library is called Clipper. Edited by Shenjoku

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement