• Announcements

Archived

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

Doing a flip (part 2)

Recommended Posts

Ok I think I better explain my problem a little more I set up a primary surface with a back surface useing the code indicated below, I do error checking and everything with the creation of the surfaces go ok. Then to test if this worked I do a memory fill of the back surfaces with the color blue, then when I call while (FAILED(lpDDSurfacePrimary->Flip(NULL, DDFLIP_WAIT))); I see black, the no errors with the flip but it does not display a blue screen, then I do a memory fill to the primary surface (for testing purposes) and it works and I have a nice blue screen. The problem is the back surface must not be getting linked to the primary surface and I don't know why. Surfaces Init code:
  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.dwBackBufferCount = 1; ddSurfaceDesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; // set the backbuffer count to 1, 2 for triple bufferin // create the primary surface if (FAILED(lpMainDD->CreateSurface(&ddSurfaceDesc,&lpDDSurfacePrimary,NULL))) return -1; ddSurfaceDesc.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER; if (FAILED(lpDDSurfacePrimary->GetAttachedSurface(&ddSurfaceDesc.ddsCaps,&lpDDBackSurface))) return -1; 
If anyone can see what i can not I would be very happy and thank you a million times. Edited by - Nullio on March 18, 2001 5:53:01 PM

• Partner Spotlight

• Forum Statistics

• Total Topics
627681
• Total Posts
2978611

• 13
• 12
• 10
• 12
• 22