• Advertisement
Sign in to follow this  

D3DXCreateTextureFromFile exeption

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

EDIT: Stupid me i called it on a object that was just a pointer :/ original: i am trying out the sprites in D3DX and am right now trying to load a texture, but it seams it throws an exeption in the following code when i enter an illegal filename, i get the error. but if i use a file that exist i get an exeption, or at least that is what vs.net tells me texture is defined like this: LPDIRECT3DTEXTURE9 texture;
bool Object::loadTexture(char *filename)
{
	if( D3DXCreateTextureFromFile( p_d3ddevice, filename, &texture ) != D3D_OK ){
    MessageBox(hWnd, filename, "Could not load texture", 0);
		return false;
	}

	return true;
}


[Edited by - zauron on February 16, 2005 7:05:51 AM]

Share this post


Link to post
Share on other sites
Advertisement
did a search seams like someone had this problem before

link

tried adding the texture variable as a local variable in the loadTexture function, that worked as it should, but that is not what i want.

The place i call the loadTexture code is in a class that inherits it from Object, can that cause this?

Share this post


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

  • Advertisement