| 391 | } |
| 392 | |
| 393 | void RenderLabelObject::bindLabel_() |
| 394 | { |
| 395 | auto shader = GLStaticHolder::getShaderId( GLStaticHolder::Labels ); |
| 396 | GL_EXEC( glBindVertexArray( labelArrayObjId_ ) ); |
| 397 | GL_EXEC( glUseProgram( shader ) ); |
| 398 | if ( auto mesh = objLabel_->labelRepresentingMesh() ) |
| 399 | bindVertexAttribArray( shader, "position", vertPosBuffer_, mesh->points.vec_, 3, dirty_ & DIRTY_POSITION ); |
| 400 | else |
| 401 | bindVertexAttribArray( shader, "position", vertPosBuffer_, std::vector<Vector3f>{}, 3, false, vertPosBuffer_.valid() ); |
| 402 | |
| 403 | auto faceIndices = loadFaceIndicesBuffer_(); |
| 404 | facesIndicesBuffer_.loadDataOpt( GL_ELEMENT_ARRAY_BUFFER, faceIndices.dirty(), faceIndices ); |
| 405 | dirty_ &= ~DIRTY_MESH; |
| 406 | } |
| 407 | |
| 408 | void RenderLabelObject::initBuffers_() |
| 409 | { |
nothing calls this directly
no test coverage detected