Jump to content
  • Advertisement
Sign in to follow this  
M4573R

Effect compilation error

This topic is 2863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to catch errors in a directx sample because they don't print out the shader compile errors. However I have to do it with unicode and I'm getting a bunch of japanese characters. This is how I'm doing it:


LPD3DXBUFFER buffer = NULL;

D3DXCreateEffectFromFile( pd3dDevice, str, NULL, NULL, dwShaderFlags, NULL, &g_pEffect, &buffer );

if(buffer != NULL)
{
MessageBox(NULL, (LPCWSTR)(buffer->GetBufferPointer()), NULL, NULL);
__debugbreak();
}

Share this post


Link to post
Share on other sites
Advertisement
Quote:
My bad for assuming their unicode function returned a unicode error.

Actually, that's an interesting observation. There are, indeed, both D3DXCreateEffectFromFileA and D3DXCreateEffectFromFileW versions. If you're not getting Unicode errors, makes one wonder why they defined both versions*.

Both versions use LPD3DXBUFFER which isn't typed for Unicode vs Multibyte, so the error return values will be the same regardless.

*Oops. The filename argument differs. Nevermind.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!