qopenglfunctions_1_3.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_1_3.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_1_3.h"-
44#include "qopenglcontext.h"-
45-
46QT_BEGIN_NAMESPACE-
47-
48/*!-
49 \class QOpenGLFunctions_1_3-
50 \inmodule QtGui-
51 \since 5.1-
52 \wrapper-
53 \brief The QOpenGLFunctions_1_3 class provides all functions for OpenGL 1.3 specification.-
54-
55 This class is a wrapper for functions from OpenGL 1.3 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_1_3::QOpenGLFunctions_1_3()-
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_0_Deprecated(0)-
69 , d_1_1_Deprecated(0)-
70 , d_1_2_Deprecated(0)-
71 , d_1_3_Deprecated(0)-
72{-
73}
never executed: end of block
0
74-
75QOpenGLFunctions_1_3::~QOpenGLFunctions_1_3()-
76{-
77 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
78 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
79 delete d_1_0_Core;-
80 }
never executed: end of block
0
81 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
82 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
83 delete d_1_1_Core;-
84 }
never executed: end of block
0
85 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
86 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
87 delete d_1_2_Core;-
88 }
never executed: end of block
0
89 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
90 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
91 delete d_1_3_Core;-
92 }
never executed: end of block
0
93 if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
d_1_0_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_0_Depreca...->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
94 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());-
95 delete d_1_0_Deprecated;-
96 }
never executed: end of block
0
97 if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
d_1_1_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_1_Depreca...->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
98 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());-
99 delete d_1_1_Deprecated;-
100 }
never executed: end of block
0
101 if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
d_1_2_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_2_Depreca...->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
102 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());-
103 delete d_1_2_Deprecated;-
104 }
never executed: end of block
0
105 if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
d_1_3_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
!d_1_3_Depreca...->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
0
106 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());-
107 delete d_1_3_Deprecated;-
108 }
never executed: end of block
0
109}
never executed: end of block
0
110-
111bool QOpenGLFunctions_1_3::initializeOpenGLFunctions()-
112{-
113 if ( isInitialized() )
isInitialized()Description
TRUEnever evaluated
FALSEnever evaluated
0
114 return true;
never executed: return true;
0
115-
116 QOpenGLContext* context = QOpenGLContext::currentContext();-
117-
118 // If owned by a context object make sure it is current.-
119 // Also check that current context is capable of resolving all needed functions-
120 if (((owningContext() && owningContext() == context) || !owningContext())
owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
owningContext() == contextDescription
TRUEnever evaluated
FALSEnever evaluated
!owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
0
121 && QOpenGLFunctions_1_3::isContextCompatible(context))
QOpenGLFunctio...tible(context)Description
TRUEnever evaluated
FALSEnever evaluated
0
122 {-
123 // Associate with private implementation, creating if necessary-
124 // Function pointers in the backends are resolved at creation time-
125 QOpenGLVersionFunctionsBackend* d = 0;-
126 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
127 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
128 d = new QOpenGLFunctions_1_0_CoreBackend(context);-
129 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);-
130 }
never executed: end of block
0
131 d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);-
132 d->refs.ref();-
133-
134 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
135 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
136 d = new QOpenGLFunctions_1_1_CoreBackend(context);-
137 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);-
138 }
never executed: end of block
0
139 d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);-
140 d->refs.ref();-
141-
142 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
143 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
144 d = new QOpenGLFunctions_1_2_CoreBackend(context);-
145 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);-
146 }
never executed: end of block
0
147 d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);-
148 d->refs.ref();-
149-
150 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
151 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
152 d = new QOpenGLFunctions_1_3_CoreBackend(context);-
153 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);-
154 }
never executed: end of block
0
155 d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);-
156 d->refs.ref();-
157-
158 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());-
159 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
160 d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);-
161 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);-
162 }
never executed: end of block
0
163 d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);-
164 d->refs.ref();-
165-
166 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());-
167 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
168 d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);-
169 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);-
170 }
never executed: end of block
0
171 d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);-
172 d->refs.ref();-
173-
174 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());-
175 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
176 d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);-
177 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);-
178 }
never executed: end of block
0
179 d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);-
180 d->refs.ref();-
181-
182 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());-
183 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
184 d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);-
185 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);-
186 }
never executed: end of block
0
187 d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);-
188 d->refs.ref();-
189-
190 QAbstractOpenGLFunctions::initializeOpenGLFunctions();-
191 }
never executed: end of block
0
192 return isInitialized();
never executed: return isInitialized();
0
193}-
194-
195bool QOpenGLFunctions_1_3::isContextCompatible(QOpenGLContext *context)-
196{-
197 Q_ASSERT(context);-
198 QSurfaceFormat f = context->format();-
199 const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());-
200 if (v < qMakePair(1, 3))
v < qMakePair(1, 3)Description
TRUEnever evaluated
FALSEnever evaluated
0
201 return false;
never executed: return false;
0
202-
203 if (f.profile() == QSurfaceFormat::CoreProfile)
f.profile() ==...t::CoreProfileDescription
TRUEnever evaluated
FALSEnever evaluated
0
204 return false;
never executed: return false;
0
205-
206 return true;
never executed: return true;
0
207}-
208-
209QOpenGLVersionProfile QOpenGLFunctions_1_3::versionProfile()-
210{-
211 QOpenGLVersionProfile v;-
212 v.setVersion(1, 3);-
213 return v;
never executed: return v;
0
214}-
215-
216QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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