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


Doing A Flip

Recommended Posts

Nullio    122
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??
	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;

	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 this post

Link to post
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.

Share this post

Link to post
Share on other sites
tryforfulluse    122
if your copying the info to the backbuffer and not switching anything to the primary surf, obviously its not displaying anything. i dont see how you newbies get stuck on these stupid problems, when the code is right in front of your face. im not sure if understood your problem though

Share this post

Link to post
Share on other sites