Sign in to follow this  

Shader errors not being written

Recommended Posts

    ID3DXBuffer *pBuffer = NULL;
    _pengine = pengine;

    if(FAILED(D3DXCreateEffectFromFile(_pengine->getDriver()->getDevice(), "bloom.fx", NULL, NULL, 
      _pengine->ManualErr("The effect 'bloom.fx' failed to compile with the following errors: ", 
That code compiles and runs fine in Debug mode, but in Release mode, the bloom.fx file fails to compile. However, mysteriously enough, the *pBuffer pointer gets set to NULL after D3DXCreateEffectFromFile() has been called, which results in a null reference error when the error output is accessed. This is, to say the least, incredibly annoying. I have deliberately created a syntax error in the FX file and confirmed that the pBuffer functions normally while in Debug mode. In release mode, however, it just doesn't work. I can't figure out what in the world is wrong with the FX file and I can't figure out why the heck the pBuffer would get set to NULL after D3DXCreateEffectFromFile() gets called. Does anyone here have a clue as to why this would happen?

Share this post

Link to post
Share on other sites
I faced the same problem.

Have you tried using PIX? I used to get D3DERR_INVALIDCALL.. In that case, try giving the COMPLETE path of the file bloom.fx. Mine worked when I did that.


Share this post

Link to post
Share on other sites
The debug runtimes will output that 'file not found' error message and any compile errors. Yes, best to catch it in-code and output it yourself but just in case you can't/forget there is another way [wink]


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this