IDirectDraw or IDirectDraw4 ???

Started by
8 comments, last by ZomeonE 24 years, 3 months ago
You can call new functions with the latest objects.
Gandalf the Black
Advertisement
I see you're from Sweden Gandalf!
I'm from Stockholm!
If you're planning on writing for Win9x, use the latest interfaces. If you want to support WinNT also start with IDirectDraw and use QueryInterface to get the newest interface available. I believe I saw somewhere that WinNT will support above DX3 with the latest service pack but I'm not sure which version. If you want to be safe use QueryInterface.

------------------
Breakaway Games

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

By the way, if you use the C++ classes, are there new versions like DirectDraw7 or does the original one now refer to the most recent interface?
What is the best way to create a ddraw object in win9x?

QueryInterface or is there a easier way, like

LPDIRECTDRAW4 lpdd4;

???

alexmoura: In keeping with the COM standard, a new interface is always created so you can refer to any interface you want. There is an IDirectDraw7 interface now.

Zomeone: if you want to create a DirectX7 DirectDraw object you would do it like:

code:
LPDIRECTDRAW7 lpDirDraw;hRet = DirectDrawCreateEx(NULL, (VOID**)&lpDirDraw, IID_IDirectDraw7, NULL); 

QueryInterface is just to find the newest version so you can default to an older one if the newer one isn't found.


------------------
Breakaway Games

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Ok, thanks
Thanks, but how do I create a DirectDraw 6 object?
Is it better to use IDirectDraw4 instead of IDirectDraw?

Which is the fastest and best to write a game in?

What are the differences`?

I believe that Direct Draw Objects skipped from version 4 to 7 so there isn't a version 6 of the Direct Draw Object. But anyway, you create an original Direct Draw object without a version number, and then use QueryInterface with the original object to get the latest version of object.

This topic is closed to new replies.

Advertisement