Archived

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

Efficiency of DirectDraw Clippers

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

Ok, here''s the parameters: I am writing a full-screen game, with square/rectangular tiles/sprites. This makes doing my own clipping very trivial. But I still wonder whether letting the DirectDraw clipper do it for me - using Blt() - would be more effective? I doubt it could be significantly faster, but if it''s the same I would be happy. How good is the software implementation? And what is the likelihood of the clipper being implemented in hardware? What about when DX8 comes out, and D3D and DDraw get merged into one: will the Viewport take over the role of the Clipper, and is that more likely to be hardware accelerated? If I can reduce the amount of code I use, -and- potentially gain some parallelism into the equation, I want to know about it

Share this post


Link to post
Share on other sites
I always hear people talking about how slow the DDClipper is... haven''t exactly benchmarked it before tough.

-------------------------
-Now Working on Pokemon like Engine!

Share this post


Link to post
Share on other sites
I guess if the clipper is slow, then you have 2 choices.
Create your own clipping routines which means you have to write your own blitting routines as well or live with what MS created.

Creating your own blitting routines means that you will lose hardware acceleration for your graphics, but you can create more flexible routines.

Either way you can''t go wrong.

Share this post


Link to post
Share on other sites
I tried the clipper in Dx 5.0 vs my own clipping

It slows the framerate by 5 frames down (from 33 to 28)

It was a fullscreen software blt with some slight overdraw(with page flipping)

For the clipper to be in hardware instead.. wouldn''t that mean no more surfaces can be in system memory, so it seems unlikely (I think)

Share this post


Link to post
Share on other sites
Well here''s some news you might like. I clip both the back buffer and the front buffer, as well as MOST EVERY plain surface the engine is using.

And guess what? I lose 2% frame-rate on average! So if you ask me, I''d say clip-clip-away and let the hardware do what it''s made for.

This test, BTW, involved probably 250+ sprites on 3 paralax (spelling?) levels. I get 75 frames in 800x600x16 full screen (the monitor''s limit) and 311 frames in a 800x600 window. Alpha-blending and lighting is also being done. DirectPlay being used in client/server game. P2 300, 16MB graphics, 128 MB ram.

Share this post


Link to post
Share on other sites
Dude.. this is waht type of computer that I have.
PII 333 MHz
64MB RAM (finding 66MHz memory sucks)
17GB Hard Drive
4MB S3 Video Card (real 3D action there)
and a 33.6K modem

Am I going to upgrade??? NOPE.
If it is made to run on my computer, then I know that it would run on almost any computer from 200MHz to 90000GHz (whenever that comes out)


Share this post


Link to post
Share on other sites
If you are using fullscreen exclusive modes then you might as well do your own clipping. Its pretty trivial to do. Just compare the destination rect that you specified for the Blt to the screen rect and reduce the size of the source and destination rects accordingly.

If you are running in a windowed mode then thats trickier because you have to worry about other windows. It is this situation that clippers were intended for and the *should* be used in this case.


Regards,
Ralph Potter
ralph.potter@digital-magi.com, http://www.digital-magi.com

Share this post


Link to post
Share on other sites