Function addShaderLibrary

Synopsis

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

Desc & addShaderLibrary(const std::string &path)

Description

Add a file of source code to use. This also sets the given file as the "active" source for subsequent entry points.

Source

Lines 57-65 in Source/Falcor/Core/Program/Program.cpp. Line 64 in Source/Falcor/Core/Program/Program.h.

Program::Desc& Program::Desc::addShaderLibrary(std::string const& path)
{
    Source source(ShaderLibrary::create(path));
    source.firstEntryPoint = uint32_t(mEntryPoints.size());
    mActiveSource = (int32_t) mSources.size();
    mSources.emplace_back(std::move(source));
    return *this;
}





Add Discussion as Guest

Log in to DocsForge