IDirectDraw2 or IDirectDraw3 or IDirectDraw4 ???

Started by
7 comments, last by elmo 24 years, 1 month ago
hello can anybody tell me the different between IDirectDraw and IDirectDraw2 and IDirectDraw3 and so on.... are these the different versions of directx... in my code i use for ex. LPDIRECTDRAW lpdd = NULL; LPDIRECTDRAWSURFACE lpddsprimary = NULL; and not LPDIRECTDRAW2 lpdd = NULL; LPDIRECTDRAWSURFACE2 lpddsprimary = NULL; so what is the differenz and where to use it... my prog runs fine using the first lines of code... thanks for any help elmo
Advertisement
The numbers indicate the interface and structure version.
The higher the number, the newer the version.

If you want the game to run on NT, you should use the oldest versions of the interfaces (ie. IDirectDraw3 or older). Else use the newest, IDirectDraw7.
All interfaces are backwards compatible.

*Sparkle*



Edited by - Sparkle on 3/16/00 6:14:04 AM
The above poster is correct except for the fact that it''s not true that all interfaces are backwards compatible. As a matter of fact, different interfaces are strictly spoken not compatible at all (Com standard).

Each interface is completely apart from the other. It''s true that the Components provide the older interfaces for backwards compatibility. But that''s a different thing.

Maybe that''s what you meant. Don''t want to be a geek but this is an often made mistake when doing COM (imho).

Mmm, i might only made things more complicated now. Sorry,

Jaap Suter
____________________________Mmmm, I''ll have to think of one.
What I meant was that if you use IDirectDraw7, it will have all the functionality of the previous interfaces, but with additional functionality (and perhaps some changes).

Please correct me if I''m wrong.

*Sparkle*

Yeah, i understand that is what you meant and you are correct in that.

But indeed you now say: "and some changes", which is an entirely different thing then backwards compatibility.

Anyway, we''re going offtopic now and your original answer was ok (besides the backwards compatibility)!

I''m sorry for being so picky

Jaap Suter

____________________________
Mmmm, I''ll have to think of one.
____________________________Mmmm, I''ll have to think of one.
That''s okay.
I realise I was very wrong about the ''changes'' stuff.
So whoever reads this, just pretend it was never written

And even further off topic: Does anyone know about some easy to understand tutorials on COM? I''d really like to learn how to make interfaces.

*Sparkle*

You can forget those COM tutorials.
I once started writing some but quit with it because there was no interest for them from the amateur game scene. I looked over the entire internet for tutorials on them but couldn''t find them anywhere. The ones i did find where on activeX controls or OLE (features build on top of COM).

I suggest you buy a book. Essential COM and Inside COM are both good books (personally i like Inside COM more because it''s more practical, but I''ve got both of them and Essential Com is good too). I fully enjoyed these books and even if you are never going to use COM you will still learn lots and lots of cool things from the books cause a lot of it applies to standard C++ coding as well. It''s more a frame of mind then a standard way of doing things. It''s beautifull.

If you have any questions regarding COM just mail me!! I''m not an expert on COM but I do understand it and i''ve written some components myself. Toobad my employer didn''t want our new project into components.

Anwyay goodluck!

Jaap Suter

____________________________
Mmmm, I''ll have to think of one.
____________________________Mmmm, I''ll have to think of one.
in response to "Idd, Idd2 or Idd3?"
I say:
IDirectDraw7 =)
Using the latest version will have more bugs fixed and win 2k will support dx8.
___________________________Freeware development:ruinedsoft.com
aha...
thanks for all the answers...
so i think its better to use the latest version!

elmo

This topic is closed to new replies.

Advertisement