Skip to main content
gamedev.net
🔒 Locked

What does the clipper do?

Started by goldfinger8 Sep 16, 2000 at 10:03 AM 1 replies 500+ views
Original Post
goldfinger8
goldfinger8
In Direct X its the region that can be draw into, in other API''s its the area that cannot be drawn into. 1. Does any game in general need a clipper? 2. Besides not drawing unwanted graphics what else does it do? Umm...
If Microsoft ever made a solid OS then I would sell my soul to Satan for it...
JD
JD
This is how I composed my fullscreen game:

One front i.e. primary buffer made up the final image. Second buffer or back buffer where you make and update your scene something like making a pizza. You start with the bottom layer and lay your cheese and pepperoni on top each moved little bit as the frames progress. Finally an offscreen memory buffer where my little pepperonis live.

Now when you throw a pepperoni onto the pizza and a piece of it ends up outside then without a clipper you would cause a crash. But the clipper would clip that overhanging pepperoni and all be well. Then you can blit i.e. copy that composed image from the back buffer onto the front buffer. This will not cause flickering. I also use a clipper on one of the surfaces when I do flipping i.e. exchanging surface pointers where the clipper goes with the pointer. So if previously the back surface had a clipper attached and now you flip, the backsurface became the front or primary surface and the new backsurface gets the clipper. Or something like that Visit my site and download my game code to see how I did the clipper thingy.



my homepage
E-Mail: BlueOrbSoftware@mailcity.com
goldfinger8
goldfinger8
Thank you and that would explain why the screen would go blue or black when a sprite went off the screen boundaires...

Umm...
If Microsoft ever made a solid OS then I would sell my soul to Satan for it...

Topic Locked

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

Sign in to reply to this topic.