Age | Commit message (Collapse) | Author |
|
Publish new LL.atexit() function that accepts a Lua function (or C++ closure)
and saves it (in Registry["atexit"] table) to call later.
Make ~LuaState() walk the Registry["atexit"] table, if it exists, calling each
function appended to that table.
(Consider using that mechanism to clean up a LuaListener, if one was
instantiated. Possibly also use for p.s. leap.run()? But that's run after
every expr() call, instead of only at ~LuaState() time. Pragmatically, though,
the distinction only matters for a LUA Debug Console LUA string with "clean
lua_State" unchecked.)
For use by future lua_function() entry points, lua_emplace<T>(ctor args...)
pushes a Lua userdata object containing a newly-constructed T instance --
actually a std::optional<T> to avoid double destruction. lua_emplace<T>() is
specifically intended to be usable even for T with a nontrivial destructor: it
gives the userdata a metatable with a __gc function that destroys the
contained T instance when the userdata is garbage collected. But since garbage
collection doesn't guarantee to clean up global variables with __gc methods,
lua_emplace<T>() also uses LL.atexit() to ensure that ~T() will run when the
LuaState is destroyed.
The companion to lua_emplace<T>() is lua_toclass<T>(), which returns a
non-nullptr T* if the referenced index is in fact a userdata created by
lua_emplace<T>() for the same T, that has not yet been destroyed. This lets
C++ code access a T previously embedded in Lua userdata.
|
|
|
|
* #1736 Remove some unused samplers from glsl files and refactor shader manager to assume 16 texture image units and 4 indexed texture units all the time.
|
|
Fixes secondlife/viewer#999 lltracker beacon performance issue
|
|
|
|
|
|
# Conflicts:
# .github/workflows/build.yaml
# indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
# indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
# indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
# indra/newview/llfilepicker.cpp
|
|
|
|
Make viewer_manifest.py copy them into the viewer install image.
Make the require() function look for them there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
secondlife/viewer#1475: Fix Terrain tab controls no longer disabled when insufficient permissions
|
|
|
|
|
|
keywords_lsl_default.xml
|
|
insufficient permissions
|
|
this is a better implementation of the drawBeacon() function compared to the previous patch
|
|
tracking beacon was causing extreme lag on apple silicon macs
|
|
Fix a few merge issues
|
|
|
|
move project/gltf development to develop
|
|
|
|
maint a merge to gltf dev
|
|
|
|
We have log messages when a coroutine terminates abnormally, but we don't
report either when it starts or when it terminates normally. Address that.
|
|
When the user explicitly types 'return expression[, expression]...' we convert
the result of the expressions to LLSD and format them into the LUA Debug
Console, which serves as a useful acknowledgment.
But until now, if the user neither invoked print() nor ran a 'return'
statement, the LUA Debug Console output remained empty. This could be a little
disconcerting: you click Execute, or press Enter, and apparently nothing
happens. You must either monitor viewer log output, or simply trust that the
Lua snippet ran.
When there are no 'return' results, at least emit 'ok'. But when the user is
entering a series of no-output commands, vary the 'ok' output by appending a
counter: 'ok 1', 'ok 2' etc.
|
|
The special case of a Lua snippet that indirectly invokes the
"LLNotifications" listener can result in a recursive call to
LLFloaterLUADebug's handler methods. Defend against that case.
|
|
It's helpful to see when expr() is actually going to start running a
particular Lua chunk. We already report not only when it's done, but also
if/when we start and finish a p.s. fiber.run() call.
|
|
|
|
stringize() constructs, populates and destroys a std::ostringstream, which is
actually less efficient than directly allocating a std::string big enough for
the result of operator+().
Maybe someday we'll specialize stringize(p0, p1) for the case in which they're
both string-like, and invoke operator+() for that situation...
|
|
The expression (payload or {}) is unnecessary, since that value will be
converted to LLSD -- and both Lua nil and empty table convert to
LLSD::isUndefined().
|
|
|
|
|
|
brad/maint-a-merge-to-gltf-dev
# Conflicts:
# indra/newview/gltf/primitive.cpp
|
|
secondlife/viewer#1475: PBR Terrain texture transform UI: Second pass
|
|
Some things can make a copy of camera, like LLViewerWindow::cubeSnapshot
so need to store and clean up the connection
|
|
mDrawable pointer had junk in it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Merge from main.
|
|
WIP: This is known not to work yet.
|