Skip to main content
GameDev.net gamedev.net
🔒 Locked

Direct Draw Clipper Question

Started by Brad Jan 18, 2000 at 11:13 AM 2 replies 1.1k views
Original Post
Brad
Brad
I''ve asked this before but didn''t get a response How can I atatch and than deattach a directdraw clipper within the game loop? Is that even possible? I''m having trouble with the detach part. Please somebody respond.
Machaira
Machaira
To detach a clipper once it's set call the SetClipper function of the primary surface, passing NULL. Why would you want or need to though? To use a clipper follow these steps:

1) Call the CreateClipper function of the DirectDraw object
2) Call the SetHWnd function of the clipper object
3) Call the SetClipper function of the primary surface object

Hope this helps.

Breakaway Games

Edited by - Machaira on 1/18/00 11:56:43 AM
Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development
Brad
Brad
I need to do this because I''m using the level editor mappy to create my levels. The editor comes with a library to load and render the levels created with it but for some odd reason they refuse to work when a clipper is attached. So I''ll just attach the clipper to the back surface, detach it before using the mappy functions and reattach it after.

I''m a bit confused about your explanation though. I''m attaching the clipper to the back surface so do I send the NULL to the BACK surface or the PRIMARY surface?

Thanks a ton
mason
mason
Send the NULL to the back surface.

Beware: Attaching and Detaching clippers is *really* slow...

Mason McCuskey
Spin Studios - home of Quaternion, 2000 GDC Indie Games Fest Finalist!
www.spin-studios.com
Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!

Topic Locked

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

Sign in to reply to this topic.