DirectDraw Question
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Guys, I have a question concerning blitting to a DirectDraw7 surface using Blt. My objective here is to take the source surface, lets call it XYSurface, and blit it back onto itself, simply rotating it during the blit. Can I do something like this?
LPDIRECTDRAWSURFACE7 pXYSurface; RECT rc; GetClintRect(hDlg, &rc); hRet = pXYSurface->Blt(&rc,pXYSurface,&rc,DDBLT_ROTATIONANGLE,&ddbltfx); if(hRet != DD_OK) { HandleDDErrors(hRet, errorMessage); MessageBox(NULL,errorMessage,"Error",MB_OK); return -1; }
When I do this, hRet is DDERR_SURFACEBUSY. Which reveals that "Access to the surface is refused because the surface is locked by another thread." Is this because I am trying to Blit back on to the source? Thanks, Joe