| 650 | } |
| 651 | |
| 652 | void RenderMeshObject::bindPoints_( GLStaticHolder::ShaderType shaderType ) |
| 653 | { |
| 654 | auto shader = GLStaticHolder::getShaderId( shaderType ); |
| 655 | GL_EXEC( glBindVertexArray( pointsArrayObjId_ ) ); |
| 656 | GL_EXEC( glUseProgram( shader ) ); |
| 657 | |
| 658 | const auto positions = loadVertPosBuffer_(); |
| 659 | bindVertexAttribArray( shader, "position", vertPosBuffer_, positions, 3, positions.dirty(), positions.glSize() != 0 ); |
| 660 | |
| 661 | const auto normals = loadVertNormalsBuffer_(); |
| 662 | bindVertexAttribArray( shader, "normal", vertNormalsBuffer_, normals, 3, normals.dirty(), normals.glSize() != 0 ); |
| 663 | |
| 664 | const auto colors = loadVertColorsBuffer_(); |
| 665 | bindVertexAttribArray( shader, "K", vertColorsBuffer_, colors, 4, colors.dirty(), colors.glSize() != 0 ); |
| 666 | |
| 667 | auto validIndices = loadPointValidIndicesBuffer_(); |
| 668 | pointValidBuffer_.loadDataOpt( GL_ELEMENT_ARRAY_BUFFER, validIndices.dirty(), validIndices ); |
| 669 | |
| 670 | // VertColors |
| 671 | GL_EXEC( glActiveTexture( GL_TEXTURE0 ) ); |
| 672 | if ( !emptyVertsColorTexture_.valid() ) |
| 673 | emptyVertsColorTexture_.gen(); |
| 674 | emptyVertsColorTexture_.bind(); |
| 675 | GL_EXEC( glUniform1i( glGetUniformLocation( shader, "selection" ), 0 ) ); |
| 676 | |
| 677 | dirtyPointPos_ = false; |
| 678 | } |
| 679 | |
| 680 | void RenderMeshObject::drawMesh_( bool /*solid*/, ViewportId viewportId, bool picker ) const |
| 681 | { |
nothing calls this directly
no test coverage detected