Here's an interesting one...

Started by
0 comments, last by Chaster 24 years, 3 months ago
Okay folks, this is a weird one... I am a long time DX programmer (since DX 1 !!!) and I've just been flabbergasted at this problem I get with D3DX...

I am coding in straight C, not C++, so I am using the virtual table (lpVtbl->yadayadayada) to access the member functions. However, when I try to access the member functions of the D3DX context, I get a compile time error saying that the call is returning a pointer to a vertexbuffer!?!?

Example:
LPDIRECT3DDEVICE7 m_pD3DDev;
ID3DXContext* m_pD3DX;

m_pD3DDev = m_pD3DX->lpVtbl->GetD3DDevice(m_pD3DX);

This line gives me the following compile warning:

warning C4133: 'function' : incompatible types - from 'struct ID3DXContext *' to 'struct IDirect3DVertexBuffer7 *'

Anybody care to illuminate me?

Thanks,

Chaster

Advertisement
Well obviously that code is correct, and it seems to function properly. I tried it out, and I get the same warning. I'd say it's a definate flaw in Microsoft's well-written (heehawheehaw) D3DX.H.

This topic is closed to new replies.

Advertisement