Does anyone have any ideas as to why D3DX11CreateEffectFromMemory() is returning E_NOINTERFACE in release build and causing me to crash, even though it works in debug mode and i can see my DX drawing fine?
[source lang="cpp"] std::ifstream fin("Shaders.fxo", std::ios::binary);
fin.seekg(0, std::ios_base::end);
int size = (int)fin.tellg();
fin.seekg(0, std::ios_base::beg);
std::vector<char> compiledShader(size);
fin.read(&compiledShader[0], size);
fin.close();
// Create Effect from Memory
// TODO: Move into renderer?
hrErrorCode = D3DX11CreateEffectFromMemory(&compiledShader[0], size, 0, g_MyRenderer.GetDevice(), &m_pEffectFile);[/source]
Here is my shader code btw
[source lang="cpp"]struct VS_INPUT
{
float4 pos : POSITION;
float4 color : COLOR;
};
struct PS_INPUT
{
float4 pos : SV_POSITION;
float4 color : COLOR;
};
PS_INPUT VS_Main( VS_INPUT In )
{
PS_INPUT vsOut = (PS_INPUT) 0;
vsOut.pos = In.pos;
vsOut.color = In.color;
return vsOut;
}
float4 PS_Main(PS_INPUT input) : SV_TARGET
{
return input.color;
}
technique11 SimplePassThrough
{
pass P0
{
// Set Shaders
SetVertexShader( CompileShader(vs_4_0, VS_Main() ));
SetGeometryShader( NULL );
SetPixelShader(CompileShader(ps_4_0, PS_Main() ));
}
}
[/source]
D3DX11CreateEffectFromMemory() fails in release build
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement