Jump to content
  • Advertisement


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


Problem with back surfaces

This topic is 6397 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
Could you post your primary (and back) surface creation code ? I think the problem is here. The back buffer is perhaps not "linked" to the primary surface which therefore cannot flip.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!