I'm having exactly the same problem...
I have a class with the windows and xbox 360 bytecode of the effect, like this:
| internal static byte[ Code = new byte[ { |
| #if XBOX360 |
| // Xbox bytecode |
| #else |
| // Windows bytecode |
| #endif |
| }; |
And I'm creating the Effect using the compiled bytecode:
| Effect effect = new Effect(graphicsDevice, SkinnedModelEffectCode.Code, CompilerOptions.None, null); |
Then, I get the following error:
"An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll
Additional information: This resource could not be created."
It works fine on the Windows but not on the Xbox. I checked and I'm sure that the program is using the Xbox 360 bytecode.
I'm using the Effect Compiling Tool to generate both bytecodes. I looked at its source code and both bytecodes appears to be generated correctly...
Could it be the shader? Despite the fact that it is not generating any error during compiling?
Bruno Evangelista,
Homepage |
XNAnimationZiggyware Article:
Playing Nice Animations with XNAFor what will it profit a man if he gains the whole world and forfeits his soul? Or what will a man give in exchange for his soul?, Matthew 16:26