Archived

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

Managed Meshes. Damn Microsoft. Damn them.

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

Okay...I understand how to create a Mesh object from an xfile. I understand how to render it. What I NEED to do, is create a mesh object based on an existing vertex buffer. And the DXSDK docs are just about useless for this. Any help would be appreciated. I''m working in C#, managed DX9.0a. Although I''m fluent enough in c++ that code in that language should help, too. On a closely related note...IS there any good docs on what the Mesh object really is, and what it''s members do? I swear, the SDK docs drive me batty. If I see one more function that takes an object of type "object" as a parameter, with no explanation at all, I''m going to scream. When I call up the SDK help page, it REALLY ought to have more info than the popup function autohelp does. -Daniel StupidStupidStupid game companies.

Share this post


Link to post
Share on other sites
I assume you''re suggesting, then, that I take the data in my vertex buffer, save it as an xfile, and create the mesh from the xfile? That seems a rather indirect way to accomplish my goal. There has to be a way to access the Mesh data more directly. Or, more importantly, there has to be some documentation on how to do it...I suspect between the "SetVertexBufferData" and "FromStream" methods, there has to be a more direct route, but I can''t get it to work.

StupidStupidStupid game companies.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i don''t know anything about C# or managed DX9, whatever that means, but the D3DXCreateMeshFVF utility function will create an ID3DXMesh for you. you could then unlock that mesh''s vb and ib and fill them with your other data. that''s what i do anyway. if all you have is a vb then you''ll have to convert it to a vb/ib pair as all of the mesh interfaces use indexed vbs. if you have the data in another mesh then you can use the CloneMeshFVF method to get a copy. or the Optimize method will create a copy as well.

Share this post


Link to post
Share on other sites