I am confuse about D3DCompileFromFile RRS feed

  • 问题

  • HRESULT WINAPI D3DCompileFromFile(
      in       LPCWSTR pFileName,
      in_opt   const D3D_SHADER_MACRO *pDefines,
      in_opt   ID3DInclude *pInclude,
      in       LPCSTR pEntrypoint,
      in       LPCSTR pTarget,
      in       UINT Flags1,
      in       UINT Flags2,
      out      ID3DBlob **ppCode,
      out_opt  ID3DBlob **ppErrorMsgs

    I am confused about the function, could someone show a sample code about it?


    Therer is my code

    ID3DBlob* pVSBlob = nullptr;
     ID3DBlob* pErrorBlob = nullptr;
     hr = D3DCompileFromFile(TEXT("tutorial2.fx"), 0, 0, "VS_Main", "vs_4_0",
      shaderFlags, 0, &pVSBlob, &pErrorBlob);

    • 已编辑 迴梦游仙 2014年8月11日 5:18 forgeted show the code
    2014年8月11日 5:16