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

Method updateBuffer

kernels/common/scene_grid_mesh.cpp:109–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 void GridMesh::updateBuffer(RTCBufferType type, unsigned int slot)
110 {
111 if (type == RTC_BUFFER_TYPE_GRID)
112 {
113 if (slot != 0)
114 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot");
115 grids.setModified();
116 }
117 else if (type == RTC_BUFFER_TYPE_VERTEX)
118 {
119 if (slot >= vertices.size())
120 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot");
121 vertices[slot].setModified();
122 }
123 else if (type == RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE)
124 {
125 if (slot >= vertexAttribs.size())
126 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "invalid buffer slot");
127 vertexAttribs[slot].setModified();
128 }
129 else
130 {
131 throw_RTCError(RTC_ERROR_INVALID_ARGUMENT, "unknown buffer type");
132 }
133
134 Geometry::update();
135 }
136
137 void GridMesh::commit()
138 {

Callers

nothing calls this directly

Calls 2

setModifiedMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected