Advertisement Jump to content
Sign in to follow this  
lucky6969b

How to directly create a D3DXFRAME?

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

Hello,

I got some vertex data, index data, normals data

They are all individual D3DXVECTOR3s

How can I feed this data to form a D3DXMESHCONTAINER or D3DXFRAME?

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Advertisement

To better answer your question, it would help if you describe the problem you're trying to solve. With the information you've provided, it sounds like just D3DXCreateMesh(FVF) would serve you better. In general, D3DXFRAME and meshcontainers are used for storing/animating a skinned mesh, and you don't mention a frame hierarchy, bones/nodes data, etc.

 

To answer your question directly, review the D3DXFRAME structure in the docs; create a D3DXFRAME (e.g. LPD3DXFRAME newFrame = new D3DXFRAME ); and populate it with your data, creating any needed new data, structures and objects along the way. If you are, indeed, creating a skinned mesh from scratch, you can take a look at information on skinned meshes which would likely help you. E.g., you'll need to create your own SkinInfo object, likely using D3DXCreateSkinInfo(...).

Edited by Buckeye

Share this post


Link to post
Share on other sites

I am just trying to write a parser in my spare time.

The parser so far can parse vertices, vertex indices, normals, normal indices, textures and materials.

But the only thing is I don't know how to put these together and feed them into a renderer

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites

the only thing is I don't know how to put these together and feed them into a renderer

Putting data "together" and rendering it is an extensive process. I suggest you take a look at some tutorials (e.g., in the SDK) which demonstrate creating and loading vertex and index buffers, and how to render them. Another good alternative would be to buy a good DX9 book (e.g., Frank Luna's Introduction to 3D Game Programming With DirectX 9.0c.)

 

If, in particular, you're parsing a DirectX x-file, the various pieces you mention (vertices, vertex indices, etc.) are pretty well explained in this article.

Edited by Buckeye

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!