How to use both D3DFILL_SOLID and D3DFILL_WIREFRAME in one mesh?
I want to show a mesh both in D3DFILL_WIREFRAME and D3DFILL_SOLID effect.
Only I can figure out is to render the mesh twice -_-!
Once use pd3dDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );
Then pd3dDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );
Is there some better method to get the effect?
ThX..
I'm afraid that for the "wireframe over solid" look you will have to render your mesh twice. No way around it really. (Unless your mesh is uniquely mapped and you draw the lines directly onto the texture - although this will generally look crap).
At least the wireframe pass is low on fill rate!
Mike.
At least the wireframe pass is low on fill rate!
Mike.
you can do that with a keypressed...in fact I did it like that...
I have a mesh when I pressed F for example, it renders with solid and then again when pressed F it renders in wireframe...
I have a mesh when I pressed F for example, it renders with solid and then again when pressed F it renders in wireframe...
ummm I would have thought if you´re using shaders you can have two passes, one with fillmode set to solid, and another with fillmode set to wireframe.
any reason why that wouldn´t work?
any reason why that wouldn´t work?
Quote:Original post by Rebuto
ummm I would have thought if you´re using shaders you can have two passes, one with fillmode set to solid, and another with fillmode set to wireframe.
any reason why that wouldn´t work?
What you describe is rendering the model twice (i.e. in two passes), and that's what lglabc was asking about.
I see how this is ambiguous -
"rendering an object" - As in rendering the object's geometry once to the screen with a specific set of states (A "pass")
vs.
"rendering an object" - As in rendering an object using a series of passes.
Just different people's terminology - there are probably flamewars over this sort of thing! lol.
Mike.
When drawing with D3DFILL_WIREFRAME over solids, you may want to use some depth-bias to make it look nice. Check out this thread.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement