Changeset 846 for trunk/src/opengl/qgl.h


Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/opengl/qgl.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    5858# include <OpenGL/gl.h>
    5959# include <OpenGL/glu.h>
    60 #elif defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
     60#elif defined(QT_OPENGL_ES_1)
    6161# include <GLES/gl.h>
    6262#ifndef GL_DOUBLE
     
    145145        HasOverlay              = 0x0100,
    146146        SampleBuffers           = 0x0200,
     147
    147148        SingleBuffer            = DoubleBuffer    << 16,
    148149        NoDepthBuffer           = DepthBuffer     << 16,
     
    154155        IndirectRendering       = DirectRendering << 16,
    155156        NoOverlay               = HasOverlay      << 16,
    156         NoSampleBuffers         = SampleBuffers   << 16
     157        NoSampleBuffers         = SampleBuffers   << 16,
     158        NoDeprecatedFunctions   = DeprecatedFunctions << 16
    157159    };
    158160    Q_DECLARE_FLAGS(FormatOptions, FormatOption)
     
    236238    static bool hasOpenGLOverlays();
    237239
    238     enum  OpenGLVersionFlag {
     240    void setVersion(int major, int minor);
     241    int majorVersion() const;
     242    int minorVersion() const;
     243
     244    enum OpenGLContextProfile {
     245        NoProfile,
     246        CoreProfile,
     247        CompatibilityProfile
     248    };
     249
     250    void setProfile(OpenGLContextProfile profile);
     251    OpenGLContextProfile profile() const;
     252
     253    enum OpenGLVersionFlag {
    239254        OpenGL_Version_None               = 0x00000000,
    240255        OpenGL_Version_1_1                = 0x00000001,
     
    250265        OpenGL_ES_CommonLite_Version_1_1  = 0x00000400,
    251266        OpenGL_ES_Version_2_0             = 0x00000800,
    252         OpenGL_Version_3_0                = 0x00001000
     267        OpenGL_Version_3_0                = 0x00001000,
     268        OpenGL_Version_3_1                = 0x00002000,
     269        OpenGL_Version_3_2                = 0x00004000,
     270        OpenGL_Version_3_3                = 0x00008000,
     271        OpenGL_Version_4_0                = 0x00010000
    253272    };
    254273    Q_DECLARE_FLAGS(OpenGLVersionFlags, OpenGLVersionFlag)
     
    263282    friend Q_OPENGL_EXPORT bool operator==(const QGLFormat&, const QGLFormat&);
    264283    friend Q_OPENGL_EXPORT bool operator!=(const QGLFormat&, const QGLFormat&);
     284
     285
     286
    265287};
    266288
     
    269291Q_OPENGL_EXPORT bool operator==(const QGLFormat&, const QGLFormat&);
    270292Q_OPENGL_EXPORT bool operator!=(const QGLFormat&, const QGLFormat&);
     293
     294
     295
     296
    271297
    272298class Q_OPENGL_EXPORT QGLContext
     
    360386    virtual int choosePixelFormat(void* pfd, HDC pdc);
    361387#endif
    362 #if defined(Q_WS_X11) && !defined(QT_OPENGL_ES)
     388#if defined(Q_WS_X11) && )
    363389    virtual void* tryVisual(const QGLFormat& f, int bufDepth = 1);
    364390    virtual void* chooseVisual();
     
    403429    friend class QGLPixmapBlurFilter;
    404430    friend class QGLExtensions;
     431
    405432    friend QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags();
    406433#ifdef Q_WS_MAC
     
    415442    friend class QGLFBOGLPaintDevice;
    416443    friend class QGLPaintDevice;
     444
    417445    friend class QX11GLPixmapData;
     446
    418447private:
    419448    Q_DISABLE_COPY(QGLContext)
Note: See TracChangeset for help on using the changeset viewer.