Skip to main content
gamedev.net
🔒 Locked

DrawIndexedPrimitive

Started by Greg K May 3, 2005 at 6:23 PM 2 replies 2.2k views
Original Post
Greg K
Greg K
Hello, I am having trouble with DrawIndexedPrimitive. The terrain in the game that we are making is being drawn in chunks with calls to drawindexedprimitive. Each chunk uses the same index buffer but we offset the vertex it is pointing to when we render each chunk. This is working fine for smaller maps, but on larger maps it is crashing. The weird part is that it is only crashing when run on any ATI card. The problem does not show up on any nVidias. It is not an invalid call, because the call succeeds and it is not until we flip the buffers that it all goes to hell. It sometimes puts up a blue screen where it says the "device driver is stuck in an infinite loop" and sometimes it just crashes the drivers and goes to vga mode until you reboot. In any case, when I take out the one line where it actually calls DrawIndexedPrimitive, everything runs fine (all other geometry renders fine etc). Does anybody have any ideas why this happens, and how to fix it? -Greg
circlesoft
circlesoft
Unusual. It could be a lot of things, since DIP sets of an entire change of events, all leading up to drawing pixels to a surface. I assume that since the machine freezes, you aren't able to get any debug info back from the runtime.

One thing that comes to mind is that it was rumored (with some good evidence) that Nvidia drivers ignore some parameters of DIP (like BaseVertexIndex and MinIndex), so you may want to double-check those (since it's crashing on ATI and not Nvidia).

Also, are you doing any looping in your shaders? Putting the graphics card in a very long loop could cause it to time out.
LosBrutalos
LosBrutalos
Hmpf.. I´ve got the same problem. I decided to transfer the index buffer for each chunk....till now... But i´ve got a NVIDIA 6600 ...hmpf.
Do you work with managed buffers or with localmem (devicemem) ?

Los Brutalos(Sorry for my brutal english ;)
Muhammad Haggag
Muhammad Haggag
Quote:
Original post by Greg K
In any case, when I take out the one line where it actually calls DrawIndexedPrimitive, everything runs fine (all other geometry renders fine etc). Does anybody have any ideas why this happens, and how to fix it?
-Greg

Take a look at this FAQ entry covering how DIP works. Make sure you're passing valid parameters.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.