Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to render an Inter Quake Model( 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;

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?

share|improve this question
up vote 0 down vote accepted

The last parameter of your DIP call is wrong - it should be the size of your vertex struct, which - for position only - is going to be 3 floats.

share|improve this answer
Thanks, that worked. Can't believe I missed that... I'd vote your answer up but won't let me without 15 rep... – Andrew_0 Nov 5 '12 at 9:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.