开发者

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?


Scissor Test.

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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜