• Advertisement

Archived

This topic is now archived and is closed to further replies.

HELP! Issues with DrawIndexedPrimitive

This topic is 5190 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is the second time I''ve had problems with the DrawIndexedPrimitive function call. The strange thing is, it works when the vertex buffer and index buffers are small (16 verts, 32 primitives), but when the size increases, the programs crash with an error in D3D8.dll. I have error handlers in place, but since the error is not caused locally, they don''t trap it. I do know that the buffers are created correctly, but instead it is a problem with the function call. Is there any known issues that I haven''t found yet? Has anyone else experienced the same problem before? This is the third time I''ve had the problem - it seems every time I code a heightmap (which is what I''m doing this for) the render calls for the buffers don''t seem to work... Help!
Yes... VB6 is here to steal your minds. Very slowly.

Share this post


Link to post
Share on other sites
Advertisement
When I had problems with it before, I discovered I had either created the vertex buffer or index buffer too small, and when you order to draw everything it crashes. It''s easy to forget the *sizeof(word) or *2 with the createindexbuffer call and just specify number of indexes instead of number of bytes.

Just double check your calls to create and draw with the help files, to see which parameters take bytes, number of triangles/primitives or number of vertices.

Share this post


Link to post
Share on other sites
I''ll double check that the next chance I get... but I''m pretty sure that I''m sizing it right... but it sounds like it might be my problem. But wouldn''t that interfere with the creation of the buffers - not the rendering of them? Dah.


Yes... VB6 is here to steal your minds. Very slowly.

Share this post


Link to post
Share on other sites

  • Advertisement