Inter Quake Model IQM render Directx9
Posted
by
Andrew_0
on Game Development
See other posts from Game Development
or by Andrew_0
Published on 2012-11-05T07:13:31Z
Indexed on
2012/11/05
11:25 UTC
Read the original article
Hit count: 579
I'm trying to render an Inter Quake Model(http://lee.fov120.com/iqm/) in DirectX9 that I exported from blender.
I want to display animations which IQM supports and my model format does not.
The model is a cylinder.
It loads fine in the iqm sdk opengl viewer but when i try to render it in directx9 using for example(this is just to render the vertices):
IDirect3DDevice9 * device;
HRESULT hr = S_OK;
for(int i = 0; i < nummeshes; i++)
{
iqmmesh &m = meshes[0];
hr = device->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0,
3*m.num_triangles, m.num_triangles ,&tris[m.first_triangle] ,D3DFMT_INDEX32
,inposition ,sizeof(unsigned int));
}
It renders like this:
The light grey bit that looks like two triangles in the middle is what is rendered(ignore the other stuff).
Whereas it is meant to look like this(using a custom importer which I designed which matches what is displayed in blender):
Anyone have any suggestions on what might be going wrong?
© Game Development or respective owner