Results 1 to 8 of 8

Thread: BitBlt > DirectDraw/DirectX

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Hiyas,

    I'm making a tilebased game which is using BitBlt. However, I've got so much BitBlting and masking going on, the game is starting to slow a bit (I have a P200, 64 meg ram, 2 meg 2D card, 4 meg 3DFX card), so I'm highly considering switching to DirectDraw/Direct X. A few questions...

    1. Would it be easy to switch from BitBlt to DirectDraw? I know BitBlt moderately well I suppose, and I find it easy to use.
    2. Could someone please show me some SIMPLE working code example(s) for DirectDraw, using transparent images and normal images?
    3. Does DirectDraw still use Picture Box's like BitBlt? How does it work? Can someone please explain the DirectDraw method?
    4. And finally, do I need the Direct X developers kit to use it in VB6? I don't really want to download it if it's over 100 megs...

    Thanks for any help/guidance.

    -Git

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    1) Depends on how you manage the graphics in your engine
    2) There's a DDraw demo on my website, but doesn't work on all computers
    3) Does BitBlt use pictureboxes? I tell you no! And DDraw of course also not!
    4) You need the tlb file (download at my page for example), the SDK just has a good help and some examples/tuts... you can order your copy from MS...

    Hope this helps

  3. #3
    Member
    Join Date
    Jun 2000
    Location
    UK
    Posts
    49
    1) I moved from BitBlt to DDraw not long ago. Quite easy once you get the set up done with. There is a lot more declaring of objects and creating surfaces, etc. There are a few new concepts as well, like surface descriptions, which once you grasp are quite easy

    2) As a matter of fact I wrote a commented code tutorial myself for someone in your position and posted it at planet-source-code here:

    http://www.planet-source-code.com/xq...s/ShowCode.htm

    Also there are other similar "commented code" tutorials that are possibly better. Check them out by running a search at http://www.planet-source-code.com for "Direct Draw 7".



    Dave.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    BTW, Fox, I have a fixed version of your demo somewhere, at least i have the parts initializing procedures that gave me errors the first time I ran them.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    ah, would be nice if you can send it to me

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Cool, thanks for your help guys, I'll check the sites out! =)

    Btw, Fox, yeah, PictureBox's - are you supposed to use one as a source and one as a target for BitBlting? (the source being invisible of course)

    -Git

  7. #7
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    In my BitBlt-projects I use 1 picturebox which is the front buffer. I would be able to replace it, but wouldnt make much sense as I think...
    DDraw is -of course- fullscreen so I can directly flip to screen.

  8. #8
    Member
    Join Date
    Jun 2000
    Location
    UK
    Posts
    49
    Acutally you can use DDraw in a none-exclusive mode in a picture box. Although it can limit certain factors of directdraw.
    Dave.

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