Original Post
Hello!
I''ve got a problem when rendering in direct3d. I''m using DrawIndexedPrimitiveVB without the D3DDP_WAIT flag. This means that the function returns immediately, and the polys are placed in a queue to be rendered. My game loop is faster than my card can render the frames, so because of this queue, a couple of frames will be pending rendering. This also means that any input (such as mouse movements or keyboard input) will not be shown until after a couple of frames, or, in my case as much as half a second later. This sucks, because it''s like playing with a huge amount of lag.
My question is: is there any way to flush this queue, or check if the hardware is still rendering so i can wait for it to finish(or any other way to solve this problem)? I don''t want to use the D3DDP_WAIT flag, because then the card will only render in the render loop (i want it to work while i''m doing AI and physics and stuff so i can maximize performance). I''ve tried the GetFlipStatus(), to wait manually, but i couldn''t get it to work. (maybe i''m not doing it properly, or i shouldn''t use it at all... ? )
Please help!
Thanks in advance,
/Simon