Function flush

Synopsis

#include <Source/Falcor/Utils/Scripting/Console.h>

bool flush()

Description

Processes console input. Should be called once at the end of every frame.

Return
Returns true if some processing occured.

Source

Lines 110-126 in Source/Falcor/Utils/Scripting/Console.cpp. Line 56 in Source/Falcor/Utils/Scripting/Console.h.

bool Console::flush()
{
    if (mCmdPending.empty()) return false;
    try
    {
        mLog += Scripting::interpretScript(mCmdPending);
    }
    catch (const std::exception& e)
    {
        mLog += std::string(e.what()) + "\n";
    };
    mCmdPending.clear();
    return true;
}





Add Discussion as Guest

Log in to DocsForge