Blame view

3rdparty/boost_1_81_0/libs/compute/doc/interop.qbk 2.1 KB
e6ccf0ce   Hu Chunming   提交三方库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  [/===========================================================================
   Copyright (c) 2013-2015 Kyle Lutz <kyle.r.lutz@gmail.com>
  
   Distributed under the Boost Software License, Version 1.0
   See accompanying file LICENSE_1_0.txt or copy at
   http://www.boost.org/LICENSE_1_0.txt
  =============================================================================/]
  
  [section:interop Interoperability]
  
  Boost.Compute provides a number of facilities to ease interoperability with
  other C and C++ libraries including [@http://en.wikipedia.org/wiki/OpenGL
  OpenGL], [@http://opencv.org/ OpenCV], [@http://eigen.tuxfamily.org Eigen],
  [@http://qt-project.org/ Qt], and [@http://vtk.org/ VTK].
  
  All of the interop headers are located in the `<boost/compute/interop/...>`
  directory.
  
  [section OpenGL]
  
  OpenGL is a standard API for 3D graphics and closely related to OpenCL.
  
  Boost.Compute provides an easy way to create a shared OpenCL/OpenGL context
  via the [funcref boost::compute::opengl_create_shared_context
  opengl_create_shared_context()] function. This creates a Boost.Compute
  [classref boost::compute::context context] object which can be used to create
  OpenCL memory buffers corresponding to OpenGL memory objects (such as VBOs).
  This allows for OpenCL kernels to read and write data which is then used
  directly for rendering with OpenGL.
  
  Boost.Compute provides a few classes to manage OpenGL objects and make them
  accessible to OpenCL. These include [classref boost::compute::opengl_buffer
  opengl_buffer] (for OpenGL memory objects) and [classref
  boost::compute::opengl_texture opengl_texture] (for OpenGL texture objects).
  
  Control of shared OpenCL/OpenGL memory objects is transfered between OpenCL and
  OpenGL using the [funcref boost::compute::opengl_enqueue_acquire_gl_objects
  opengl_enqueue_acquire_gl_objects()] and [funcref
  boost::compute::opengl_enqueue_release_gl_objects
  opengl_enqueue_release_gl_objects()] functions.
  
  See the OpenCL documentation for the
  [@https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/cl_khr_gl_sharing.html
  cl_khr_gl_sharing] extension for more information.
  
  [endsect] [/ opengl]
  
  [endsect] [/ interop ]