qopenglversionfunctionsfactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglversionfunctionsfactory.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtGui module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
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 https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://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 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38**-
39** This file was generated by glgen version 0.1-
40** Command line was: glgen-
41**-
42** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)-
43**-
44** This is an auto-generated file.-
45** Do not edit! All changes made to it will be lost.-
46**-
47****************************************************************************/-
48-
49#include "qopenglversionfunctionsfactory_p.h"-
50-
51#if !defined(QT_OPENGL_ES_2)-
52#include "qopenglfunctions_4_5_core.h"-
53#include "qopenglfunctions_4_5_compatibility.h"-
54#include "qopenglfunctions_4_4_core.h"-
55#include "qopenglfunctions_4_4_compatibility.h"-
56#include "qopenglfunctions_4_3_core.h"-
57#include "qopenglfunctions_4_3_compatibility.h"-
58#include "qopenglfunctions_4_2_core.h"-
59#include "qopenglfunctions_4_2_compatibility.h"-
60#include "qopenglfunctions_4_1_core.h"-
61#include "qopenglfunctions_4_1_compatibility.h"-
62#include "qopenglfunctions_4_0_core.h"-
63#include "qopenglfunctions_4_0_compatibility.h"-
64#include "qopenglfunctions_3_3_core.h"-
65#include "qopenglfunctions_3_3_compatibility.h"-
66#include "qopenglfunctions_3_2_core.h"-
67#include "qopenglfunctions_3_2_compatibility.h"-
68#include "qopenglfunctions_3_1.h"-
69#include "qopenglfunctions_3_0.h"-
70#include "qopenglfunctions_2_1.h"-
71#include "qopenglfunctions_2_0.h"-
72#include "qopenglfunctions_1_5.h"-
73#include "qopenglfunctions_1_4.h"-
74#include "qopenglfunctions_1_3.h"-
75#include "qopenglfunctions_1_2.h"-
76#include "qopenglfunctions_1_1.h"-
77#include "qopenglfunctions_1_0.h"-
78#else-
79#include "qopenglfunctions_es2.h"-
80#endif-
81-
82QT_BEGIN_NAMESPACE-
83-
84QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)-
85{-
86#if !defined(QT_OPENGL_ES_2)-
87 const int major = versionProfile.version().first;-
88 const int minor = versionProfile.version().second;-
89-
90 if (versionProfile.hasProfiles()) {
versionProfile.hasProfiles()Description
TRUEnever evaluated
FALSEnever evaluated
0
91 switch (versionProfile.profile()) {-
92 case QSurfaceFormat::CoreProfile:
never executed: case QSurfaceFormat::CoreProfile:
0
93 if (major == 4 && minor == 5)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 5Description
TRUEnever evaluated
FALSEnever evaluated
0
94 return new QOpenGLFunctions_4_5_Core;
never executed: return new QOpenGLFunctions_4_5_Core;
0
95 else if (major == 4 && minor == 4)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
96 return new QOpenGLFunctions_4_4_Core;
never executed: return new QOpenGLFunctions_4_4_Core;
0
97 else if (major == 4 && minor == 3)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
0
98 return new QOpenGLFunctions_4_3_Core;
never executed: return new QOpenGLFunctions_4_3_Core;
0
99 else if (major == 4 && minor == 2)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
100 return new QOpenGLFunctions_4_2_Core;
never executed: return new QOpenGLFunctions_4_2_Core;
0
101 else if (major == 4 && minor == 1)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
102 return new QOpenGLFunctions_4_1_Core;
never executed: return new QOpenGLFunctions_4_1_Core;
0
103 else if (major == 4 && minor == 0)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
104 return new QOpenGLFunctions_4_0_Core;
never executed: return new QOpenGLFunctions_4_0_Core;
0
105 else if (major == 3 && minor == 3)
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
0
106 return new QOpenGLFunctions_3_3_Core;
never executed: return new QOpenGLFunctions_3_3_Core;
0
107 else if (major == 3 && minor == 2)
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
108 return new QOpenGLFunctions_3_2_Core;
never executed: return new QOpenGLFunctions_3_2_Core;
0
109 break;
never executed: break;
0
110-
111 case QSurfaceFormat::CompatibilityProfile:
never executed: case QSurfaceFormat::CompatibilityProfile:
0
112 if (major == 4 && minor == 5)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 5Description
TRUEnever evaluated
FALSEnever evaluated
0
113 return new QOpenGLFunctions_4_5_Compatibility;
never executed: return new QOpenGLFunctions_4_5_Compatibility;
0
114 else if (major == 4 && minor == 4)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
115 return new QOpenGLFunctions_4_4_Compatibility;
never executed: return new QOpenGLFunctions_4_4_Compatibility;
0
116 else if (major == 4 && minor == 3)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
0
117 return new QOpenGLFunctions_4_3_Compatibility;
never executed: return new QOpenGLFunctions_4_3_Compatibility;
0
118 else if (major == 4 && minor == 2)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
119 return new QOpenGLFunctions_4_2_Compatibility;
never executed: return new QOpenGLFunctions_4_2_Compatibility;
0
120 else if (major == 4 && minor == 1)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
121 return new QOpenGLFunctions_4_1_Compatibility;
never executed: return new QOpenGLFunctions_4_1_Compatibility;
0
122 else if (major == 4 && minor == 0)
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
123 return new QOpenGLFunctions_4_0_Compatibility;
never executed: return new QOpenGLFunctions_4_0_Compatibility;
0
124 else if (major == 3 && minor == 3)
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
0
125 return new QOpenGLFunctions_3_3_Compatibility;
never executed: return new QOpenGLFunctions_3_3_Compatibility;
0
126 else if (major == 3 && minor == 2)
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
127 return new QOpenGLFunctions_3_2_Compatibility;
never executed: return new QOpenGLFunctions_3_2_Compatibility;
0
128 break;
never executed: break;
0
129-
130 case QSurfaceFormat::NoProfile:
never executed: case QSurfaceFormat::NoProfile:
0
131 default:
never executed: default:
0
132 break;
never executed: break;
0
133 };-
134 } else {-
135 if (major == 3 && minor == 1)
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
136 return new QOpenGLFunctions_3_1;
never executed: return new QOpenGLFunctions_3_1;
0
137 else if (major == 3 && minor == 0)
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
138 return new QOpenGLFunctions_3_0;
never executed: return new QOpenGLFunctions_3_0;
0
139 else if (major == 2 && minor == 1)
major == 2Description
TRUEnever evaluated
FALSEnever evaluated
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
140 return new QOpenGLFunctions_2_1;
never executed: return new QOpenGLFunctions_2_1;
0
141 else if (major == 2 && minor == 0)
major == 2Description
TRUEnever evaluated
FALSEnever evaluated
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
142 return new QOpenGLFunctions_2_0;
never executed: return new QOpenGLFunctions_2_0;
0
143 else if (major == 1 && minor == 5)
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
minor == 5Description
TRUEnever evaluated
FALSEnever evaluated
0
144 return new QOpenGLFunctions_1_5;
never executed: return new QOpenGLFunctions_1_5;
0
145 else if (major == 1 && minor == 4)
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
minor == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
146 return new QOpenGLFunctions_1_4;
never executed: return new QOpenGLFunctions_1_4;
0
147 else if (major == 1 && minor == 3)
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
0
148 return new QOpenGLFunctions_1_3;
never executed: return new QOpenGLFunctions_1_3;
0
149 else if (major == 1 && minor == 2)
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
0
150 return new QOpenGLFunctions_1_2;
never executed: return new QOpenGLFunctions_1_2;
0
151 else if (major == 1 && minor == 1)
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
152 return new QOpenGLFunctions_1_1;
never executed: return new QOpenGLFunctions_1_1;
0
153 else if (major == 1 && minor == 0)
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
154 return new QOpenGLFunctions_1_0;
never executed: return new QOpenGLFunctions_1_0;
0
155 }
never executed: end of block
0
156 return 0;
never executed: return 0;
0
157#else-
158 Q_UNUSED(versionProfile);-
159 return new QOpenGLFunctions_ES2;-
160#endif-
161}-
162-
163QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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