Changeset 651 for trunk/src/opengl/qgl_qws.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/qgl_qws.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 82 82 else 83 83 return 0; 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 84 106 } 85 107 … … 312 334 } 313 335 314 void QGLExtensions::init()315 {316 static bool init_done = false;317 318 if (init_done)319 return;320 init_done = true;321 322 // We need a context current to initialize the extensions,323 // but getting a valid EGLNativeWindowType this early can be324 // problematic under QWS. So use a pbuffer instead.325 //326 // Unfortunately OpenGL/ES 2.0 systems don't normally327 // support pbuffers, so we have no choice but to try328 // our luck with a window on those systems.329 #if defined(QT_OPENGL_ES_2)330 QGLWidget tmpWidget;331 tmpWidget.makeCurrent();332 333 init_extensions();334 335 tmpWidget.doneCurrent();336 #else337 QGLPixelBuffer pbuffer(16, 16);338 pbuffer.makeCurrent();339 340 init_extensions();341 342 pbuffer.doneCurrent();343 #endif344 }345 346 336 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.