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.
精彩评论