MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / SetFloatN

Method SetFloatN

Plugins/NativeEngine/Source/NativeEngine.cpp:1075–1086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1073
1074 template<int size>
1075 void NativeEngine::SetFloatN(const Napi::CallbackInfo& info)
1076 {
1077 const auto uniformData = info[0].As<Napi::External<UniformInfo>>().Data();
1078 const float values[] = {
1079 info[1].As<Napi::Number>().FloatValue(),
1080 (size > 1) ? info[2].As<Napi::Number>().FloatValue() : 0.f,
1081 (size > 2) ? info[3].As<Napi::Number>().FloatValue() : 0.f,
1082 (size > 3) ? info[4].As<Napi::Number>().FloatValue() : 0.f,
1083 };
1084
1085 m_currentProgram->SetUniform(uniformData->Handle, values);
1086 }
1087
1088 template<int size>
1089 void NativeEngine::SetMatrixN(const Napi::CallbackInfo& info)

Callers

nothing calls this directly

Calls 3

FloatValueMethod · 0.80
SetUniformMethod · 0.80
DataMethod · 0.45

Tested by

no test coverage detected