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

Method updateBuffer

kernels/common/scene_instance_array.cpp:146–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 }
145
146 void InstanceArray::updateBuffer(RTCBufferType type, unsigned int slot)
147 {
148 if (type == RTC_BUFFER_TYPE_TRANSFORM)
149 {
150 if (slot >= l2w_buf.size())
151 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid transform buffer slot");
152 l2w_buf[slot].setModified();
153 }
154 else if (type == RTC_BUFFER_TYPE_INDEX)
155 {
156 if (slot != 0)
157 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid index buffer slot. must be 0");
158 object_ids.setModified();
159 }
160 else
161 {
162 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "unknown buffer type");
163 }
164
165 Geometry::update();
166 }
167
168 void InstanceArray::setMask (unsigned mask)
169 {

Callers

nothing calls this directly

Calls 2

setModifiedMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected