Jump to content
  • Advertisement
Sign in to follow this  
savail

Does texture arrays work in D3DXCreateTextureFromFileEx?

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

Hey
Im trying to create textures and save them in array by this way:
LPDIRECT3DTEXTURE9 texture[200];
for(int i = 0; i < image.size(); i++)
{
HRESULT hr = D3DXCreateTextureFromFileEx(d3dDevice, image.c_str(), D3DX_DEFAULT_NONPOW2, D3DX_DEFAULT_NONPOW2, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, D3DX_FILTER_NONE, D3DX_DEFAULT, 0xFFFFFFFF, &SrcInfo, NULL, texture);
}

but my IDE returns an error: cannot convert parameter 14 from 'LPDIRECT3DTEXTURE9' to 'LPDIRECT3DTEXTURE9 *'. I know that variable with type LPDIRECT3DTEXTURE9 is already a pointer but can't manage to make this work. I tried puting &texture and it also didn't work

Share this post


Link to post
Share on other sites
Advertisement
LPDIRECT3DTEXTURE9 * ppTexture is a pointer to a pointer. You have an array of pointers so you'll have to pass their address to the function.

I tried puting &texture and it also didn't work


Hmm, why not?

Share this post


Link to post
Share on other sites
ah Im stupid... there was also an error when I wrote &texture but it haven't regarded to this function but to place where I had written texture->release() without index. Now im having just problems with vectors ;p, Thanks a lot anyway!

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!