Archived

This topic is now archived and is closed to further replies.

ZomeonE

IDirectDraw or IDirectDraw4 ???

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites