C# / DirectX / Effect problem

Started by
1 comment, last by vinceextense 16 years, 4 months ago
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
Advertisement
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).
No problem,
but does someone know what is the matter ?

This topic is closed to new replies.

Advertisement