| 219 | } |
| 220 | |
| 221 | void vtkOpenGLVertexBufferObjectGroup::AppendDataArray( |
| 222 | const char* attribute, vtkDataArray* da, int destType) |
| 223 | { |
| 224 | if (!da) |
| 225 | { |
| 226 | return; |
| 227 | } |
| 228 | |
| 229 | std::vector<vtkDataArray*>& arrays = this->UsedDataArrays[attribute]; |
| 230 | da->Register(this); |
| 231 | arrays.push_back(da); |
| 232 | this->UsedDataArrayMaps[attribute][da] = this->UsedDataArraySizes[attribute]; |
| 233 | this->UsedDataArraySizes[attribute] += da->GetNumberOfTuples(); |
| 234 | |
| 235 | // make sure we have a VBO for this array |
| 236 | // we do not use the cache when appending |
| 237 | if (this->UsedVBOs.find(attribute) == this->UsedVBOs.end()) |
| 238 | { |
| 239 | vtkOpenGLVertexBufferObject* vbo = vtkOpenGLVertexBufferObject::New(); |
| 240 | vbo->SetDataType(destType); |
| 241 | this->UsedVBOs[attribute] = vbo; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | void vtkOpenGLVertexBufferObjectGroup::ReleaseGraphicsResources(vtkWindow*) |
| 246 | { |
no test coverage detected