Skip to content

Commit

Permalink
PR feedbacks
Browse files Browse the repository at this point in the history
PR feedbacks

WIP

WIP

WIP
  • Loading branch information
neon60 committed Nov 28, 2024
1 parent b9db9ed commit 7698766
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/how-to/hip_runtime_api/opengl_interop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ OpenGL interoperability
*******************************************************************************

The HIP--OpenGL interoperation involves mapping OpenGL resources, such as
buffers and textures, for HIP access. This mapping process enables HIP to
utilize these resources directly, bypassing the need for costly data transfers
between the CPU and GPU. This capability is useful in applications that require
both intensive GPU computation and real-time visualization.
buffers and textures, for HIP to interact with OpenGL. This mapping process
enables HIP to utilize these resources directly, bypassing the need for costly
data transfers between the CPU and GPU. This capability is useful in
applications that require both intensive GPU computation and real-time
visualization.

The graphics resources must be registered using functions like
:cpp:func:`hipGraphicsGLRegisterBuffer` or :cpp:func:`hipGraphicsGLRegisterImage`
Expand All @@ -35,7 +36,7 @@ window as a grid of triangles using OpenGL. For a working example, there are
multiple initialization steps needed like creating and opening a window,
initializing OpenGL or selecting the OpenGL-capable device. After the
initialization in the example, the kernel simulates the sinewave and updates
the window's framebuffer in a cycle until the window is not closed.
the window's framebuffer in a cycle until the window is closed.

.. note::

Expand Down Expand Up @@ -80,8 +81,8 @@ following example:

.. <!-- spellcheck-enable -->
The HIP graphics resource that is imported from the OpenGL buffer has to be
unmap and unregister in the following way:
The HIP graphics resource that is imported from the OpenGL buffer and is not
needed anymore should be unmapped and unregistered as shown in the following way:

.. <!-- spellcheck-disable -->
Expand Down

0 comments on commit 7698766

Please sign in to comment.