views:

91

answers:

2

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?

+1  A: 

You're looking for what is called a viewport. considering you did not specify which DirectX and which language you're using, I'll have to point to the DirectX9 spec

Bahbar
+1  A: 

Scissor Test.

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

Stringer Bell