qopenglfunctions_1_0.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_1_0.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_0.h"-
44#include "qopenglcontext.h"-
45-
46QT_BEGIN_NAMESPACE-
47-
48/*!-
49 \class QOpenGLFunctions_1_0-
50 \inmodule QtGui-
51 \since 5.1-
52 \wrapper-
53 \brief The QOpenGLFunctions_1_0 class provides all functions for OpenGL 1.0 specification.-
54-
55 This class is a wrapper for functions from OpenGL 1.0 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_0::QOpenGLFunctions_1_0()-
63 : QAbstractOpenGLFunctions()-
64 , d_1_0_Core(0)-
65 , d_1_0_Deprecated(0)-
66{-
67}
never executed: end of block
0
68-
69QOpenGLFunctions_1_0::~QOpenGLFunctions_1_0()-
70{-
71 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
72 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
73 delete d_1_0_Core;-
74 }
never executed: end of block
0
75 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
76 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());-
77 delete d_1_0_Deprecated;-
78 }
never executed: end of block
0
79}
never executed: end of block
0
80-
81bool QOpenGLFunctions_1_0::initializeOpenGLFunctions()-
82{-
83 if ( isInitialized() )
isInitialized()Description
TRUEnever evaluated
FALSEnever evaluated
0
84 return true;
never executed: return true;
0
85-
86 QOpenGLContext* context = QOpenGLContext::currentContext();-
87-
88 // If owned by a context object make sure it is current.-
89 // Also check that current context is capable of resolving all needed functions-
90 if (((owningContext() && owningContext() == context) || !owningContext())
owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
owningContext() == contextDescription
TRUEnever evaluated
FALSEnever evaluated
!owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
0
91 && QOpenGLFunctions_1_0::isContextCompatible(context))
QOpenGLFunctio...tible(context)Description
TRUEnever evaluated
FALSEnever evaluated
0
92 {-
93 // Associate with private implementation, creating if necessary-
94 // Function pointers in the backends are resolved at creation time-
95 QOpenGLVersionFunctionsBackend* d = 0;-
96 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
97 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
98 d = new QOpenGLFunctions_1_0_CoreBackend(context);-
99 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);-
100 }
never executed: end of block
0
101 d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);-
102 d->refs.ref();-
103-
104 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());-
105 if (!d) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
106 d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);-
107 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);-
108 }
never executed: end of block
0
109 d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);-
110 d->refs.ref();-
111-
112 QAbstractOpenGLFunctions::initializeOpenGLFunctions();-
113 }
never executed: end of block
0
114 return isInitialized();
never executed: return isInitialized();
0
115}-
116-
117bool QOpenGLFunctions_1_0::isContextCompatible(QOpenGLContext *context)-
118{-
119 Q_ASSERT(context);-
120 QSurfaceFormat f = context->format();-
121 const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());-
122 if (v < qMakePair(1, 0))
v < qMakePair(1, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
123 return false;
never executed: return false;
0
124-
125 if (f.profile() == QSurfaceFormat::CoreProfile)
f.profile() ==...t::CoreProfileDescription
TRUEnever evaluated
FALSEnever evaluated
0
126 return false;
never executed: return false;
0
127-
128 return true;
never executed: return true;
0
129}-
130-
131QOpenGLVersionProfile QOpenGLFunctions_1_0::versionProfile()-
132{-
133 QOpenGLVersionProfile v;-
134 v.setVersion(1, 0);-
135 return v;
never executed: return v;
0
136}-
137-
138QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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