29 cout <<
"Please, select the input video file or camera...\n";
35 cout <<
"Video stream open OK\n";
39 "Demo of video textures with MRPT's OpenGL objects", 640, 480);
43 mrpt::make_aligned_shared<opengl::CGridPlaneXY>(-7, 7, -7, 7, 0, 1);
44 gl_ground->setColor(0.7, 0.7, 0.7);
48 mrpt::make_aligned_shared<opengl::CTexturedPlane>(
51 mrpt::make_aligned_shared<opengl::CTexturedPlane>(0, 1, 0, 0.75);
53 mrpt::make_aligned_shared<opengl::CTexturedPlane>(0, 1, 0, 0.75);
67 theScene->insert(gl_ground);
68 theScene->insert(gl_plane1);
69 theScene->insert(gl_plane2);
70 theScene->insert(gl_plane3);
72 win.unlockAccess3DScene();
76 cout <<
"Close the window to end.\n";
79 win.addTextMessage(5, 5,
format(
"%.02fFPS",
win.getRenderingFPS()));
80 std::this_thread::sleep_for(1ms);
89 std::dynamic_pointer_cast<CObservationImage>(obs);
90 win.get3DSceneAndLock();
91 gl_plane1->assignImage(o->image);
92 gl_plane2->assignImage(o->image);
93 gl_plane3->assignImage(o->image);
94 win.unlockAccess3DScene();
112 catch (std::exception& e)
114 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
119 printf(
"Untyped exception!!");