MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / bindMeshPicker_

Method bindMeshPicker_

source/MRViewer/MRRenderMeshObject.cpp:508–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void RenderMeshObject::bindMeshPicker_()
509{
510 MR_TIMER;
511#ifdef __EMSCRIPTEN__
512 auto shader = GLStaticHolder::getShaderId( GLStaticHolder::Picker );
513#else
514 auto shader = GLStaticHolder::getShaderId( GLStaticHolder::MeshDesktopPicker );
515#endif
516
517 GL_EXEC( glBindVertexArray( meshPickerArrayObjId_ ) );
518 GL_EXEC( glUseProgram( shader ) );
519
520 auto positions = loadVertPosBuffer_();
521 bindVertexAttribArray( shader, "position", vertPosBuffer_, positions, 3, positions.dirty(), positions.glSize() != 0 );
522
523 auto faces = loadFaceIndicesBuffer_();
524 facesIndicesBuffer_.loadDataOpt( GL_ELEMENT_ARRAY_BUFFER, faces.dirty(), faces );
525}
526
527void RenderMeshObject::bindEdges_()
528{

Callers

nothing calls this directly

Calls 4

dirtyMethod · 0.80
glSizeMethod · 0.80
bindVertexAttribArrayFunction · 0.70
loadDataOptMethod · 0.45

Tested by

no test coverage detected