source: trunk/src/gui/egl/qegl_stub.cpp@ 1108

Last change on this file since 1108 was 846, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 6.6 KB
RevLine 
[767]1/****************************************************************************
2**
[846]3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
[767]4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtGui module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#include <QtGui/qpaintdevice.h>
43#include <QtGui/qpixmap.h>
44#include <QtGui/qwidget.h>
45#include <QtCore/qdebug.h>
46
47#include "qegl_p.h"
[846]48#include "qeglcontext_p.h"
[767]49
[846]50
[767]51QT_BEGIN_NAMESPACE
52
53static void noegl(const char *fn)
54{
55 qWarning() << fn << " called, but Qt configured without EGL" << endl;
56}
57
58#define NOEGL noegl(__FUNCTION__);
59
60QEglContext::QEglContext()
61 : apiType(QEgl::OpenGL)
62 , ctx(0)
[846]63 , cfg(QEGL_NO_CONFIG)
[767]64 , currentSurface(0)
65 , current(false)
66 , ownsContext(true)
67 , sharing(false)
68{
69 NOEGL
70}
71
72QEglContext::~QEglContext()
73{
74 NOEGL
75}
76
77bool QEglContext::isValid() const
78{
79 NOEGL
80 return false;
81}
82
83bool QEglContext::isCurrent() const
84{
85 NOEGL
86 return false;
87}
88
[846]89EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options)
90{
91 Q_UNUSED(devType)
92 Q_UNUSED(api)
93 Q_UNUSED(options)
94 NOEGL
95 return QEGL_NO_CONFIG;
96}
97
98
99// Choose a configuration that matches "properties".
100EGLConfig QEgl::chooseConfig(const QEglProperties* properties, QEgl::PixelFormatMatch match)
101{
102 Q_UNUSED(properties)
103 Q_UNUSED(match)
104 NOEGL
105 return QEGL_NO_CONFIG;
106}
107
[767]108bool QEglContext::chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match)
109{
110 Q_UNUSED(properties)
111 Q_UNUSED(match)
112 NOEGL
113 return false;
114}
115
116EGLSurface QEglContext::createSurface(QPaintDevice* device, const QEglProperties *properties)
117{
118 Q_UNUSED(device)
119 Q_UNUSED(properties)
120 NOEGL
121 return 0;
122}
123
124
125// Create the EGLContext.
126bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties *properties)
127{
128 Q_UNUSED(shareContext)
129 Q_UNUSED(properties)
130 NOEGL
131 return false;
132}
133
134// Destroy an EGL surface object. If it was current on this context
135// then call doneCurrent() for it first.
136void QEglContext::destroySurface(EGLSurface surface)
137{
138 Q_UNUSED(surface)
139 NOEGL
140}
141
142// Destroy the context. Note: this does not destroy the surface.
143void QEglContext::destroyContext()
144{
145 NOEGL
146}
147
148bool QEglContext::makeCurrent(EGLSurface surface)
149{
150 Q_UNUSED(surface)
151 NOEGL
152 return false;
153}
154
155bool QEglContext::doneCurrent()
156{
157 NOEGL
158 return false;
159}
160
161// Act as though doneCurrent() was called, but keep the context
162// and the surface active for the moment. This allows makeCurrent()
163// to skip a call to eglMakeCurrent() if we are using the same
164// surface as the last set of painting operations. We leave the
165// currentContext() pointer as-is for now.
166bool QEglContext::lazyDoneCurrent()
167{
168 NOEGL
169 return false;
170}
171
172bool QEglContext::swapBuffers(EGLSurface surface)
173{
174 Q_UNUSED(surface)
175 NOEGL
176 return false;
177}
178
[846]179bool QEglContext::swapBuffersRegion2NOK(EGLSurface surface, const QRegion *region)
[767]180{
[846]181 Q_UNUSED(surface)
182 Q_UNUSED(region)
[767]183 NOEGL
184 return false;
185}
186
[846]187int QEglContext::configAttrib(int name) const
[767]188{
[846]189 Q_UNUSED(name)
[767]190 NOEGL
[846]191 return 0;
[767]192}
193
[846]194EGLDisplay QEgl::display()
[767]195{
196 NOEGL
197 return 0;
198}
199
[846]200EGLImageKHR QEgl::eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
[767]201{
[846]202 Q_UNUSED(dpy)
203 Q_UNUSED(ctx)
204 Q_UNUSED(target)
205 Q_UNUSED(buffer)
206 Q_UNUSED(attrib_list)
[767]207 NOEGL
208 return 0;
209}
210
[846]211EGLBoolean QEgl::eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img)
212{
213 Q_UNUSED(dpy)
214 Q_UNUSED(img)
215 NOEGL
216 return 0;
217}
218
219EGLBoolean QEgl::eglSwapBuffersRegion2NOK(EGLDisplay dpy, EGLSurface surface, EGLint count, const EGLint *rects)
220{
221 Q_UNUSED(dpy);
222 Q_UNUSED(surface);
223 Q_UNUSED(count);
224 Q_UNUSED(rects);
225 NOEGL
226 return 0;
227}
228
229#ifndef Q_WS_X11
230EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties)
231{
232 Q_UNUSED(device)
233 Q_UNUSED(cfg)
234 Q_UNUSED(properties)
235 NOEGL
236 return 0;
237}
238#endif
239
240
[767]241// Return the error string associated with a specific code.
[846]242QString QEgl::errorString(EGLint code)
[767]243{
244 Q_UNUSED(code)
245 NOEGL
246 return QString();
247}
248
249// Dump all of the EGL configurations supported by the system.
[846]250void QEgl::dumpAllConfigs()
[767]251{
252 NOEGL
253}
254
[846]255QString QEgl::extensions()
[767]256{
257 NOEGL
258 return QString();
259}
260
[846]261bool QEgl::hasExtension(const char* extensionName)
[767]262{
263 Q_UNUSED(extensionName)
264 NOEGL
265 return false;
266}
267
268QEglContext *QEglContext::currentContext(QEgl::API api)
269{
270 Q_UNUSED(api)
271 NOEGL
272 return false;
273}
274
275void QEglContext::setCurrentContext(QEgl::API api, QEglContext *context)
276{
277 Q_UNUSED(api)
278 Q_UNUSED(context)
279 NOEGL
280}
281
[846]282EGLNativeDisplayType QEgl::nativeDisplay()
[767]283{
284 NOEGL
285 return 0;
286}
287
[846]288EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
[767]289{
[846]290 Q_UNUSED(widget)
[767]291 NOEGL
[846]292 return (EGLNativeWindowType)0;
[767]293}
294
[846]295EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
[767]296{
297 NOEGL
[846]298 return (EGLNativePixmapType)0;
[767]299}
300
301QT_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.