Results 1 to 4 of 4

Thread: Direct Draw clippers

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    UK
    Posts
    49

    Question Direct Draw clippers

    OK, so I'm lazy and cant be bothered searching for a tutorial.
    I need to know how to set up a clipper to cover the whole of a screen so that sprites leaving the screen dont just disappear but leave the screen bit by bit.
    Can anyone post an example or put a link to a decent example or tutorial on the net, please.

    Thanks.
    Dave.

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I am looking for the same thing at the moment and was about to post a thread on it...
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    UK
    Posts
    49
    Well if you find anything PLEASE post it here!

    I have managed to get a clipper working sort of now, but I have my program in exclusive mode and the clipper needs a hWnd to attach to, giving it the form's hWnd causes the title bar to flicker at the top of the screen - not what I want. I need to get a clipper in exclusive (full screen) mode.

    If your not in fullscreen and you dont need multiple of them then they are really quite easy to use:

    First declare the clipper:

    Code:
    Public ddc As DirectDrawClipper
    Now set up the clipper and attach it to the surface:

    Code:
    'Set up the clipper
    Set ddc = dd.CreateClipper(0)
    ddc.SetHWnd frmMain.hWnd
    'Attach the clipper to the surface
    DirectDrawSurf.SetClipper ddcScreen
    Dave.

  4. #4
    New Member ...:::Circle:::...'s Avatar
    Join Date
    Sep 2000
    Location
    Norway
    Posts
    4

    Is this what you are looking for?

    Are you looking for a scrolling background or something. I've got an example, but it's too big to post.

    So you have to do this to make it work. Make 3 .jpg pictures (640*480) and name them “surface0.jpg”, “surface1.jpg”, and “surface2.jpg”. Put them in the same directory ass the VB files I have attached.
    Attached Files Attached Files
    ...:::Circle:::... You will always come back to the start.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width