:param target: Binding point. See :ocv:enum:`ogl::Buffer::Target` .
ogl::Buffer::mapHost
--------------------
Maps OpenGL buffer to host memory.
.. ocv:function:: Mat ogl::Buffer::mapHost(Access access)
:param access: Access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. The symbolic constant must be ``ogl::Buffer::READ_ONLY`` , ``ogl::Buffer::WRITE_ONLY`` or ``ogl::Buffer::READ_WRITE`` .
``mapHost`` maps to the client's address space the entire data store of the buffer object.
The data can then be directly read and/or written relative to the returned pointer, depending on the specified ``access`` policy.
A mapped data store must be unmapped with :ocv:func:`ogl::Buffer::unmapHost` before its buffer object is used.
This operation can lead to memory transfers between host and device.
:param arr: Destination array (host or device memory, can be :ocv:class:`Mat` , :ocv:class:`gpu::GpuMat` , :ocv:class:`ogl::Buffer` or ``ogl::Texture2D`` ).
:param ddepth: Destination depth.
:param autoRelease: Auto release mode for destination buffer (if ``arr`` is OpenGL buffer or texture).
ogl::Texture2D::bind
--------------------
Binds texture to current active texture unit for ``GL_TEXTURE_2D`` target.
@@ -79,6 +79,7 @@ The function ``imshow`` displays an image in the specified window. If the window
* If the image is 32-bit floating-point, the pixel values are multiplied by 255. That is, the value range [0,1] is mapped to [0,255].
If window was created with OpenGL support, ``imshow`` also support :ocv:class:`ogl::Buffer` , :ocv:class:`ogl::Texture2D` and :ocv:class:`gpu::GpuMat` as input.
namedWindow
---------------
...
...
@@ -94,7 +95,13 @@ Creates a window.
:param name: Name of the window in the window caption that may be used as a window identifier.
:param flags: Flags of the window. Currently the only supported flag is ``CV_WINDOW_AUTOSIZE`` . If this is set, the window size is automatically adjusted to fit the displayed image (see :ocv:func:`imshow` ), and you cannot change the window size manually.
:param flags: Flags of the window. The supported flags are:
* **WINDOW_NORMAL** If this is set, the user can resize the window (no constraint).
* **WINDOW_AUTOSIZE** If this is set, the window size is automatically adjusted to fit the displayed image (see :ocv:func:`imshow` ), and you cannot change the window size manually.
* **WINDOW_OPENGL** If this is set, the window will be created with OpenGL support.
The function ``namedWindow`` creates a window that can be used as a placeholder for images and trackbars. Created windows are referred to by their names.
...
...
@@ -256,3 +263,31 @@ The function ``waitKey`` waits for a key event infinitely (when
.. note::
The function only works if there is at least one HighGUI window created and the window is active. If there are several HighGUI windows, any of them can be active.
setOpenGlDrawCallback
---------------------
Set OpenGL render handler for the specified window.