Jump to content
  • Advertisement
Sign in to follow this  
zhangjiq1983

problem when use ID3DXEFFECT

This topic is 4059 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

Hi, I'm new to use Fx Frame,and I think I have a problem. I find a thread in this forum which shows a exactly same problem,but that thread do not have a reply. To make my problem clear to understand, I quote that thread below.
Quote:
I'm creating an LPD3DXEFFECT like this: D3DXCreateEffectFromFile(m_pDevice, L"G:\\Project\\Resources\\shaders\\materials\\DefaultLightmapped.fx", NULL, NULL, 0, NULL, &m_pEffect, NULL); When I do a D3DXEFFECT_DESC d3dEffectDesc; m_pEffect->GetDesc(&d3dEffectDesc); afterwards, the values in d3dEffectDesc appear to be correct. However, when I try to validate one of those techniques, I get this runtime error: Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. When I omit the ValidateTechnique call, I get a Unhandled exception at 0x0056ce8a in Game.exe: 0xC0000005: Access violation writing location 0x0063459c.
I use dxsdk feb 2005, becouse my company use window2000,and new sdk do not support win2000. I'm not sure wheather this is a problem or not. sorry for my poor english and thanks for your help.

Share this post


Link to post
Share on other sites
Advertisement
Which compiler are you using? The newer SDKs use calling method is not compatible with VC6, and possibly other compilers. VStudio 2K3 and 2K5 work. I think 2K2 works too, but I'm not certain.

Perhaps you have a mismatch of SDK headers and libs, telling your compiler to look in one location for headers, and another for libs, and between the two there is a problem. Ensure both the include and lib directories for the SDK you're using come first. Ensure they're listed before the compiler's header directories (Newer VStudios come with headers and libs for an older DXSDK).

I'm not sure if it could cause problems, but try updating your platform SDK. It's headers and libs may use the newer calling convention too, and there is a mismatch between the libs you're using and the libs D3DX was expecting to be linked to.

Share this post


Link to post
Share on other sites
thanks for your reply

first. I use VS2003 to work.
second. I find I just include d3d9.h and d3dx9.h but not include any dx lib. I can compile and link and run.
third. I didn't create d3d and device myself, I use RwD3DGetCurrentDevice() which is a renderware api. Is this mean renderware use a differnt dxsdk version from I use, so it go wrong ? any way to fix it?

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!