Thread: DirectDraw Backbuffer clipping windowed-mode

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    8

    DirectDraw Backbuffer clipping windowed-mode

    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.

  2. #2
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    What compiler are you using?

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    8
    Microsoft Visual C++ 6.00

  4. #4
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    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).

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  2. force windowed mode
    By X PaYnE X in forum Game Programming
    Replies: 2
    Last Post: 05-30-2005, 09:48 PM
  3. DX Windowed Mode Double Buffering
    By curlious in forum Game Programming
    Replies: 2
    Last Post: 10-10-2003, 08:16 AM
  4. Windowed DirectDraw problems
    By Magos in forum Windows Programming
    Replies: 0
    Last Post: 01-20-2003, 01:00 PM
  5. Windowed Mode Output
    By phatslug in forum Game Programming
    Replies: 5
    Last Post: 06-13-2002, 09:44 PM