• Advertisement

Archived

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

? about LPDIRECTDRAW and LPDIRECTDRAW7

This topic is 5153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m taking a game programming course for school and the book we are using is "Introduction to Computer Game Programming with DirectX 8.0" by Ian Parberry. He basically writes a 2D game based on Direct Draw and Direct Sound and tells how to do it in the book. Anyways in his code to create a DirectDraw interface he does this: LPDIRECTDRAW lpDirectDrawObject; DirectDrawCreate( NULL,&lpDirectDrawObject,NULL ); The only problem with this is he uses LPDIRECTDRAW and DirectDrawCreate(). Wouldn''t this return a pointer to a Direct Draw 1.0 interface? According to what I''ve read in LaMothe''s Guru''s book it either has to be done liek this: LPDIRECTDRAW lpDirectDrawObject; LPDIRECTDRAW7 lpDirectDrawObject7; DirectDrawCreate( NULL,&lpDirectDrawObject,NULL ); lpDirectDrawObject->QueryInterface( IID_IDirectDraw1, &lpDirectDrawObject7); or the more easily done: LPDIRECTDRAW7 lpDirectDrawObject7; DirectDrawCreateEx(NULL, (void **)&lpDirectDrawObject7, IID_IDirectDraw7, NULL); I was wondering if anyone would know if he was getting a 1.0 interface or not. And if he is, why isn''t he upgrading it to a 7.0 one? Is there a big difference between the two or maybe just nothing big for what he is doing? Also is there a reason why I cannot find these functions in the DirectX documentation?

Share this post


Link to post
Share on other sites
Advertisement
I don't know what version it is, but my best guess is that by using the older interfaces he can guarantee that anyone* using the book can run the examples. I doubt he's trying to be bleeding-edge, so requiring DirectX 7 to do simple tasks is overkill.

EDIT: * - Anyone that has any version of DirectX installed.

[edited by - Creation on January 13, 2004 11:57:59 PM]

Share this post


Link to post
Share on other sites
Well thats kind of odd you would think he would use a 7.0 interface. There must not be that great of a difference between the two for what he is using it for.

Share this post


Link to post
Share on other sites

  • Advertisement