HELP! Issues with DrawIndexedPrimitive

Started by
1 comment, last by Mushu 20 years, 2 months ago
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.
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.
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.

This topic is closed to new replies.

Advertisement