Jump to content
  • Advertisement
Sign in to follow this  
WOsborn

FVF and Vertex Declerations playing nice together.

This topic is 4338 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

Is it safe to use FVFs and Vertex Declerations in the same render setup? Say I render 3 meshes using FVFs and then i render a full screen quad using a vertex decleration. Is it ok to mix these or do you go one way or the other? If you can mix them what is the proper way to set and unset the Decl and FVF? Do you have to NULL the Decl out before you use another FVF and vice-versa?

Share this post


Link to post
Share on other sites
Advertisement
It is perfectly safe to mix FVFs and Vertex Declarations. In any case, the last call, either SetFVF or SetDeclaration, overrides all previous calls of any type.

Just FYI, SetFVF effectively calls SetDeclaration internally, and is really just a layer that was kept for backward compatibility.

Hope this helps.

Share this post


Link to post
Share on other sites
I found out my problem... I was doing that setup i said where
I render some meshes to a offscreen texrue, then use that to texture a quad.
Problem was I was using a statemanager (public ID3DXEffectStateManager) to set the
FVF and using the straight device to set Decl.
And since the statemanager class I have stores the last used
FVF, when it came time again for the statemanager to check the FVF it was the same
but internaly it was different because the statemanager didnt know about
the setDecl() call. So now I have to StateManager->SetFVF(0) before the SetDecl()
so it knows about the Decl change.

BooYa,
Thanks for help!

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!