DirectDraw Backbuffer clipping windowed-mode [Archive] - C Board

PDA

View Full Version : DirectDraw Backbuffer clipping windowed-mode


beem
05-14-2002, 01:40 PM
I'm trying to clip surfaces blitted to a backbuffer for a windowed-mode directdraw application. The problem is that when I attach a clipper to the backbuffer, it clips the surfaces, just not in the right place. I'm using DirectDraw 7.

What happens is it clips the sufaces in a position relative to where the client area of the window is to the desktop. For intance if the client area of the window was at (0, 0) on the desktop, everything looks fine. And if the client area of the window was at (10, 10) the backbuffer clips sprites starting with those coordinates.

Why this is happening does not make sense. I'd appreciate it if someone would explain what I'm doing wrong, or direct me to a sample that clips surfaces being blitted to the backbuffer in a windowed-mode application.

Driveway
05-18-2002, 03:34 PM
What compiler are you using? :confused:

beem
05-18-2002, 03:56 PM
Microsoft Visual C++ 6.00

jdinger
05-18-2002, 08:53 PM
I've only used DirectDraw in Fullscreen mode but if your problem is that it's not clipping properly when moved I'd think you need to get your client rect and update your clipping/blitting with it (ie: using GetClientRect when you get a WM_PAINT message).

cozman
06-25-2002, 01:17 AM
I'm having clipping problems similar to what's described here.. when i set up my Direct Draw Clipper on my back buffer it will clip the wrong area in Windowed mode, and in Fullscreen mode a much stranger effect, my app is looking like a fullscreen window that is blinking very fast.