Jump to content
  • Advertisement
Sign in to follow this  

Effect compilation error

This topic is 2955 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:


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

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

Share this post

Link to post
Share on other sites
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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!