Jump to content
  • Advertisement
Sign in to follow this  
Razvan1024

DirectX 10 Problem

This topic is 3663 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

I have a little problem with a DirectX 10 application. I'm switching from DirectX 9.0 to DirectX 10 and I'm trying to learn by following the tutorials in the SDK Documentation. I got to the third tutorial and I can't get my effect file to compile. Can someone tell me what is the difference between my effect and the SDK effect? Here is my code: float4 VS(float4 Pos:POSITION):SV_POSITION { return Pos; } float4 PS(float4 Pos:SV_POSITION):SV_Target { return float4(1.0f,1.0f,0.0f,1.0f); } techinique10 Render { pass P0 { SetVertexShader(CompileShader(vs_4_0,VS())); SetGeometryShader(NULL); SetPixelShader(CompileShader(vs_4_0,PS())); } } and this is the tutorial effect: // // Vertex Shader // float4 VS( float4 Pos : POSITION ) : SV_POSITION { return Pos; } // // Pixel Shader // float4 PS( float4 Pos : SV_POSITION ) : SV_Target { return float4( 1.0f, 1.0f, 0.0f, 1.0f ); // Yellow, with Alpha = 1 } 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
The error string is :
simple.fx(9,14): error X3000: invalid target or usage string

I had a typo on the technique definition line.

Thanks for the help.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!