Function create

Summary

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

(1) static SharedPtr create(const ProgramReflection::SharedConstPtr &pReflector)

(2) static SharedPtr create(const ComputeProgram *pProg)

Function overload

Synopsis

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

static SharedPtr create(const ProgramReflection::SharedConstPtr &pReflector)

Description

Create a new compute vars object.

Parameters:

[ in ] pReflector - A program reflection object containing the requested declarations.

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

Source

Lines 95-99 in Source/Falcor/Core/Program/ProgramVars.cpp. Line 137 in Source/Falcor/Core/Program/ProgramVars.h.

ComputeVars::SharedPtr ComputeVars::create(const ProgramReflection::SharedConstPtr& pReflector)
{
    if (pReflector == nullptr) throw std::exception("Can't create a ComputeVars object without a program reflector");
    return SharedPtr(new ComputeVars(pReflector));
}

Synopsis

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

static SharedPtr create(const ComputeProgram *pProg)

Description

Create a new compute vars object.

Parameters:

[ in ] pProg - A program containing the requested declarations. The active version of the program is used.

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

Source

Lines 101-105 in Source/Falcor/Core/Program/ProgramVars.cpp. Line 143 in Source/Falcor/Core/Program/ProgramVars.h.

ComputeVars::SharedPtr ComputeVars::create(const ComputeProgram* pProg)
{
    if (pProg == nullptr) throw std::exception("Can't create a ComputeVars object without a program");
    return create(pProg->getReflector());
}





Add Discussion as Guest

Log in to DocsForge