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

Problem with back surfaces

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I seem to be having a small problem with blitting to my back surface. I set a a dual surface so I can have nice joyfully smooth animation. But my problem is that when I blit to the backsurface then call while (FAILED(lpDDSurfacePrimary->Flip(NULL, DDFLIP_WAIT))); it doesn''t show anything, but when I change the blit to blit to the Primary surface it works!, I''m just using a quick memory fill to test this so I dont have any bliting errors and I check to make sure the lpDDBackSurface != NULL. any idea''s at what could be wrong? I''m stuped

Share this post

Link to post
Share on other sites
Ok here is the code I''m useing to create the surfaces

DDSURFACEDESC2 ddSurfaceDesc; //Surface Description

ddSurfaceDesc.dwSize = sizeof(ddSurfaceDesc);

// we need to let dd know that we want a complex

// flippable surface structure, set flags for that

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;

ddSurfaceDesc.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
if (FAILED(lpDDSurfacePrimary->GetAttachedSurface(&ddSurfaceDesc.ddsCaps,&lpDDBackSurface)))
return -1;

I can''t seem to find the problem, hope you can!

Share this post

Link to post
Share on other sites