Jump to content
  • Advertisement


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


Doing a flip (part 2)

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

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:

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

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!