Class ComputeProgram

Synopsis

#include <Source/Falcor/Core/Program/ComputeProgram.h>

class dlldecl ComputeProgram : public Program

Description

Compute program. See GraphicsProgram to manage graphics programs.

Inheritance

Ancestors: Program

Methods

~ComputeProgram
createCreate a new compute program
createFromFileCreate a new compute program from file

Source

Lines 35-64 in Source/Falcor/Core/Program/ComputeProgram.h.

class dlldecl ComputeProgram : public Program
{
public:
    using SharedPtr = std::shared_ptr<ComputeProgram>;
    using SharedConstPtr = std::shared_ptr<const ComputeProgram>;
    ~ComputeProgram() = default;
    /** Create a new compute program from file.
        Note that this call merely creates a program object. The actual compilation and link happens at a later time.
        \param[in] filename Compute program filename.
        \param[in] csEntry Name of the entry point in the program.
        \param[in] programDefines Optional list of macro definitions to set into the program.
        \param[in] flags Optional program compilation flags.
        \param[in] shaderModel Optional string describing which shader model to use.
        \return A new object, or an exception is thrown if creation failed.
    */
    static SharedPtr createFromFile(const std::string& filename, const std::string& csEntry, const DefineList& programDefines = DefineList(), Shader::CompilerFlags flags = Shader::CompilerFlags::None, const std::string& shaderModel = "");
    /** Create a new compute program.
        Note that this call merely creates a program object. The actual compilation and link happens at a later time.
        \param[in] desc The program description.
        \param[in] programDefines Optional list of macro definitions to set into the program.
        \return A new object, or an exception is thrown if creation failed.
    */
    static SharedPtr create(const Program::Desc& desc, const DefineList& programDefines = DefineList());
private:
    ComputeProgram() = default;
};





Add Discussion as Guest

Log in to DocsForge