Original Post
Im trying to make a particle system. It uses shaders. Its the one from the book "Introduction to 3D Game Programming with Directx9.0c a Shader Approach" by Frank Luna.
I load in the effects file with the following
When i debug i get an error on the errors attribute that says "Error: expression cannot be evaluated". the hr thing there is a problem for me as well. I made a post about that here:[color=#1C2837][size=2]http://www.gamedev.net/topic/597696-hrtrace-directx-11/page__p__4786036#entry4786036. I dont really understand what Erik meant in his replay. But making having hr = meant i could compile and run the code (i know how stupid it is to do that, but i was going to quick for my own good at the time). Could this be causing a problem? though mFX doesnt have the Error: expression cannot be evaulated. That seems to have a value alrigh
Next in my code i try to do the Gets for the effects file:
But while debugging after each one i see each mh (mhTech, mhWVP, etc) has Error: expression cannot be evaluated. I assume this means that the efffects file didnt load properly and so anything using mFX is gonna mess up. So anyone know what is causing this. Or if it is my use of hr does anyone know how to fix this?
EDIT: I get the Error: expression cannot be evaluated before the code even executes on them "mhxxxx" variables. Thats not normal is it? I have them defined as D3DXHANDLE mhTech; Or are they a bad pointer cos Handles just are like that until they are given a value?
Cheers.
I load in the effects file with the following
ID3DXBuffer* errors = 0;
hr = D3DXCreateEffectFromFile(Device, fxName.c_str(), 0, 0, D3DXSHADER_DEBUG, 0, &mFX, &errors);
if( errors )
MessageBox(0, (char*)errors->GetBufferPointer(), 0, 0);When i debug i get an error on the errors attribute that says "Error: expression cannot be evaluated". the hr thing there is a problem for me as well. I made a post about that here:[color=#1C2837][size=2]http://www.gamedev.net/topic/597696-hrtrace-directx-11/page__p__4786036#entry4786036. I dont really understand what Erik meant in his replay. But making having hr = meant i could compile and run the code (i know how stupid it is to do that, but i was going to quick for my own good at the time). Could this be causing a problem? though mFX doesnt have the Error: expression cannot be evaulated. That seems to have a value alrigh
Next in my code i try to do the Gets for the effects file:
mhTech= mFX->GetTechniqueByName(techName.c_str());
mhWVP = mFX->GetParameterByName(0, "gWVP");But while debugging after each one i see each mh (mhTech, mhWVP, etc) has Error: expression cannot be evaluated. I assume this means that the efffects file didnt load properly and so anything using mFX is gonna mess up. So anyone know what is causing this. Or if it is my use of hr does anyone know how to fix this?
EDIT: I get the Error: expression cannot be evaluated before the code even executes on them "mhxxxx" variables. Thats not normal is it? I have them defined as D3DXHANDLE mhTech; Or are they a bad pointer cos Handles just are like that until they are given a value?
Cheers.