Changeset 561 for trunk/src/opengl/qgl.h
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/opengl/qgl.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtOpenGL module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 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 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 44 44 45 45 #include <QtGui/qwidget.h> 46 #include <QtGui/qpaintengine.h> 46 47 #include <QtOpenGL/qglcolormap.h> 47 48 #include <QtCore/qmap.h> 49 #include <QtCore/qscopedpointer.h> 48 50 49 51 QT_BEGIN_HEADER … … 130 132 namespace QGL 131 133 { 134 Q_OPENGL_EXPORT void setPreferredPaintEngine(QPaintEngine::Type engineType); 135 132 136 enum FormatOption { 133 137 DoubleBuffer = 0x0001, … … 255 259 QGLFormatPrivate *d; 256 260 261 void detach(); 262 257 263 friend Q_OPENGL_EXPORT bool operator==(const QGLFormat&, const QGLFormat&); 258 264 friend Q_OPENGL_EXPORT bool operator!=(const QGLFormat&, const QGLFormat&); … … 277 283 void reset(); 278 284 279 // ### Qt 5: make format() return a const ref instead 285 static bool areSharing(const QGLContext *context1, const QGLContext *context2); 286 280 287 QGLFormat format() const; 281 288 QGLFormat requestedFormat() const; … … 287 294 288 295 virtual void swapBuffers() const; 296 297 enum BindOption { 298 NoBindOption = 0x0000, 299 InvertedYBindOption = 0x0001, 300 MipmapBindOption = 0x0002, 301 PremultipliedAlphaBindOption = 0x0004, 302 LinearFilteringBindOption = 0x0008, 303 304 MemoryManagedBindOption = 0x0010, // internal flag 305 CanFlipNativePixmapBindOption = 0x0020, // internal flag 306 307 DefaultBindOption = LinearFilteringBindOption 308 | InvertedYBindOption 309 | MipmapBindOption, 310 InternalBindOption = MemoryManagedBindOption 311 | PremultipliedAlphaBindOption 312 }; 313 Q_DECLARE_FLAGS(BindOptions, BindOption) 314 315 GLuint bindTexture(const QImage &image, GLenum target, GLint format, 316 BindOptions options); 317 GLuint bindTexture(const QPixmap &pixmap, GLenum target, GLint format, 318 BindOptions options); 289 319 290 320 GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, … … 304 334 GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum = GL_TEXTURE_2D, 305 335 QMacCompatGLint format = GL_RGBA); 336 GLuint bindTexture(const QImage &image, QMacCompatGLenum, QMacCompatGLint format, 337 BindOptions); 338 GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum, QMacCompatGLint format, 339 BindOptions); 306 340 307 341 void deleteTexture(QMacCompatGLuint tx_id); … … 349 383 350 384 private: 351 Q GLContextPrivate*d_ptr;385 QScopedPointer<QGLContextPrivate> d_ptr; 352 386 353 387 friend class QGLPixelBuffer; 354 388 friend class QGLPixelBufferPrivate; 355 389 friend class QGLWidget; 356 friend class QGLDrawable;357 390 friend class QGLWidgetPrivate; 358 391 friend class QGLGlyphCache; … … 364 397 friend class QGLPixmapData; 365 398 friend class QGLPixmapFilterBase; 399 friend class QGLTextureGlyphCache; 400 friend class QGLShareRegister; 401 friend class QGLSharedResourceGuard; 402 friend class QGLPixmapBlurFilter; 366 403 friend QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags(); 367 404 #ifdef Q_WS_MAC … … 372 409 friend QGLContextPrivate *qt_phonon_get_dptr(const QGLContext *); 373 410 #endif 374 #ifdef Q_WS_WIN375 411 friend class QGLFramebufferObject; 376 412 friend class QGLFramebufferObjectPrivate; 377 friend bool qt_resolve_GLSL_functions(QGLContext *ctx);378 friend bool qt_createGLSLProgram(QGLContext *ctx, GLuint &program, const char *shader_src, GLuint &shader);379 #endif 413 friend class QGLFBOGLPaintDevice; 414 friend class QGLPaintDevice; 415 friend class QX11GLPixmapData; 380 416 private: 381 417 Q_DISABLE_COPY(QGLContext) 382 418 }; 383 419 420 Q_DECLARE_OPERATORS_FOR_FLAGS(QGLContext::BindOptions) 384 421 385 422 class Q_OPENGL_EXPORT QGLWidget : public QWidget … … 417 454 void swapBuffers(); 418 455 419 // ### Qt 5: make format() return a const ref instead420 456 QGLFormat format() const; 421 457 void setFormat(const QGLFormat& format); … … 444 480 QPaintEngine *paintEngine() const; 445 481 482 GLuint bindTexture(const QImage &image, GLenum target, GLint format, 483 QGLContext::BindOptions options); 484 GLuint bindTexture(const QPixmap &pixmap, GLenum target, GLint format, 485 QGLContext::BindOptions options); 486 446 487 GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, 447 488 GLint format = GL_RGBA); 448 489 GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, 449 490 GLint format = GL_RGBA); 491 450 492 GLuint bindTexture(const QString &fileName); 451 493 … … 460 502 GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum = GL_TEXTURE_2D, 461 503 QMacCompatGLint format = GL_RGBA); 504 GLuint bindTexture(const QImage &image, QMacCompatGLenum, QMacCompatGLint format, 505 QGLContext::BindOptions); 506 GLuint bindTexture(const QPixmap &pixmap, QMacCompatGLenum, QMacCompatGLint format, 507 QGLContext::BindOptions); 462 508 463 509 void deleteTexture(QMacCompatGLuint tx_id); … … 501 547 friend class QGLPixelBufferPrivate; 502 548 friend class QGLContext; 549 friend class QGLContextPrivate; 503 550 friend class QGLOverlayWidget; 504 551 friend class QOpenGLPaintEngine; 552 friend class QGLPaintDevice; 553 friend class QGLWidgetGLPaintDevice; 505 554 }; 506 555
Note:
See TracChangeset
for help on using the changeset viewer.