Jump to content
  • Advertisement
Sign in to follow this  
lglabc

How to use both D3DFILL_SOLID and D3DFILL_WIREFRAME in one mesh?

This topic is 4566 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
Advertisement
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
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...

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!