Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/opengl/qgl_qws.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    8282    else
    8383        return 0;
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
    84106}
    85107
     
    312334}
    313335
    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 be
    324     // problematic under QWS.  So use a pbuffer instead.
    325     //
    326     // Unfortunately OpenGL/ES 2.0 systems don't normally
    327     // support pbuffers, so we have no choice but to try
    328     // 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 #else
    337     QGLPixelBuffer pbuffer(16, 16);
    338     pbuffer.makeCurrent();
    339 
    340     init_extensions();
    341 
    342     pbuffer.doneCurrent();
    343 #endif
    344 }
    345 
    346336QT_END_NAMESPACE
Note: See TracChangeset for help on using the changeset viewer.