• 效果编译是一个规则的文件,允许汇编Direct3D/HLSL效果文件直接在Visual Studio. 默认的方法是汇编。外汇文件在运行,但作为文件越来越大,编制时间迅速增加。 然而,在大多数情况下,它不需要重新编译的效果,每次运行的应用程序。

    通常你会打电话D3D10CompileShader(..)或类似功能的电话fxc.exe 内部。 如果你想Visual Studio采取的编写过程中,你必须添加一个自定义建立的规则。 它会被称为只有在来源文件已经改变,因为最后汇编或汇编的版本不存在。

    在编写过程中可以调整使用"财产页"每个文件分别如果它是一个C/C++或其他一些已知的文件的类型。 输出文件是二进制的效果数据文件和具有扩展。cfx(任何其他endling是有效的,太)。 它可以读通过D3DX10CreateEffectFromFile(..)为例。

  • प्रभाव संकलक एक नियम है फ़ाइल की अनुमति देता है कि आप संकलन करने के लिए Direct3D / HLSL प्रभाव सीधे फाइल में Visual Studio. डिफ़ॉल्ट तरीका है करने के लिए सभी संकलन .fx फाइल क्रम में है, लेकिन फ़ाइलों के रूप में बड़ी हो रही हैं, संकलन समय के साथ तेजी से बढ़ जाती है. हालांकि, ज्यादातर मामलों में यह आवश्यक नहीं है फिर कंपाइल करने के लिए प्रभाव आप हर समय चलाने के लिए अपने आवेदन पत्र है ।

    आम तौर पर आप फोन होगा D3D10CompileShader(..) या एक समान समारोह कहता है जो fxc.exe आंतरिक रूप से है । यदि आप चाहते हैं दृश्य स्टूडियो करने के लिए लेने के संकलन की प्रक्रिया आप को जोड़ने के लिए एक कस्टम बनाने के नियम. यह कहा जाता हो जाएगा केवल यदि स्रोत फ़ाइल बदल गया है के बाद से पिछले संग्रह या संकलित संस्करण मौजूद नहीं है ।

    के संकलन की प्रक्रिया को समायोजित किया जा सकता का उपयोग "संपत्ति पृष्ठों" के लिए हर फाइल अलग-अलग रूप में अगर यह था एक C/C++ या कुछ अन्य ज्ञात फ़ाइल प्रकार. आउटपुट फ़ाइल है एक द्विआधारी प्रभाव डेटा फ़ाइल है और विस्तार .cfx (किसी भी अन्य endling मान्य है, भी). यह पढ़ा जा सकता है में से D3DX10CreateEffectFromFile(..) उदाहरण के लिए.

  • Effect Compiler is a rule file that allows you to compile Direct3D / HLSL effect files directly in Visual Studio. The default way is to compile all .fx files at runtime, but as files are getting bigger, compile time increases rapidly. However, in most cases it is not required to recompile the effects every time you run your application.

    Usually you would call D3D10CompileShader(..) or a similiar function which calls fxc.exe internally. If you want Visual Studio to take of the compiling process you have to add a custom build rule. It will be called only if the source file has changed since the last compilation or the compiled version does not exist.

    The compiling process can be adjusted using the "Property Pages" for every file individually as if it was a C/C++ or some other known file type. The output file is a binary effect data file and has the extension .cfx (any other endling is valid, too). It can be read in by D3DX10CreateEffectFromFile(..) for example.