MCPcopy Create free account
hub / github.com/crownengine/crown / alloc_blob

Method alloc_blob

src/resource/material_resource.cpp:198–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196 }
197
198 void alloc_blob()
199 {
200 for (u32 i = 0; i < array::size(textures); ++i)
201 textures[i].data_offset = reserve_dynamic_data(texture_handles[i]);
202
203 for (u32 i = 0; i < array::size(uniforms); ++i) {
204 uniforms[i].data_offset = reserve_dynamic_data(uniform_handles[i]);
205 if (uniforms[i].type == UniformType::MATRIX4X4)
206 reserve_dynamic_data(uniform_values[i].m);
207 else
208 reserve_dynamic_data(uniform_values[i].v);
209 }
210 }
211 };
212
213 // Returns offset to start of data

Callers 1

compileFunction · 0.80

Calls 2

reserve_dynamic_dataFunction · 0.85
sizeFunction · 0.50

Tested by

no test coverage detected