View Full Version: My Direct3D Wrapper

C++ Learning Community > Direct X > My Direct3D Wrapper


Title: My Direct3D Wrapper
Description: Provides basic initialization and li...


TheHawgMaster - August 21, 2003 08:51 PM (GMT)
Check out my Direct3D wrapper class; it provides basic initialization and lighting control in a single, very easy to use package. I made it for my own use a while back and have used it in a couple of projects. To use it you will have to have a copy of the DirectX7+ SDK.

Download it here.

dr voodoo - August 25, 2003 08:29 PM (GMT)
I can't download. It says "forbidden access".

PS:could you also tell me which *.libs I have to link in? I'm new to DX and for the moment I'm only looking for a simple example to test if the compiler works correct (but that *** +200MB SDK 9 doesn't even include such an example)

TheHawgMaster - August 25, 2003 11:46 PM (GMT)
The instructions for compiling are in a *.txt file inlcuded with the download. But you can't download it? I think I have it fixed now.

dr voodoo - August 26, 2003 09:44 AM (GMT)
It says this:

QUOTE
Forbidden
Remote Host: [212.24.201.110]

You do not have permission to access http://cpp-lover.gq.nu/d3d.zip
Data files must be stored on the same site they are linked from.

Thank you for using FreeServers


also I can't download any other thing from your site.

Dragon - August 26, 2003 06:18 PM (GMT)
I can't download it either.

QUOTE
Forbidden
Remote Host: [169.237.18.40]

You do not have permission to access http://cpp-lover.gq.nu/d3d.zip
Data files must be stored on the same site they are linked from.

Thank you for using FreeServers

TheHawgMaster - August 27, 2003 12:15 AM (GMT)
GO to the site again, it should work now.

dr voodoo - August 27, 2003 07:50 AM (GMT)
I can download it but can't compile it:
QUOTE
Error: Unresolved external 'DirectDrawCreateEx' referenced from C:\CPP\DX TEST\TEST.OBJ

I already had this proplem with other (DX8) source codes from the net. And I can't find a "DirectDrawCreateEx" function in the docs of SDK9, so I beleave MS replaced that function and removed it from the libs and Docs. But's still in the dlls so that older progs will run.

Oh well, thanks anyway.

TheHawgMaster - August 27, 2003 01:37 PM (GMT)
No, that is impossible; part of the definition of COM is that all methods of earlier interfaces must be supported in newer interfaces, and that all older interfaces must be included with new distributions. It provides flawless backwards compatibility. It should be in ddraw.lib.
QUOTE
But's still in the dlls so that older progs will run.
No it's just a wrapper around CoCreateInstance, it is not in the DLLs at all.

dr voodoo - August 27, 2003 02:28 PM (GMT)
Yes you are right the lib does contain a "DirectDrawCreateEx". I just opened it with a hexeditor.

I messed around a bit with the compiler instructions and it seems that it now works. But I'm getting an other error.
QUOTE
Error E2090 Direct3D2.cpp 54: Qualifier 'IDirectDrawFactory' is not a class or namespace name in function Direct3D::Init(HWND__ *,int,int)

This sort of error most of the time happens because of a missing header. So could you please tell me in which header "IDirectDrawFactory" is stored?

TheHawgMaster - August 28, 2003 08:22 PM (GMT)
IDirectDrawFactory? Never heard of it. And I certainly do not use it in my code. But maybe they changed something in DX9; try looking for IDirectDrawFactory in your DX docs.

Try checking line 54 in Direct3D.cpp or something, look for anything that could be a macro that would turn into something like IDirectDrawFactory.

dr voodoo - August 28, 2003 08:47 PM (GMT)
Sorry, I just remebered that I hade changed something to react to this error :-x
QUOTE
Error E2090 Direct3D2.hpp 54: Qualifier 'DirectDraw' is not a class or namespace name in function Direct3D::Init(HWND__ *,int,int)

I copied again your original code (to make sure I haven't changed anything else) but now I'm getting again the:
QUOTE
Error: Unresolved external 'DirectDrawCreateEx' referenced from C:\CPP\DX TEST\TEST.OBJ

Error. Oh well I give up on this code.

Thanks anyway for your help.




* Hosted for free by InvisionFree