Can't compile with DX8 support

Hi,

I’m trying to compile panda3d (using makepanda) with both dx9 and dx8 support. Compiling it with dx9 support is no problem, but I can’t get the dx8 part to compile.
here’s the error I get:

cl /wd4996 /Fobuilt/tmp/dxgsg8_composite.obj /nologo /c  /Ithirdparty/win-python/include /I"sdks/directx8/include" /Ibuilt/tmp /Ipanda/src/dxgsg8 /Ipanda/metalibs/pandadx8 /Ibuilt/include /MD /Zi /Ox /Ob2 /DFORCE_INLINING /DNDEBUG /GL  /Fdbuilt/tmp/dxgsg8_composite.pdb /DBUILDING_PANDADX /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 panda/src/dxgsg8/dxgsg8_composite.cxx
dxgsg8_composite.cxx
...\dxTextureContext8.cxx(1156) : error C2664: 'D3DXFilterTexture' : cannot convert parameter 1 from 'IDirect3DBaseTexture8 *' to 'LPDIRECT3DTEXTURE8'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
...\dxTextureContext8.cxx(1324) : error C2664: 'D3DXFilterTexture' : cannot convert parameter 1 from 'IDirect3DBaseTexture8 *' to 'LPDIRECT3DTEXTURE8'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Storing dependency cache.
Elapsed Time: 26 min 0 sec

So the problem is that D3DXFilterTexture function in d3dx8 can’t use the BaseTexture8 pointer, but instead expects a (2d)texture pointer.

In the dxgsg9, more or less the same code is used, but there the D3DXFilterTexture function actually accepts the base pointer of type IDirect3DBaseTexture9.

Since I already had to jump through a few loops to get to this point, I figured I’d rather ask how this is supposed to work.
My best bet is that I’m using an too old DX8 sdk… (The sdk I’m using seems to be the original DX 8.0, from Oct. 2000.)

There seems to be a DX 8.0b sdk from 2001, but I can’t download that anywhere.

How do you guys at Disney or CMU build the DX8 support?
The new DX SDK also has some headers/libs for DX8, but not for D3DX8… :frowning:

BTW, here some info on my config:

source version: 1.4.1
visual studio: 2005 express
build-system: makepanda
os: windows vista

Thanks in advance,

Erik

In the command-line you posted, I see the compiler option

-Isdks/directx8/include

That would only be there if you have a copy of my collection of sdks. So therefore, you’re using the same sdk I use whenever I build panda. I can’t imagine why it’s not working for you. Let me think about it some more.

Ahem, well, after installing the DX8 SDK, makepanda wasn’t able to locate it automatically.
I found your sdks workaround in makepanda and thus just created a sdks directory with a directx8 subdirectory and copied my dx8 sdk into that directory.
So basically, I hacked things a bit. Otherwise I couldn’t have even started compiling.

I believe the trouble is caused by my very old DX8 SDK. You probably use a newer version.

Is there a way you could share that version with me?

Cheers,

Erik

I use dxsdk_oct2004. That was the last SDK to include DirectX8 support. You can find it by google.

Thanks Josh, using the Oct2004 SDK did the trick.

Cheers,

Erik