Hi,
I'm rendering some geometry in directx9 with the DrawIndexedPrimitive function by passing in the number of verts indices etc, using the triangle list primitive.
I want to render the geometry in wireframe using the line list or line strip primitive but I cant figure out how to do this.
I dont know what to put into the prim count paramater.
Could anybody explain how to do this?
thanks,
Rendering geometry in wireframe
Started by lukesmith123, Mar 09 2012 07:54 PM
3 replies to this topic
Ad:
#2 Members - Reputation: 3797
Posted 09 March 2012 - 07:59 PM
Easier to just use SetRenderState (D3DRS_FILLMODE, D3DFILL_WIREFRAME) - that will give you a wireframe representation and you don't need to change any of your geometry, primitive types, etc.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#3 Moderators - Reputation: 2471
Posted 10 March 2012 - 03:16 PM
Actually, my experience has been that wireframe fill mode is sometimes dramatically slower, because the driver rewrites the geometry as lines. (This was more an ATI problem way back). Test it. It's okay for debugging, but you may want to create a separate index buffer for wireframe if it is an important part of your rendering.






