Search code examples
directxspritemaskingorthographic

How do I go about implementing sprite masking?


Using DirectX I'm rendering textured polygons (orthographically) so they act as HUD sprites. Now I'm not sure how would I go about implementing sprite masking in this sytem?

So basically say I have a sprite, how can I make it render only in a given portion of the screen which I define? And if a part of it moves outside this portion of the screen you don't see it?


Solution

  • Scissor Test.

    http://msdn.microsoft.com/en-us/library/ee422196(VS.85).aspx