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

Function CacheUniformHandles

Plugins/NativeEngine/Source/NativeEngine.cpp:126–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 }
125
126 void CacheUniformHandles(bgfx::ShaderHandle shader, std::unordered_map<std::string, UniformInfo>& cache)
127 {
128 const auto MAX_UNIFORMS = 256;
129 bgfx::UniformHandle uniforms[MAX_UNIFORMS];
130 auto numUniforms = bgfx::getShaderUniforms(shader, uniforms, MAX_UNIFORMS);
131
132 bgfx::UniformInfo info{};
133 for (uint8_t idx = 0; idx < numUniforms; idx++)
134 {
135 bgfx::getUniformInfo(uniforms[idx], info);
136 cache[info.name].Handle = uniforms[idx];
137 }
138 }
139
140 enum class WebGLAttribType
141 {

Callers 1

CreateProgramMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected