MCPcopy Create free account
hub / github.com/TheRealMJP/Shadows / SetColor

Function SetColor

Shadows/SampleFramework11/TwHelper.cpp:156–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void SetColor(TwBar* bar, Float3 color)
157{
158 int32 rgb[3] = { int32(Saturate(color.x) * 255.0f),
159 int32(Saturate(color.y) * 255.0f),
160 int32(Saturate(color.z) * 255.0f) };
161 TwCall(TwSetParam(bar, nullptr, "color", TW_PARAM_INT32, 3, rgb));
162}
163
164void SetAlpha(TwBar* bar, float alpha)
165{

Callers

nothing calls this directly

Calls 2

SaturateFunction · 0.85
TwCallFunction · 0.85

Tested by

no test coverage detected