Jump to content
  • Advertisement
Sign in to follow this  
m4gnus

cannot convert from 'PDIRECT3DTEXTURE9 (void)' to 'LPDIRECT3DBASETEXTURE9'

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

Hi I get this error: f:\Programmiertes\nGin\ngMaterial.cpp(77): error C2664: 'ID3DXEffect::SetTexture' : cannot convert parameter 2 from 'PDIRECT3DTEXTURE9 (void)' to 'LPDIRECT3DBASETEXTURE9' on this line: pEffect->SetTexture("tex0",textures->getD3DTexture); getD3DTexture returns a PDIRECT3DTEXTURE9. What's wrong with this line? regards, m4gnus

Share this post


Link to post
Share on other sites
Advertisement
What's wrong is that you need to return an LPDIRECT3DTEXTURE9, but you're returning a PDIRECT3DTEXTURE9. Note the L.

Share this post


Link to post
Share on other sites
as far as i know LPDIRECT3Dblabla is the same as PDIRECT3D but even if that isn't correct, i tried both...

regards,
m4gnus

Share this post


Link to post
Share on other sites
pEffect->SetTexture("tex0",textures->getD3DTexture);
Should be:
pEffect->SetTexture("tex0",textures->getD3DTexture());
Otherwise you're trying to pass a function to SetTexture(). Which won't go down too well with the compiler [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!