| 523 | } |
| 524 | |
| 525 | void Gui3D::update() |
| 526 | { |
| 527 | try |
| 528 | { |
| 529 | // 2-D rendering |
| 530 | // Display all 2-D views |
| 531 | if (mDisplayMode == DisplayMode::DisplayAll || mDisplayMode == DisplayMode::Display2D) |
| 532 | Gui::update(); |
| 533 | // 3-D rendering |
| 534 | #ifdef USE_3D_RENDERER |
| 535 | if (mDisplayMode == DisplayMode::DisplayAll || mDisplayMode == DisplayMode::Display3D) |
| 536 | { |
| 537 | // OpenGL Rendering |
| 538 | std::unique_lock<std::mutex> lock{gKeypoints3D.mutex}; |
| 539 | // Esc pressed -> Close program |
| 540 | if (sLastKeyPressed == 27) |
| 541 | if (spIsRunning != nullptr) |
| 542 | *spIsRunning = false; |
| 543 | lock.unlock(); |
| 544 | // OpenCL - Run main loop event |
| 545 | // It is run outside loop, or it would get visually stuck if loop to slow |
| 546 | idleFunction(); |
| 547 | glutMainLoopEvent(); |
| 548 | // This alternative can only be called once, and it will block the thread until program exit |
| 549 | // glutMainLoop(); |
| 550 | } |
| 551 | #endif |
| 552 | } |
| 553 | catch (const std::exception& e) |
| 554 | { |
| 555 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | Matrix Gui3D::readCvMat() |
| 560 | { |
nothing calls this directly
no test coverage detected