   id3deffect-settexture() keeps failing?
  both ID3DEffect->SetTExture and SetMatrix keep failing. What exatcly would cause these to fail?I have an effect file with sampler2D Texture;float4x4 WorldView;and I cal the functions like soeffect->SetTexture( "Texture", mytexture );effect->SetMatrix( "WorldView", &mymatrix );I've been staring at the spelling for an hour so I'm sure that's not the problem. I'd post my code but without knowing what you might be looking for I dont want to post hundreds of lines of code.I you want to look at anytthing just ask.thanks in advance.   
  Hi,I see that you're trying to set a "sampler" instead of a texture :) Please change your code like this:texture myTexture;sampler2D smpMyTexture = sampler_state{   texture = <myTexture>;   MinFilter = LINEAR;   MagFilter = LINEAR;   AddressU = WRAP;   AddressV = WRAP;};float4x4 myMatrix;You can change Filter and Address values in sampler_state. They are just for example.Hope this helps.   ;Quote:Original post by programci_84Hi,I see that you're trying to set a "sampler" instead of a texture :) Please change your code like this:texture myTexture;sampler2D smpMyTexture = sampler_state{   texture = <myTexture>;   MinFilter = LINEAR;   MagFilter = LINEAR;   AddressU = WRAP;   AddressV = WRAP;};float4x4 myMatrix;You can change Filter and Address values in sampler_state. They are just for example.Hope this helps.OK I added that in but I'm getting the same errors as before. I'm still trying to get the debugger to work but it seems anytime I use a std::string it breaks and throws an access violation.;  my bad I was still trying to set the sampler as my texture, changed it to settexture("tex", texture) and it works.Setmatrix was a bad handle = bad spelling... the simplest of things take for ever to figure out.