• Advertisement


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

Here's an interesting one...

This topic is 6698 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

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!?!?

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?



Share this post

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

Share this post

Link to post
Share on other sites

  • Advertisement