Jump to content
  • Advertisement


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


Doing A Flip

This topic is 6481 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

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

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!