qopenglfunctions_3_1.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_3_1.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtGui module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32**-
33** This file was generated by glgen version 0.1-
34** Command line was: glgen-
35**-
36** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)-
37**-
38** This is an auto-generated file.-
39** Do not edit! All changes made to it will be lost.-
40**-
41****************************************************************************/-
42-
43#include "qopenglfunctions_3_1.h"-
44#include "qopenglcontext.h"-
45-
46QT_BEGIN_NAMESPACE-
47-
48/*!-
49 \class QOpenGLFunctions_3_1-
50 \inmodule QtGui-
51 \since 5.1-
52 \wrapper-
53 \brief The QOpenGLFunctions_3_1 class provides all functions for OpenGL 3.1 specification.-
54-
55 This class is a wrapper for functions from OpenGL 3.1 specification.-
56 See reference pages on \l {http://www.opengl.org/sdk/docs/}{opengl.org}-
57 for function documentation.-
58-
59 \sa QAbstractOpenGLFunctions-
60*/-
61-
62QOpenGLFunctions_3_1::QOpenGLFunctions_3_1()-
63 : QAbstractOpenGLFunctions()-
64 , d_1_0_Core(0)-
65 , d_1_1_Core(0)-
66 , d_1_2_Core(0)-
67 , d_1_3_Core(0)-
68 , d_1_4_Core(0)-
69 , d_1_5_Core(0)-
70 , d_2_0_Core(0)-
71 , d_2_1_Core(0)-
72 , d_3_0_Core(0)-
73 , d_3_1_Core(0)-
74{-
75}
never executed: end of block
0
76-
77QOpenGLFunctions_3_1::~QOpenGLFunctions_3_1()-
78{-
79 if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
d_1_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
80 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
81 delete d_1_0_Core;-
82 }
never executed: end of block
0
83 if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
d_1_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_1_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
84 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
85 delete d_1_1_Core;-
86 }
never executed: end of block
0
87 if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
d_1_2_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_2_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
88 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
89 delete d_1_2_Core;-
90 }
never executed: end of block
0
91 if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
d_1_3_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_3_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
92 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
93 delete d_1_3_Core;-
94 }
never executed: end of block
0
95 if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
d_1_4_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_4_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
96 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());-
97 delete d_1_4_Core;-
98 }
never executed: end of block
0
99 if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
d_1_5_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_5_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
100 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());-
101 delete d_1_5_Core;-
102 }
never executed: end of block
0
103 if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
d_2_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_2_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
104 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());-
105 delete d_2_0_Core;-
106 }
never executed: end of block
0
107 if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
d_2_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_2_1_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
108 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());-
109 delete d_2_1_Core;-
110 }
never executed: end of block
0
111 if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
d_3_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_3_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
112 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());-
113 delete d_3_0_Core;-
114 }
never executed: end of block
0
115 if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
d_3_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
!d_3_1_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
116 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());-
117 delete d_3_1_Core;-
118 }
never executed: end of block
0
119}
never executed: end of block
0
120-
121bool QOpenGLFunctions_3_1::initializeOpenGLFunctions()-
122{-
123 if ( isInitialized() )
isInitialized()Description
TRUEnever evaluated
FALSEnever evaluated
0
124 return true;
never executed: return true;
0
125-
126 QOpenGLContext* context = QOpenGLContext::currentContext();-
127-
128 // If owned by a context object make sure it is current.-
129 // Also check that current context is capable of resolving all needed functions-
130 if (((owningContext() && owningContext() == context) || !owningContext())
owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
owningContext() == contextDescription
TRUEnever evaluated
FALSEnever evaluated
!owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
0
131 && QOpenGLFunctions_3_1::isContextCompatible(context))
QOpenGLFunctio...tible(context)Description
TRUEnever evaluated
FALSEnever evaluated
0
132 {-
133 // Associate with private implementation, creating if necessary-
134 // Function pointers in the backends are resolved at creation time-
135 QOpenGLVersionFunctionsBackend* d = 0;-
136 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
137 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
138 d = new QOpenGLFunctions_1_0_CoreBackend(context);-
139 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);-
140 }
never executed: end of block
0
141 d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);-
142 d->refs.ref();-
143-
144 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
145 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
146 d = new QOpenGLFunctions_1_1_CoreBackend(context);-
147 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);-
148 }
never executed: end of block
0
149 d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);-
150 d->refs.ref();-
151-
152 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
153 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
154 d = new QOpenGLFunctions_1_2_CoreBackend(context);-
155 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);-
156 }
never executed: end of block
0
157 d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);-
158 d->refs.ref();-
159-
160 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
161 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
162 d = new QOpenGLFunctions_1_3_CoreBackend(context);-
163 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);-
164 }
never executed: end of block
0
165 d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);-
166 d->refs.ref();-
167-
168 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());-
169 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
170 d = new QOpenGLFunctions_1_4_CoreBackend(context);-
171 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);-
172 }
never executed: end of block
0
173 d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);-
174 d->refs.ref();-
175-
176 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());-
177 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
178 d = new QOpenGLFunctions_1_5_CoreBackend(context);-
179 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);-
180 }
never executed: end of block
0
181 d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);-
182 d->refs.ref();-
183-
184 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());-
185 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
186 d = new QOpenGLFunctions_2_0_CoreBackend(context);-
187 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);-
188 }
never executed: end of block
0
189 d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);-
190 d->refs.ref();-
191-
192 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());-
193 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
194 d = new QOpenGLFunctions_2_1_CoreBackend(context);-
195 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);-
196 }
never executed: end of block
0
197 d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);-
198 d->refs.ref();-
199-
200 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());-
201 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
202 d = new QOpenGLFunctions_3_0_CoreBackend(context);-
203 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);-
204 }
never executed: end of block
0
205 d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);-
206 d->refs.ref();-
207-
208 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());-
209 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
210 d = new QOpenGLFunctions_3_1_CoreBackend(context);-
211 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);-
212 }
never executed: end of block
0
213 d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);-
214 d->refs.ref();-
215-
216 QAbstractOpenGLFunctions::initializeOpenGLFunctions();-
217 }
never executed: end of block
0
218 return isInitialized();
never executed: return isInitialized();
0
219}-
220-
221bool QOpenGLFunctions_3_1::isContextCompatible(QOpenGLContext *context)-
222{-
223 Q_ASSERT(context);-
224 QSurfaceFormat f = context->format();-
225 const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());-
226 if (v < qMakePair(3, 1))
v < qMakePair(3, 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
227 return false;
never executed: return false;
0
228-
229 return true;
never executed: return true;
0
230}-
231-
232QOpenGLVersionProfile QOpenGLFunctions_3_1::versionProfile()-
233{-
234 QOpenGLVersionProfile v;-
235 v.setVersion(3, 1);-
236 return v;
never executed: return v;
0
237}-
238-
239QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9