开发者

DrawPrimitive with alpha

开发者 https://www.devze.com 2022-12-28 18:46 出处:网络
I\'m trying to draw 开发者_StackOverflow社区a line with the DrawPrimitive function in Direct3D. Can I draw tranparent line with the function?

I'm trying to draw 开发者_StackOverflow社区a line with the DrawPrimitive function in Direct3D.

Can I draw tranparent line with the function? If I can, how to design it?


I am not a DirectX expert, but I don't believe transparency has anything to do with the DrawPrimitive() function specifically.

I would look into the SetRenderState() function to enable alpha blending, and then assign some color/texture properties to your geometry.

Also, if you are just drawing a single line you may not see anything since a line by itself wouldn't have any width. I'm guessing you actually want to draw some triangles or quads or something instead of just a line.

0

精彩评论

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

关注公众号