Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Dynamic FVF Determination?

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

Just playing  around with assimp now.

As usual, there is a common problem I am encountering as everybody,

When the assets are exported from the DCC, they may contain various components,

normals, 1, 2 or many sets of texture coordinates..... and so on so forth..

 

The Vertex declaration I am using currently support everything I can imagine.

But when exported assets don't have such things, the assimp will just crash.

I notice there is a function called IDirect3DDevice9::GetFVF(DWORD* fvf);

 

Probably what I am looking for, but I think the device probably need to get some information about the mesh

in the first place. When should I call the GetFVF function in order to get the vertex declaration of the

mesh I am loading into the game?

Thanks

Jack

Share this post


Link to post
Share on other sites
Advertisement

GetFVF is not for this purpose.  What GetFVF does is return the FVF set by a prior call to SetFVF.

In order to dynamically build up a vertex declaration for a mesh you're going to have to do it the long way.  Loop through the per-vertex components you have and build up an array of D3DVERTEXELEMENT9 from those.

Share this post


Link to post
Share on other sites

Thanks mhagain,

There are more questions...

How do I fill in a frame hierarchy with some data structures like combination buffers.

As far as I know, assimp will provide you things like bone Indices and bone weights....

There are no ways to fill in such data structures as combination buffers,  attribute tables all that crap?

I need those to interface with other subsystems....

Thanks

Jack

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!