-
May 5th, 2009, 06:44 AM
#1
How to: Create a mesh from a VertexBuffer?
Good Day,
I have made some basic 3d shapes, namely a cube-like object using Vertices and Vertex Buffers.
I present those shapes using the
d3ddev->SetStreamSource(...);
d3ddev->DrawPrimitive(D3DPT_TRIANGLEFAN,...);
functions.
Now i want to "save" these shapes in a mesh, so i can draw them more easily with
mesh.DrawSubset(0).
I tried to create the mesh using:
D3DXCreateMeshFVF(...);
but unfortunately i am doing something wrong, as nothing is displayed with the
mesh.DrawSubset(0) function.
I think i am missing something, especially the direction i have to give to the mesh as how to draw my shapes
Any help on how i can create this mesh from my vertex buffer would be great!
Thanx in advance,
Stakon.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|