Function create

Summary

#include <Source/Falcor/RenderGraph/BasePasses/ComputePass.h>

(1) static SharedPtr create(const std::string &filename, const std::string &csEntry="main", const Program::DefineList &defines=Program::DefineList(), bool createVars=true)

(2) static SharedPtr create(const Program::Desc &desc, const Program::DefineList &defines=Program::DefineList(), bool createVars=true)

Function overload

Synopsis

#include <Source/Falcor/RenderGraph/BasePasses/ComputePass.h>

static SharedPtr create(const std::string &filename, const std::string &csEntry="main", const Program::DefineList &defines=Program::DefineList(), bool createVars=true)

Description

Create a new compute pass from file.

Parameters:

[ in ] filename - Compute program filename.

[ in ] csEntry - Name of the entry point in the program. If not specified "main" will be used.

[ in ] defines - Optional list of macro definitions to set into the program.

[ in ] createVars - Create program vars automatically, otherwise use setVars().

Return
A new object, or throws an exception if creation failed.

Source

Lines 42-47 in Source/Falcor/RenderGraph/BasePasses/ComputePass.cpp. Line 46 in Source/Falcor/RenderGraph/BasePasses/ComputePass.h.

ComputePass::SharedPtr ComputePass::create(const std::string& filename, const std::string& csEntry, const Program::DefineList& defines, bool createVars)
{
    Program::Desc d;
    d.addShaderLibrary(filename).csEntry(csEntry);
    return create(d, defines, createVars);
}

Synopsis

#include <Source/Falcor/RenderGraph/BasePasses/ComputePass.h>

static SharedPtr create(const Program::Desc &desc, const Program::DefineList &defines=Program::DefineList(), bool createVars=true)

Description

Create a new compute pass.

Parameters:

[ in ] desc - The program's description.

[ in ] defines - Optional list of macro definitions to set into the program.

[ in ] createVars - Create program vars automatically, otherwise use setVars().

Return
A new object, or throws an exception if creation failed.

Source

Lines 49-52 in Source/Falcor/RenderGraph/BasePasses/ComputePass.cpp. Line 54 in Source/Falcor/RenderGraph/BasePasses/ComputePass.h.

ComputePass::SharedPtr ComputePass::create(const Program::Desc& desc, const Program::DefineList& defines, bool createVars)
{
    return SharedPtr(new ComputePass(desc, defines, createVars));
}





Add Discussion as Guest

Log in to DocsForge