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 opengl::CGridPlaneXY::Create(-7, 7, -7, 7, 0, 1);
44 gl_ground->setColor(0.7, 0.7, 0.7);
48 opengl::CTexturedPlane::Create(0, 1, 0, 0.75);
50 opengl::CTexturedPlane::Create(0, 1, 0, 0.75);
52 opengl::CTexturedPlane::Create(0, 1, 0, 0.75);
66 theScene->insert(gl_ground);
67 theScene->insert(gl_plane1);
68 theScene->insert(gl_plane2);
69 theScene->insert(gl_plane3);
71 win.unlockAccess3DScene();
75 cout <<
"Close the window to end.\n";
78 win.addTextMessage(5, 5,
format(
"%.02fFPS",
win.getRenderingFPS()));
79 std::this_thread::sleep_for(1ms);
88 std::dynamic_pointer_cast<CObservationImage>(obs);
89 win.get3DSceneAndLock();
90 gl_plane1->assignImage(o->image);
91 gl_plane2->assignImage(o->image);
92 gl_plane3->assignImage(o->image);
93 win.unlockAccess3DScene();
111 catch (
const std::exception& e)
118 printf(
"Untyped exception!!");