Changeset 846 for trunk/src/opengl/qgl_qws.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/qgl_qws.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 118 118 else 119 119 return false; 120 }121 122 void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)123 {124 // Find the QGLScreen for this paint device.125 QGLScreen *glScreen = glScreenForDevice(device);126 if (!glScreen) {127 qWarning("QGLContext::chooseContext(): The screen is not a QGLScreen");128 return;129 }130 int devType = device->devType();131 if (devType == QInternal::Image)132 props.setPixelFormat(static_cast<QImage *>(device)->format());133 else134 props.setPixelFormat(glScreen->pixelFormat());135 120 } 136 121 … … 198 183 // Get the display and initialize it. 199 184 d->eglContext = new QEglContext(); 185 200 186 d->eglContext->setApi(QEgl::OpenGL); 201 187 202 188 // Construct the configuration we need for this surface. 203 189 QEglProperties configProps; 204 qt_egl_add_platform_config(configProps, device()); 205 qt_egl_set_format(configProps, devType, d->glFormat); 190 qt_eglproperties_set_glformat(configProps, d->glFormat); 191 configProps.setDeviceType(devType); 192 configProps.setPaintDeviceFormat(device()); 206 193 configProps.setRenderableType(QEgl::OpenGL); 207 194 … … 215 202 216 203 // Inform the higher layers about the actual format properties. 217 qt_ egl_update_format(*(d->eglContext), d->glFormat);204 qt_); 218 205 219 206 // Create a new context for the configuration.
Note:
See TracChangeset
for help on using the changeset viewer.