MCPcopy Create free account
hub / github.com/baldurk/renderdoc / SetLazyArray

Function SetLazyArray

renderdoc/api/replay/structured_data.h:994–1007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992
993 template <typename T>
994 void SetLazyArray(uint64_t arrayCount, T *arrayData, LazyGenerator generator)
995 {
996 DeleteChildren();
997
998 void *lazyAlloc = alloc(sizeof(LazyArrayData));
999
1000 m_Lazy = new(lazyAlloc) LazyArrayData;
1001 m_Lazy->generator = generator;
1002 m_Lazy->elemSize = sizeof(T);
1003 size_t sz = size_t(sizeof(T) * arrayCount);
1004 m_Lazy->data = (byte *)alloc(sz);
1005 memcpy(m_Lazy->data, arrayData, sz);
1006 data.children.resize((size_t)arrayCount);
1007 }
1008#endif
1009
1010// C++ gets more extensive typecasts. We'll add a couple for python in the interface file

Callers

nothing calls this directly

Calls 4

DeleteChildrenFunction · 0.85
allocFunction · 0.85
memcpyFunction · 0.50
resizeMethod · 0.45

Tested by

no test coverage detected