Function entryPoint

Synopsis

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

Desc & entryPoint(ShaderType shaderType, const std::string &name)

Description

Adds an entry point based on the "active" source.

Source

Lines 87-115 in Source/Falcor/Core/Program/Program.cpp. Line 73 in Source/Falcor/Core/Program/Program.h.

Program::Desc& Program::Desc::entryPoint(ShaderType shaderType, std::string const& name)
{
    if(name.size() == 0)
        return *this;
    if(mActiveSource < 0)
    {
        throw std::exception("Cannot add an entry point without first adding a source file/library");
    }
    if(mActiveGroup < 0)
    {
        beginEntryPointGroup();
    }
    EntryPoint entryPoint;
    entryPoint.stage = shaderType;
    entryPoint.name = name;
    entryPoint.sourceIndex = mActiveSource;
    entryPoint.groupIndex = mActiveGroup;
    mGroups[mActiveGroup].entryPointCount++;
    mSources[mActiveSource].entryPointCount++;
    mEntryPoints.push_back(entryPoint);
    return *this;
}





Add Discussion as Guest

Log in to DocsForge