Nick The Newbie

I'm doing some tests with geometry shaders in Direct3D 10, and, not being too well versed on Direct3D, I've just used a sample that came with the SDK as a code base. The example i use loads a .sdkmesh of tiny, and though I can test my shader on her, she's not the best geometry for the job.

I basically want to create a new .sdkmesh that's a simple brick wall. Can anyone offer suggestions on how to do this



Re: Direct3D 10 Creating my own .sdkmesh

Pavor

You should prepare your 3d model in some 3d editor (Bender, 3D Studio MAX or the like), then export it to .x format. When you have an .x file, use the included with the DX SDK command line converter to obtain an .sdkmesh file.

It's a long way, I know, but it's the first one came into my head.

However, in my opinion, you should start with hard-coded geometry, see SDK Tutorial 4 for example.





Re: Direct3D 10 Creating my own .sdkmesh

Nick The Newbie

Thank you for your reply!

I do not see that tutorial in my sdk, so i will redownload the latest version it should be in there. I'm also tempting to use a vertex and index buffer to make the wall, as I would like the wall to be a rather high concentration of triangles, rather than just two large ones. The tricky thing is that I'll be adding vertices to the wall through the geometry shader, and I won't be able to update the index buffer accordingly.

Edit: I found the tutorial you were referring to. It shows how to create the primitives, but just as I suspected, I'm still stuck on how I'm supposed to update the index buffer as more and more vertices are created through the geometry shader's stream out.