Skip to main content
GameDev.net gamedev.net
🔒 Locked

Collapse Meshes

Started by Moh_Abed Jan 16, 2003 at 8:41 AM 0 replies 250+ views
Original Post
Moh_Abed
Moh_Abed
How can i collapse multiple meshes loaded from .x file into ID3DXMesh a single mesh to lock all its buffer and mange it to vb. i need to convert that single mesh into vbs based on the texture groups to manage it using Octree. i did it but it loads only the first mesh into hierarchy so i want to convert it into aa single mesh
Mohammed Abed
aker_jus
aker_jus
I havent tried this, but you might consider this:

1) Retrieve a pointer to the vertices when you lock the VB
2) Store all FVF information about the mesh into some DWORDs
3) Create a new empty mesh
4) Do a memcpy and fill it with the vertices each other object has.
5) Clone the mesh fvf and set the saved fvf information.

I suggest you collapse similar FVF meshes into that single one, for example meshes that do have FVF_NORMAL and in general the same FVF attributes.

Myself, I am trying to think of a way to convert 3DS information to X Files to use my renderer to draw them, this is the best thing I could think. Anyone else?
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.