Jump to content
  • Advertisement

Archived

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

Chaster

Here's an interesting one...

This topic is 6783 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!?!?

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

Share this post


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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!