Jump to content
  • Advertisement


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


Need help with clipping - please help!

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

Hi, Alright - I got all my drawing functions working with animation and a little keyboard input - but the time has come, and I''ve been putting it off for too long - for clipping! Now I tried to attach a clipper to the primary surface so if the player, missle, bullet, or whatever hits the edge of the screen ,it gets clipped - no sweat, no problem. Here''s the code I did it with...

HRESULT DDraw_Attach_Clipper(LPDIRECTDRAWSURFACE7 lpddsurface, RECT clip)
	RGNDATA rgndata;
	rgndata.rdh.dwSize = sizeof(rgndata.rdh);
	rgndata.rdh.iType = RDH_RECTANGLES;
	rgndata.rdh.nCount = 1;
	rgndata.rdh.nRgnSize = sizeof(clip);
	rgndata.rdh.rcBound = clip;

		D_Post_Error("Could not create clipper!");
		return g_ddrval;

		D_Post_Error("Error Creating the Clip List!");
		return g_ddrval;

		D_Post_Error("Could not Set the clipper to the desired Surface!");
		return g_ddrval;
return DD_OK;

Okay. Now I''m not an expert on clipping - in fact all the resources I''ve read on clipping are extremely vague. If you think I''m completely off - which I probably am - any refrence to a web page, documnetation, which I could read on how to program dumb ol'' clipping. Thanks, Destroyer

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!