Hi guys.
So I'm having a slight problem here, I've just started on the shader reflection as it might prove useful for me, but some obstacles came along the way, some were fixed, but not this one.
How I'm attempting it:
// Compile e.g. the Vertex Shader
D3DX11CompileFromFile(...)
// Create the VS Shader
dev->CreateVertexShader(...)
// Set up the shader reflection
ID3D11ShaderReflection* pReflector = NULL;
HRESULT hr =
D3DReflect( Passes[p].VS->GetBufferPointer(), Passes[p].VS->GetBufferSize(), IID_ID3D11ShaderReflection, (void**)&pReflector);
if (FAILED(hr)) // I didn't directly just check the returned HR, because it's used later...
{
std::string error = std::string((std::string)"Shader Reflection Failed, Error:\n" + _com_error(hr).ErrorMessage()).c_str(); // Yeah, this is a bit ugly, but it works.
CE_ERROR(error.c_str(), "Shader Error");
}
D3D11_SHADER_DESC desc;
pReflector->GetDesc( &desc );
So what happens is that the HR fails, with the following error message: (Please keep in mind that the message was in another language, so this is just a rough translation):
This interface is not supported
So my questions are:
- What have I done wrong?
- (Bonus) Is there any way of setting the error messages to english?
I've stumbled across several threads, like this one:
http://xboxforums.create.msdn.com/forums/t/63358.aspx
But unfortunately I didn't get it to work.
Thank you for your time.
-MIGI0027