Attaching Clipper in Windowed Mode

Started by
7 comments, last by vbisme 23 years, 4 months ago
Do you attach DD Clipper to the backbuffer or primary buffer in windowed mode? Or both?
Advertisement
I attach DirectDrawClipper object to primary(front) surface only under Windowed mode. Because it is quite easy for us to substitute our own code for the clipper attached to back or offscreen surface.

My 3D application does not need backsurface''s DirectDrawClipper. ;-)

Kwanji
In 2D, do you use clippers in fullscreen mode also?
No, I don''t. But if your application uses dialogbox or messagebox in fullscreen mode, the DirectDrawClipper which is attached to primary surface helps you.

My application uses neither. :D

Kwanji
When creating a clipper, it requires that you specify a RECT. How do I calculate the "client area" RECT of the window? The area where the actions take place, excluding title bar, border and such.
You need not calculate the RECT of ''client area''. Because IDirectDrawClipper::SetHWnd() method associates clipper with handle of window, and makes it retrieve valid area automatically.

Hope this helps you

Kwanji, from Japan
If you had multiple windows on the primary buffer you were blitting to, you would need to do a SetClipper on the primary buffer with the correct clipper before each back->primary blit...

I can''t think of a good reason to attach a clipper to the back buffer, but you may need a seperate clipper for each back buffer (to be used on the primary...)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Ah, DX8 does it all for you...


Please state the nature of the debugging emergency.


sharewaregames.20m.com

Yeah, but you can''t get a pointer to the memory of a surface!
Or is there a bonus function to do it now? (used to be Lock)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement