nvgGlobalTint() vs nvgGlobalAlpha() for light-like widgets

I was wondering what the difference is between these two commands, that we can use to make widgets glow in the dark. I’ve noticed that both seem to be used in different places in the Rack and Fundamental codes. For example, VCV Scope and the migrate guidelines use:

nvgGlobalTint(args.vg, color::WHITE);

while in other places like VCV VCA, Quantizer and Octave modules, and the code in src/app/LedDisplay.cpp, this is used instead:

nvgGlobalAlpha(args.vg, 1.0);

Use nvgGlobalTint() as recommended by VCV Manual - Migrating v1 Plugins to v2. Currently the two calls have the same effect, but I’m considering making nvgGlobalAlpha() only set the alpha rather than white-with-alpha. Since darkening the room sets a gray tint, nvgGlobalAlpha() will no longer reset lights back to white.

1 Like

All good, thanks Andrew!