Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rotated clipping


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Shenjoku   Members   -  Reputation: 160

Like
0Likes
Like

Posted 28 August 2012 - 05:33 PM

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, 30 August 2012 - 07:02 PM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS