Rendering video in 3D (OpenGL) windows

The most efficient way to render images into an OpenGL window (like MRPT’s mrpt::gui::CDisplayWindow3D) is to transfer video frames to the video memory and render them as texture of quads.

This can be done manually by means of a mrpt::opengl::CTexturedPlane object within a 3D scene.

But since MRPT 0.9.4 there is an easier way: viewports “image mode“. Refer to the documentation of mrpt::opengl::COpenGLViewport for more information.

You can see also the source code of the samples/opengl_video_viewport_demo example, which creates two windows: one rendering video at the full size of the window, and another with a 3D scene plus a small extra viewport for the video stream.

Source code:



Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Search C++ API:



Latest blog entries

Recent activity



web stats