summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-09-30 11:51:09 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-09-30 11:51:09 -0400
commitde61551df3219dae2238591bae5fa7b6c857e6b0 (patch)
treef862de93761661afba4cd3299507b3e6f2ebfd8d /indra/llrender/llshadermgr.cpp
parent48dc344a9e65451c9e2b267fba7d3e01bdbbf801 (diff)
DRTVWR-589: Emulate print() better, show output on Lua floater.
Break out a lua_print_msg() function common to print_debug(), print_info() and print_warning(). Instead of accepting a single argument, lua_print_msg() accepts arbitrary arguments, passing each to the Lua tostring() function and concatenating the results. In addition to returning the combined string to its caller for level-appropriate logging, it also posts the message to a "lua output" LLEventPump for any interested party. Make LLFloaterLUADebug listen on "lua output" when the floater is constructed, storing the connection in an LLTempBoundListener to stop listening when the floater is destroyed. Append each message to the floater's output panel with a line break. Make LLTextEditor::addLineBreakChar() public. insertText("\n") only appends a little rectangle glyph. Enlarge the text capacity of the floater's output panel to be able to report whatever messages a Lua script wants to print. Add diagnostic logging for posting events from Lua, and receiving events to forward to Lua. Since lua_pop() is a macro implemented on lua_settop(), replace the awkward construct lua_pop(L, lua_gettop(L)) with lua_settop(L, 0). Use lambdas instead of std::bind() to connect LuaListener and LLLeapListener.
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
0 files changed, 0 insertions, 0 deletions