d3d7 flashing violently
It sounds like the flip's working correctly, but that you're running into an error in the middle of your blits to the offscreen surface.
Try outputting some debugging information with the return code of the first blit after that blue clear you're doing. You'll probably find your problem there.
I hope this helps,
-E
-ns
if (FAILED(this->lpd3ddev->Clear(1UL,&clRect,D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,0x000000ff,1.0f,0)))
{
return false;
}
if (SUCCEEDED(this->lpd3ddev->BeginScene()))
{
this->lpd3ddev->DrawPrimitiveVB(D3DPT_TRIANGLELIST, lpd3dvb,0,
(numvertices*3),D3DDP_WAIT);
this->lpd3ddev->EndScene();
}
else
{
return false;
}
if (FAILED(lpddsPrimary->Flip(lpddsBack,DDFLIP_WAIT)))
{
return false;
}
thanks for the replies!
Alex.
A couple minor points: DO NOT CALL DRAWPRIMITIVE OR FLIP WITH THE WAIT FLAG!!!!
You eliminate parallelism when you do this.
Instead, wrap them like this:
do {
hr = DrawPrimitive();
} while(hr == DDERR_WASSTILLDRAWING);
if(FAILED(hr) . . .
Also, when the function returns false, you are exiting, and not accidentally just falling though to the next loop, correct?
my STB nVidia 8mb very few flashes
3D Blaster S4, 800, 640 - LOTS of flashes
32mb ATI All In Wonder Pro - Some flashes