• Advertisement

Archived

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

direct draw clipping question

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

can someone tell me whats wrong with this code cause when i define my clipping area nothing gets put on screen
    

DDSURFACEDESC2 ddsc;

if( DirectDrawCreateEx( NULL, (LPVOID*)&lpdd, 
             IID_IDirectDraw7, NULL) != DD_OK)
                MessageBox( NULL, "Couldn't Create DDraw Object", MyTitle, MB_ICONERROR);

if( lpdd->SetCooperativeLevel( hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT) != DD_OK)
		MessageBox( NULL, "Couldn't Set Cooperation Level", MyTitle, MB_ICONERROR);
	
if( lpdd->CreateClipper( NULL, &lpddclip, NULL) != DD_OK)
		MessageBox( NULL, "Couldn't Create Clipper", MyTitle, MB_ICONERROR);

	lpddclip->GetHWnd( &hwnd);

	ZeroMemory( &ddsc, sizeof(ddsc));
	ddsc.dwSize		= sizeof(ddsc);
	ddsc.dwFlags	= DDSD_CAPS;
	ddsc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;           if( lpdd->CreateSurface( &ddsc, &lpddprimary, NULL) != DD_OK)
		MessageBox( NULL, "Couldn't Create Surface", MyTitle, MB_ICONERROR);
	
	lpddprimary->SetClipper( lpddclip);

	return true;
    
but when i take out lpddclip->GetHWnd( &hwnd); & lpddprimary->SetClipper( lpddclip); i get what i want on the screen i know its a little messy but i hope you guys can figure it out cause i can't Edited by - baddrizz on September 7, 2001 4:58:18 PM

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement