• ### Popular Now

• 13
• 18
• 19
• 27
• 10

#### Archived

This topic is now archived and is closed to further replies.

# Doing A Flip

This topic is 6210 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

My primary surface doesn''t flip with my back surface!!!, I was told to show my Surface Init code so here it is, everything looks right to me, I use: while (FAILED(lpDDSurfacePrimary->Flip(NULL, DDFLIP_WAIT))); to flip the surfaces and it just displays black when I blit to the back surface but works when I blit to the primary, anyone have any ideas??
  memset(&ddSurfaceDesc,0,sizeof(ddSurfaceDesc)); ddSurfaceDesc.dwSize = sizeof(ddSurfaceDesc); ddSurfaceDesc.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; // we need to let dd know that we want a complex // flippable surface structure, set flags for that ddSurfaceDesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; ddSurfaceDesc.dwBackBufferCount = 1; // set the backbuffer count to 1, 2 for triple bufferin // create the primary surface if (FAILED(lpMainDD->CreateSurface(&ddSurfaceDesc,&lpDDSurfacePrimary,NULL))) return -1; ddscaps.dwCaps = DDSCAPS_BACKBUFFER; if (FAILED(lpDDSurfacePrimary->GetAttachedSurface(&ddscaps,&lpDDBackSurface))) return -1; DDSURFACEDESC2 ddSurfaceDesc; //Surface Description DDSCAPS2 ddscaps; // a direct draw surface capabilities struct 

##### Share on other sites
Well, I''m not sure if I understand your problem.
On which surface are you doing your blit''s ? Is it the primary surface or the backbuffer ? In case you do it to the primary surface then that''s the problem. If you have a backbuffer you should do all the blitting to it.

I hope that solves your problem. If not, I''m sorry.