| 306 | } |
| 307 | |
| 308 | void RenderPointsObject::bindPointsPicker_() |
| 309 | { |
| 310 | MR_TIMER; |
| 311 | auto shader = GLStaticHolder::getShaderId( GLStaticHolder::Picker ); |
| 312 | GL_EXEC( glBindVertexArray( pointsPickerArrayObjId_ ) ); |
| 313 | GL_EXEC( glUseProgram( shader ) ); |
| 314 | if ( objPoints_->hasVisualRepresentation() ) |
| 315 | { |
| 316 | const auto positions = loadVertPosBuffer_(); |
| 317 | bindVertexAttribArray( shader, "position", vertPosBuffer_, positions, 3, positions.dirty(), positions.glSize() != 0 ); |
| 318 | } |
| 319 | else |
| 320 | bindVertexAttribArray( shader, "position", vertPosBuffer_, std::vector<Vector3f>{}, 3, false, vertPosBuffer_.size() != 0 ); |
| 321 | |
| 322 | auto validIndices = loadValidIndicesBuffer_(); |
| 323 | validIndicesBuffer_.loadDataOpt( GL_ELEMENT_ARRAY_BUFFER, validIndices.dirty(), validIndices ); |
| 324 | dirty_ &= ~DIRTY_POSITION; |
| 325 | } |
| 326 | |
| 327 | void RenderPointsObject::initBuffers_() |
| 328 | { |
nothing calls this directly
no test coverage detected