Sign in to follow this  
lucky6969b

Dynamic FVF Determination?

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

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

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