Jump to content
  • Advertisement

Archived

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

Verminaard

Direct Draw Clipper

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

im having a hard time setting up my clipper. i use andre lamoth''s function but it messes up during runtime. i need some help on setting up the clipper to my lpddsback, clipping from (0,0) to (640, 480)

Share this post


Link to post
Share on other sites
Advertisement
There''s something really fundamentally stupid about clippers; I can''t remember what it was, but it is such a stupid limitation that I just didn''t bother, and carried on using my own clipper code, which modifies the blt rects so they don''t extend off the surface.

I don''t have the DX SDK handy atm, so I can''t look it up.

TheTwistedOne
http://www.angrycake.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well another bad thing about clippers, is that you can´t use the BltFast() (or is it FastBlt()? can´t really remeber).
So unless your program is in Windowed-mode, I would stay away from clippers, and use my own code.

- But do as you feel right -

Share this post


Link to post
Share on other sites
You shouldn''t have to use BltFast anyway. There is no improvement in speed with hardware. And if you''re using Software blits, you aren''t getting speed with any blit.

Share this post


Link to post
Share on other sites
I should mention that getting a clipper on you pBack surface is easy in full-screen mode. It looks like this, though your variables may be different:

// Set clipper for back buffer, sized to the whole window
LPDIRECTDRAWCLIPPER pClipper;
m_pDirectDrawObj->CreateClipper(0,&pClipper,NULL);
// m_hWindow is your app window
pClipper->SetHWnd(0,m_hWindow);
m_pBackBuffer->SetClipper(pClipper);
pClipper->Release();

This, however, does NOT work if your app is in windowed mode. I''m still trying to figure that one out. In windowed mode, you get a clipper with a rect of (4,4,823,620) or something stupid like that. It counts your scrollbars and stuff.

-Michael

Share this post


Link to post
Share on other sites
thanks, yeh ive decided to do it a different way. im running in windowed so im just going to make the back buffer larger than the screen size.

and by the way, my directx has no hardware support and my BltFast''s are super fast.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!