Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / compute / doc / html / boost_compute / interop.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Interoperability</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.Compute">
8 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.Compute">
9 <link rel="prev" href="advanced_topics.html" title="Advanced Topics">
10 <link rel="next" href="porting_guide.html" title="Porting Guide">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="advanced_topics.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="porting_guide.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="boost_compute.interop"></a><a class="link" href="interop.html" title="Interoperability">Interoperability</a>
28 </h2></div></div></div>
29 <div class="toc"><dl class="toc"><dt><span class="section"><a href="interop.html#boost_compute.interop.opengl">OpenGL</a></span></dt></dl></div>
30 <p>
31       Boost.Compute provides a number of facilities to ease interoperability with
32       other C and C++ libraries including <a href="http://en.wikipedia.org/wiki/OpenGL" target="_top">OpenGL</a>,
33       <a href="http://opencv.org/" target="_top">OpenCV</a>, <a href="http://eigen.tuxfamily.org" target="_top">Eigen</a>,
34       <a href="http://qt-project.org/" target="_top">Qt</a>, and <a href="http://vtk.org/" target="_top">VTK</a>.
35     </p>
36 <p>
37       All of the interop headers are located in the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">compute</span><span class="special">/</span><span class="identifier">interop</span><span class="special">/...&gt;</span></code> directory.
38     </p>
39 <div class="section">
40 <div class="titlepage"><div><div><h3 class="title">
41 <a name="boost_compute.interop.opengl"></a><a class="link" href="interop.html#boost_compute.interop.opengl" title="OpenGL">OpenGL</a>
42 </h3></div></div></div>
43 <p>
44         OpenGL is a standard API for 3D graphics and closely related to OpenCL.
45       </p>
46 <p>
47         Boost.Compute provides an easy way to create a shared OpenCL/OpenGL context
48         via the <code class="computeroutput"><a class="link" href="../boost/compute/opengl_c_idm46009692466128.html" title="Function opengl_create_shared_context">opengl_create_shared_context()</a></code>
49         function. This creates a Boost.Compute <code class="computeroutput">context</code>
50         object which can be used to create OpenCL memory buffers corresponding to
51         OpenGL memory objects (such as VBOs). This allows for OpenCL kernels to read
52         and write data which is then used directly for rendering with OpenGL.
53       </p>
54 <p>
55         Boost.Compute provides a few classes to manage OpenGL objects and make them
56         accessible to OpenCL. These include <code class="computeroutput"><a class="link" href="../boost/compute/opengl_buffer.html" title="Class opengl_buffer">opengl_buffer</a></code>
57         (for OpenGL memory objects) and <code class="computeroutput"><a class="link" href="../boost/compute/opengl_texture.html" title="Class opengl_texture">opengl_texture</a></code>
58         (for OpenGL texture objects).
59       </p>
60 <p>
61         Control of shared OpenCL/OpenGL memory objects is transfered between OpenCL
62         and OpenGL using the <code class="computeroutput"><a class="link" href="../boost/compute/opengl_e_idm46009692495472.html" title="Function opengl_enqueue_acquire_gl_objects">opengl_enqueue_acquire_gl_objects()</a></code>
63         and <code class="computeroutput"><a class="link" href="../boost/compute/opengl_e_idm46009692488960.html" title="Function opengl_enqueue_release_gl_objects">opengl_enqueue_release_gl_objects()</a></code>
64         functions.
65       </p>
66 <p>
67         See the OpenCL documentation for the <a href="https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/cl_khr_gl_sharing.html" target="_top">cl_khr_gl_sharing</a>
68         extension for more information.
69       </p>
70 </div>
71 </div>
72 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
73 <td align="left"></td>
74 <td align="right"><div class="copyright-footer">Copyright &#169; 2013, 2014 Kyle Lutz<p>
75         Distributed under the Boost Software License, Version 1.0. (See accompanying
76         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
77       </p>
78 </div></td>
79 </tr></table>
80 <hr>
81 <div class="spirit-nav">
82 <a accesskey="p" href="advanced_topics.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="porting_guide.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
83 </div>
84 </body>
85 </html>