Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualConny14156

Posted 01 March 2013 - 07:49 AM

Hi,

I just notice something very wierd today, when I try to return the std::map<string,ID3DResourceView*> value with help from map[std::string] I get the ID3D11ResourceView* pointer, but that only works when I return it two example I have in my code 

//While this work
return TotalTexture[textureName];


/*
This wont, Both is identical std::map<string,ID3D11ShaderResourceView*>, but the diffrent
is that this code down here insert the string instead with a null ID3D11ShaderResourceViewpointer. And I know its that line cause 
*/
ID3D11ShaderResourceView* pt;
pt = Model->Texture.Diffuse.Texture[Model->lastMaterial];	
Gfx->D3d11DevCon->PSSetShaderResources(0,1,&pt);//<---- Cause the next line here the map 
//had changed with one extra material with a null pointer. 

 

 


#1Conny14156

Posted 28 February 2013 - 07:23 PM

Hi,

I just notice something very wierd today, when I try to return the std::map<string,ID3DResourceView*> value with help from map[std::string] I get the ID3D11ResourceView* pointer, but that only works when I return it two example I have in my code 

//While this work
return TotalTexture[textureName];


/*
This wont, Both is identical std::map<string,ID3D11ShaderResourceView*>, but the diffrent
is that this code down here insert the string instead with a null ID3D11ShaderResourceViewpointer. And I know its that line cause 
*/
ID3D11ShaderResourceView* pt;
pt = Model->Texture.Diffuse.Texture[Model->lastMaterial];	
Gfx->D3d11DevCon->PSSetShaderResources(0,1,&pt);//<---- Cause the next line here the map 
//had changed with one extra material with a null pointer. 

 

 


PARTNERS