开发者

HLSL error X3086: DX9-style 'compile' syntax is deprecated in strict mode

开发者 https://www.devze.com 2023-01-25 05:32 出处:网络
Hey, I get this error: error X3086: DX9-style \'compile\' syntax is deprecated in strict mode When compiling a directx effect with this code:

Hey, I get this error:

error X3086: DX9-style 'compile' syntax is deprecated in strict mode

When compiling a directx effect with this code:

hr=D3DX11CompileFromFile( TEXT("shaders\\basic.fx"), NULL, NULL, NULL,"fx_5_0", D3DCOMPILE_ENABLE_STRICTNESS, 0, NULL, &pBlob, &pEr开发者_如何学JAVArorBlob, NULL );

I'm pretty sure it's complaining about this:

technique11 basic
{
 pass p0
 {
  VertexShader = compile vs_5_0 vsMain();
  PixelShader = compile ps_5_0 psMain();
 }
}

So what am I supposed to use instead of compile?


Try:

technique11 basic
{
    pass p0
    {
        SetVertexShader( CompileShader( vs_5_0, vsMain() ) );
        SetPixelShader( CompileShader( ps_5_0, psMain() ) );
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消