Function declareEntryPoint

Synopsis

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

uint32_t declareEntryPoint(ShaderType type, const std::string &name)

Description

No description yet.

Source

Lines 107-126 in Source/Falcor/Core/Program/Program.cpp. Line 114 in Source/Falcor/Core/Program/Program.h.

uint32_t Program::Desc::declareEntryPoint(ShaderType type, const std::string& name)
{
    assert(!name.empty());
    if (mActiveSource < 0)
    {
        throw std::exception("Cannot declare an entry point without first adding a source file/library");
    }
    EntryPoint entryPoint;
    entryPoint.stage = type;
    entryPoint.name = name;
    entryPoint.sourceIndex = mActiveSource;
    uint32_t index = (uint32_t)mEntryPoints.size();
    mEntryPoints.push_back(entryPoint);
    mSources[mActiveSource].entryPoints.push_back(index);
    return index;
}





Add Discussion as Guest

Log in