Jump to content
  • Advertisement
Sign in to follow this  
sms-timing

SlimDX: Effect.FromFile

This topic is 3560 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 don't know what the heck I'm doing wrong but for some reason is my Effect.Description.TechniqueCount always 0. The Effect doesn't give me a compilationerror and when cut the fx file contents and paste it in SimpleTriangle.fx, it works. The fx file is as simple as it gets. I'm using SlimDX, november release, D3D10 on a vista 32. kind regards Alexander struct VS_IN { float4 Pos : POSITION; float4 Col : COLOR; }; struct PS_IN { float4 Pos : SV_POSITION; float4 Col : COLOR; }; PS_IN VS( VS_IN aInput ){ PS_IN Output; Output.Pos = aInput.Pos; Output.Col = aInput.Col; return Output; } float4 PS( PS_IN aInput ) : SV_Target{ return aInput.Col; } technique10 Render{ pass P0{ SetVertexShader( CompileShader( vs_4_0, VS() ) ); SetGeometryShader( NULL ); SetPixelShader( CompileShader( ps_4_0, PS() ) ); } }

Share this post


Link to post
Share on other sites
Advertisement
Solved

It took me an evening to fiquere out what was going wrong, so I reply to my own post with the sollution.

The problem was that the fx file was created by Visual studio. Therefor the file was in unicode. After converting the file to Ansi with notepad++, the descriptions where loaded.

Maybe it would be a good idea to raise an exception if the file was in unicode? Everything seems to go correct, but it simply doesn't work.

kind regards

Alexander

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!