Originally posted by mickey
isn't it just one pointer, and ddraw just points back and forth between these two buffers,
Nope. Where do you think it keeps the info about the 2 buffers? At the addresses of their respective pointers.
Code:
//long pointer to an IDirectDrawSurface object for the primary surf
LPDIRECTDRAWSURFACE7 sfPrimary=NULL;
//long pointer to an IDirectDrawSurface object for the backbuffer
LPDIRECTDRAWSURFACE7 sfBackBuffer=NULL;
sfBack->BltFast(20,20,sfYourBmpSurf,&ItsRect,DDBLTFAST_WAIT);
sfPrimary->Flip(NULL,DDFLIP_WAIT);
Read the DirectX docs that come with the SDK.
from DX SDK documentation
HRESULT Flip(
LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride,
DWORD dwFlags
);
Parameters
lpDDSurfaceTargetOverride
Address of the IDirectDrawSurface7 interface for an arbitrary surface in the flipping chain. The default for this parameter is NULL, in which case DirectDraw cycles through the buffers in the order that they are attached to each other