Skip to main content
gamedev.net
🔒 Locked

DirectDraw Clipping

Started by silentrob66 0 replies 250+ views
Original Post
silentrob66
silentrob66
Hi all: I''ve been spending the majority of my evening messing with DirectDraw clipping, tryin to get it to work. I''ve searched through the forums and articles, and I''ve found some good info, but I still can''t see what I''m doing wrong. The app is using MFC and directdraw7 in Windowed Mode. I''ll show you my code so far(this is being called from the CView object):
  
	if(FAILED(pDD->CreateClipper(0,&pClipper,NULL)))
		return FALSE;

	if(FAILED(pClipper->SetHWnd(0,m_hWnd)))
		return FALSE;

	if(FAILED(pPrimarySurface->SetClipper(pClipper)))
		return FALSE;
  
here''s what happens: In it''s current state, it draws nothing; blank white window. If I comment out the call to SetClipper, then the bitmap will draw, but if I resize the window too small, DirectDraw draws outside of the window. Any thoughts? Thanks in advance.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.