My PC freezes up on m_pd3dDevice->Present( ) :o(

Started by
1 comment, last by Igilima 21 years, 2 months ago
I've been writing some basic programs based on the d3dapp framework. I wrote one that draws a basic checkerboard with a vertex buffer and a couple index buffers. I just rewrote my code so that I could generate vertex and index arrays at runtime with configurable sizes. I did run into some trouble with that but I think I have tracked down all of the bugs associated with variable array sizes. Anyway, my program runs fine and renders a sprite and text fine until I create a board object. Then it will go through the render code once and hang on Present() in the d3dapp.cpp code as I step through it. Unfortunately, this hangs the entire PC with no way find out what is going on. I end up having to reset the machine (Windows XP). Anyone know what I could be doing that could be causing Present() to hang the entire OS up so badly? I suppose I could still be doing something that to overwrite memory somewhere but if I just comment out the call to DrawIndexedPrimitive() then it runs fine. [edited by - Igilima on February 8, 2003 3:02:12 PM]
Advertisement
Hmm, the problem seems to be when I changed to D3DFMT_INDEX32 in my CreateIndexBuffer() call.

Either that format is not valid or my card or the device that I created on that card (Mobility Radeon 7500) doesn''t support it. :o(

Ah well, at least I found the culprit.
As far as I know, only the Radeon 8500 and higher support 32-bit indices. (and no, the GeForce4 doesn''t support them either as far as I know) Luckily, this is not a problem most of the time, as you can get by just fine with 16 bit index buffers.

- JQ
#define NULL 1
~phil

This topic is closed to new replies.

Advertisement