PDA

Click to See Complete Forum and Search --> : BitBlt > DirectDraw/DirectX


git
Oct 19th, 2000, 08:09 AM
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

Fox
Oct 19th, 2000, 09:27 AM
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 ;)

dangerousdave
Oct 19th, 2000, 01:58 PM
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/ASP/txtCodeId.4727/lngWId.1/qx/vb/scripts/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".

kedaman
Oct 19th, 2000, 04:20 PM
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.

Fox
Oct 20th, 2000, 12:28 AM
ah, would be nice if you can send it to me

git
Oct 20th, 2000, 12:33 AM
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

Fox
Oct 20th, 2000, 01:14 AM
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.

dangerousdave
Oct 21st, 2000, 12:13 PM
Acutally you can use DDraw in a none-exclusive mode in a picture box. Although it can limit certain factors of directdraw.