| 1366 | } |
| 1367 | |
| 1368 | void |
| 1369 | TrackerNodeInteract::onKeyFrameImageRenderingFinished() |
| 1370 | { |
| 1371 | assert( QThread::currentThread() == qApp->thread() ); |
| 1372 | TrackWatcher* future = dynamic_cast<TrackWatcher*>( sender() ); |
| 1373 | assert(future); |
| 1374 | std::pair<ImagePtr, RectI> ret = future->result(); |
| 1375 | if ( !ret.first || ret.second.isNull() ) { |
| 1376 | return; |
| 1377 | } |
| 1378 | |
| 1379 | OverlaySupport* overlay = _p->publicInterface->getCurrentViewportForOverlays(); |
| 1380 | assert(overlay); |
| 1381 | OpenGLViewerI* isOpenGLViewer = dynamic_cast<OpenGLViewerI*>(overlay); |
| 1382 | assert(isOpenGLViewer); |
| 1383 | if (!isOpenGLViewer) { |
| 1384 | return; |
| 1385 | } |
| 1386 | |
| 1387 | isOpenGLViewer->makeOpenGLcontextCurrent(); |
| 1388 | |
| 1389 | for (TrackKeyframeRequests::iterator it = trackRequestsMap.begin(); it != trackRequestsMap.end(); ++it) { |
| 1390 | if (it->second.get() == future) { |
| 1391 | TrackMarkerPtr track = it->first.track.lock(); |
| 1392 | if (!track) { |
| 1393 | return; |
| 1394 | } |
| 1395 | TrackerNodeInteract::KeyFrameTexIDs& keyTextures = trackTextures[track]; |
| 1396 | int format, internalFormat, glType; |
| 1397 | Texture::getRecommendedTexParametersForRGBAByteTexture(&format, &internalFormat, &glType); |
| 1398 | GLTexturePtr tex( new Texture(GL_TEXTURE_2D, GL_LINEAR, GL_NEAREST, GL_CLAMP_TO_EDGE, Texture::eDataTypeByte, |
| 1399 | format, internalFormat, glType) ); |
| 1400 | keyTextures[it->first.time] = tex; |
| 1401 | convertImageTosRGBOpenGLTexture(ret.first, tex, ret.second); |
| 1402 | |
| 1403 | trackRequestsMap.erase(it); |
| 1404 | |
| 1405 | _p->publicInterface->redrawOverlayInteract(); |
| 1406 | |
| 1407 | return; |
| 1408 | } |
| 1409 | } |
| 1410 | assert(false); |
| 1411 | } |
| 1412 | |
| 1413 | void |
| 1414 | TrackerNodeInteract::rebuildMarkerTextures() |
nothing calls this directly
no test coverage detected