blob: c48685f93e4e5f457134024e9439babf371796f6 (
plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in a
** written agreement between you and Nokia.
**
** GNU Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qtopencl-all-classes.html
\title QtOpenCL Classes
\keyword QtOpenCL Classes
\generatelist classes
*/
/*!
\group opencl
\title QtOpenCL Core Class Reference
The following classes wrap the core functionality of OpenCL
to make it accessible to applications using Qt. There is a
separate group of classes for \l{Interoperation between OpenCL
and OpenGL}.
\generatelist{related}
*/
/*!
\group openclgl
\title Interoperation between OpenCL and OpenGL
The QCLContextGL class extends QCLContext and provides
additional functions that are useful when working with OpenGL
contexts, textures, and buffers. QCLContextGL objects must
be created with a current QGLContext to define the specific
OpenGL context to interoperate with:
\code
QGLWidget glw;
glw.makeCurrent();
QCLContextGL context;
if (!context.create())
qFatal("Could not create the OpenCL context");
\endcode
The above code will select the first QCLDevice::GPU device
that is found on the system, and enable OpenGL object sharing
if the \c{cl_khr_gl_sharing} or \c{cl_apple_gl_sharing}
extension is present. If there is no QCLDevice::GPU, then
QCLDevice::Default will be used instead.
If the OpenCL implementation does not support interoperation
with OpenGL, then the classes listed below will still be present
in the final library, but their functionality and performance
will be reduced.
The QCLContextGL::supportsObjectSharing() function can be used
to determine if the OpenCL implementation can interoperate with
the system's OpenGL implementation.
The following classes are used to enable interoperation between
OpenCL and OpenGL:
\generatelist{related}
*/
|