Sign in to follow this  

How to use both D3DFILL_SOLID and D3DFILL_WIREFRAME in one mesh?

This topic is 4351 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4351 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this