MCPcopy Create free account
hub / github.com/RenderKit/embree / update_instance_transforms

Function update_instance_transforms

tutorials/forest/forest_device.cpp:277–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277void update_instance_transforms()
278{
279 if (g_use_instance_array)
280 {
281 rtcUpdateGeometryBuffer(instance_array, RTC_BUFFER_TYPE_TRANSFORM, 0);
282 rtcCommitGeometry(instance_array);
283 }
284 else
285 {
286 for (unsigned int i = 0; i < num_trees; ++i) {
287 rtcSetGeometryTransform(instances[i],0,RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,(float*)&data.tree_transforms_host[i]);
288 rtcCommitGeometry(instances[i]);
289 }
290 }
291}
292
293void rebuild_instances(size_t old_num_trees)
294{

Callers 1

device_renderFunction · 0.85

Calls 3

rtcUpdateGeometryBufferFunction · 0.85
rtcCommitGeometryFunction · 0.85
rtcSetGeometryTransformFunction · 0.85

Tested by

no test coverage detected