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

Method SetMatrices

Plugins/NativeEngine/Source/NativeEngine.cpp:1158–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156 }
1157
1158 void NativeEngine::SetMatrices(const Napi::CallbackInfo& info)
1159 {
1160 const auto uniformData = info[0].As<Napi::External<UniformInfo>>().Data();
1161 const auto matricesArray = info[1].As<Napi::Float32Array>();
1162
1163 const size_t elementLength = matricesArray.ElementLength();
1164 assert(elementLength % 16 == 0);
1165
1166 m_currentProgram->SetUniform(uniformData->Handle, gsl::span(matricesArray.Data(), elementLength), elementLength / 16);
1167 }
1168
1169 void NativeEngine::SetMatrix2x2(const Napi::CallbackInfo& info)
1170 {

Callers

nothing calls this directly

Calls 4

assertFunction · 0.85
ElementLengthMethod · 0.80
SetUniformMethod · 0.80
DataMethod · 0.45

Tested by

no test coverage detected