Archived

This topic is now archived and is closed to further replies.

easiest way to get .x files into vertex buffers

This topic is 5622 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 need to get ONLY the vertex, normals, and texture coordinates into a vertex buffer. i want to ignore all the material, animation, and any other doowackies that complicate things.what is the easiest way to get the .x files vertice info into a vertex buffer. is there a slight chance that they are compatible and i can just copy the .x file into it. i highly doubt that, but hey, theres a chance right?

Share this post


Link to post
Share on other sites
i suppose you can get anything out of x files if you work directly with frame hierarchy (see x file reference in the docs), but why not just use D3DXLoadMeshFromX? it''s so much easier.

---
Come to #directxdev IRC channel on AfterNET

Share this post


Link to post
Share on other sites
quote:
Original post by niyaw
i suppose you can get anything out of x files if you work directly with frame hierarchy (see x file reference in the docs), but why not just use D3DXLoadMeshFromX? it''s so much easier.

---
Come to #directxdev IRC channel on AfterNET

right now, i can do a lot of stuff involved with vertex buffers. i can make a cube or other simple object and render it with transparency and differnet textures and everything. if i could load mesh files into vertex buffers, i could render them too. but i haven''t done anything with the mesh system yet, so i''m not sure how to use it. is there a good tutorial or something that just teaches you how to load them? i take it this is the way to load stuff into vertex buffers, is .x files.

Share this post


Link to post
Share on other sites
then D3DXLoadMeshFromX is everything you need. you can find code in sdk tutorials, sdk samples, and i suppose on www.andypike.com as well as www.drunkenhyena.com. you may want to start with sdk tutorials, they are pretty good.

---
Come to #directxdev IRC channel on AfterNET

Share this post


Link to post
Share on other sites
quote:
Original post by billybob
alright, i''m trying to load meshes but i keep getting these unresolved external symbols. how do i fix them?

throw in some libraries.

---
Come to #directxdev IRC channel on AfterNET

Share this post


Link to post
Share on other sites
quote:
Original post by niyaw
[quote]Original post by billybob
alright, i''m trying to load meshes but i keep getting these unresolved external symbols. how do i fix them?

throw in some libraries.

---
Come to #directxdev IRC channel on AfterNET
i got it, yay. now onto the next challenge: figuring out this matrix stuff. i have done 2x2 matrixes in 2d before, but now there are like 3 different ones. i think i get it, but only part of it. you set a transform matrix for what you are drawing, then set a new transform matrix for the next thing to draw, etc. but i don''t get how to move and rotate things.

Share this post


Link to post
Share on other sites
change your world matrix. use the d3dx math routines for that. i.e., applying d3dxmatrixtranslation to your world matrix will cause your objects to be translated as you specify.

---
Come to #directxdev IRC channel on AfterNET

Share this post


Link to post
Share on other sites
quote:
Original post by niyaw
change your world matrix. use the d3dx math routines for that. i.e., applying d3dxmatrixtranslation to your world matrix will cause your objects to be translated as you specify.

---
Come to #directxdev IRC channel on AfterNET


i think the whole subject involves more than that i''m reading tutorials about it now, and i think i''m getting it. i wish there was some source code that just used a lot of them and explained what each one did, i would get it really fast that way. but the way i''m going now, i read tutorial after tutorial, and add bits and pieces of them together.

Share this post


Link to post
Share on other sites