C# / DirectX / Effect problem
Hi,
Currently I making a c# project with DirectX. I wish to use effect class to use my own vertex and pixel shader.
effect0 = Effect.FromFile(device, "../../Shader/basicShader.fx", null, ShaderFlags.None, null);
effect0.Technique = "Simplest";
with the above source code, the shader is compiled properly, but when the application closes an error message pops up.
"An unhandled exception of type 'System.AccessViolationException' occurred in Microsoft.DirectX.Direct3DX.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Does someone know where it could come from ?
Thanks
Just a quick suggestion, have you tried loading the shader file using the content pipeline?
EDIT: Sorry, I thought I read XNA somewhere in your post, my bad. (4AM I should sleep :P).
EDIT: Sorry, I thought I read XNA somewhere in your post, my bad. (4AM I should sleep :P).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement