| 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 | { |
nothing calls this directly
no test coverage detected