summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in3
-rw-r--r--src/gui/accessible/qaccessible.cpp121
-rw-r--r--src/gui/accessible/qaccessible.h23
-rw-r--r--src/gui/accessible/qaccessiblebridge.cpp14
-rw-r--r--src/gui/accessible/qaccessiblebridge.h14
-rw-r--r--src/gui/accessible/qaccessiblecache.cpp18
-rw-r--r--src/gui/accessible/qaccessiblecache_mac.mm43
-rw-r--r--src/gui/accessible/qaccessiblecache_p.h18
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp14
-rw-r--r--src/gui/accessible/qaccessibleobject.h14
-rw-r--r--src/gui/accessible/qaccessibleplugin.cpp14
-rw-r--r--src/gui/accessible/qaccessibleplugin.h14
-rw-r--r--src/gui/accessible/qplatformaccessibility.cpp14
-rw-r--r--src/gui/accessible/qplatformaccessibility.h14
-rw-r--r--src/gui/animation/qguivariantanimation.cpp14
-rw-r--r--src/gui/doc/snippets/brush/brush.cpp8
-rw-r--r--src/gui/doc/snippets/brush/gradientcreationsnippet.cpp8
-rw-r--r--src/gui/doc/snippets/clipboard/clipwindow.cpp8
-rw-r--r--src/gui/doc/snippets/clipboard/clipwindow.h8
-rw-r--r--src/gui/doc/snippets/clipboard/main.cpp8
-rw-r--r--src/gui/doc/snippets/code/doc_src_coordsys.cpp8
-rw-r--r--src/gui/doc/snippets/code/doc_src_richtext.cpp8
-rw-r--r--src/gui/doc/snippets/code/doc_src_richtext.qdoc8
-rw-r--r--src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qicon.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qimage.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qmovie.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qpen.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qregion.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qfont.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp8
-rw-r--r--src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp8
-rw-r--r--src/gui/doc/snippets/draganddrop/dragwidget.cpp8
-rw-r--r--src/gui/doc/snippets/draganddrop/dragwidget.h8
-rw-r--r--src/gui/doc/snippets/draganddrop/main.cpp8
-rw-r--r--src/gui/doc/snippets/draganddrop/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/draganddrop/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/dragging/main.cpp8
-rw-r--r--src/gui/doc/snippets/dragging/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/dragging/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/droparea.cpp8
-rw-r--r--src/gui/doc/snippets/dropevents/main.cpp8
-rw-r--r--src/gui/doc/snippets/dropevents/window.cpp8
-rw-r--r--src/gui/doc/snippets/dropevents/window.h8
-rw-r--r--src/gui/doc/snippets/droprectangle/main.cpp8
-rw-r--r--src/gui/doc/snippets/droprectangle/window.cpp8
-rw-r--r--src/gui/doc/snippets/droprectangle/window.h8
-rw-r--r--src/gui/doc/snippets/image/image.cpp8
-rw-r--r--src/gui/doc/snippets/image/supportedformat.cpp8
-rw-r--r--src/gui/doc/snippets/matrix/matrix.cpp8
-rw-r--r--src/gui/doc/snippets/picture/picture.cpp8
-rw-r--r--src/gui/doc/snippets/plaintextlayout/main.cpp8
-rw-r--r--src/gui/doc/snippets/plaintextlayout/window.cpp8
-rw-r--r--src/gui/doc/snippets/plaintextlayout/window.h8
-rw-r--r--src/gui/doc/snippets/polygon/polygon.cpp8
-rw-r--r--src/gui/doc/snippets/qfontdatabase/main.cpp8
-rw-r--r--src/gui/doc/snippets/qstatustipevent/main.cpp8
-rw-r--r--src/gui/doc/snippets/qtextobject/textobjectinterface.h8
-rw-r--r--src/gui/doc/snippets/scribe-overview/main.cpp8
-rw-r--r--src/gui/doc/snippets/separations/finalwidget.cpp8
-rw-r--r--src/gui/doc/snippets/separations/finalwidget.h8
-rw-r--r--src/gui/doc/snippets/separations/main.cpp8
-rw-r--r--src/gui/doc/snippets/separations/screenwidget.cpp8
-rw-r--r--src/gui/doc/snippets/separations/screenwidget.h8
-rw-r--r--src/gui/doc/snippets/separations/separations.qdoc8
-rw-r--r--src/gui/doc/snippets/separations/viewer.cpp8
-rw-r--r--src/gui/doc/snippets/separations/viewer.h8
-rw-r--r--src/gui/doc/snippets/textblock-formats/main.cpp8
-rw-r--r--src/gui/doc/snippets/textblock-fragments/main.cpp8
-rw-r--r--src/gui/doc/snippets/textblock-fragments/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textblock-fragments/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp8
-rw-r--r--src/gui/doc/snippets/textblock-fragments/xmlwriter.h8
-rw-r--r--src/gui/doc/snippets/textdocument-blocks/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-blocks/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-blocks/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-blocks/xmlwriter.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-blocks/xmlwriter.h8
-rw-r--r--src/gui/doc/snippets/textdocument-charformats/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-css/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-cursors/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-find/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-frames/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-frames/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-frames/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-frames/xmlwriter.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-frames/xmlwriter.h8
-rw-r--r--src/gui/doc/snippets/textdocument-imagedrop/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-imagedrop/textedit.h8
-rw-r--r--src/gui/doc/snippets/textdocument-imageformat/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-images/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-listitems/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-listitems/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-lists/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-printing/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-printing/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-printing/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-resources/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-selections/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-selections/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-selections/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-tables/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-tables/mainwindow.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-tables/mainwindow.h8
-rw-r--r--src/gui/doc/snippets/textdocument-tables/xmlwriter.cpp8
-rw-r--r--src/gui/doc/snippets/textdocument-tables/xmlwriter.h8
-rw-r--r--src/gui/doc/snippets/textdocument-texttable/main.cpp8
-rw-r--r--src/gui/doc/snippets/textdocumentendsnippet.cpp8
-rw-r--r--src/gui/doc/snippets/transform/main.cpp8
-rw-r--r--src/gui/doc/src/coordsys.qdoc12
-rw-r--r--src/gui/doc/src/dnd.qdoc12
-rw-r--r--src/gui/doc/src/external-resources.qdoc12
-rw-r--r--src/gui/doc/src/paintsystem.qdoc12
-rw-r--r--src/gui/doc/src/qtgui.qdoc12
-rw-r--r--src/gui/doc/src/richtext.qdoc12
-rw-r--r--src/gui/gui.pro4
-rw-r--r--src/gui/image/image.pri2
-rw-r--r--src/gui/image/qbitmap.cpp14
-rw-r--r--src/gui/image/qbitmap.h14
-rw-r--r--src/gui/image/qbmphandler.cpp20
-rw-r--r--src/gui/image/qbmphandler_p.h14
-rw-r--r--src/gui/image/qgifhandler.cpp14
-rw-r--r--src/gui/image/qgifhandler_p.h36
-rw-r--r--src/gui/image/qicon.cpp20
-rw-r--r--src/gui/image/qicon.h14
-rw-r--r--src/gui/image/qicon_p.h38
-rw-r--r--src/gui/image/qiconengine.cpp14
-rw-r--r--src/gui/image/qiconengine.h14
-rw-r--r--src/gui/image/qiconengineplugin.cpp14
-rw-r--r--src/gui/image/qiconengineplugin.h14
-rw-r--r--src/gui/image/qiconloader.cpp142
-rw-r--r--src/gui/image/qiconloader_p.h34
-rw-r--r--src/gui/image/qimage.cpp152
-rw-r--r--src/gui/image/qimage.h58
-rw-r--r--src/gui/image/qimage_avx2.cpp61
-rw-r--r--src/gui/image/qimage_compat.cpp14
-rw-r--r--src/gui/image/qimage_conversions.cpp991
-rw-r--r--src/gui/image/qimage_mips_dspr2.cpp12
-rw-r--r--src/gui/image/qimage_mips_dspr2_asm.S34
-rw-r--r--src/gui/image/qimage_neon.cpp14
-rw-r--r--src/gui/image/qimage_p.h16
-rw-r--r--src/gui/image/qimage_sse2.cpp21
-rw-r--r--src/gui/image/qimage_sse4.cpp70
-rw-r--r--src/gui/image/qimage_ssse3.cpp18
-rw-r--r--src/gui/image/qimageiohandler.cpp20
-rw-r--r--src/gui/image/qimageiohandler.h18
-rw-r--r--src/gui/image/qimagepixmapcleanuphooks.cpp14
-rw-r--r--src/gui/image/qimagepixmapcleanuphooks_p.h14
-rw-r--r--src/gui/image/qimagereader.cpp16
-rw-r--r--src/gui/image/qimagereader.h14
-rw-r--r--src/gui/image/qimagewriter.cpp79
-rw-r--r--src/gui/image/qimagewriter.h20
-rw-r--r--src/gui/image/qjpeghandler.cpp122
-rw-r--r--src/gui/image/qjpeghandler_p.h28
-rw-r--r--src/gui/image/qmovie.cpp14
-rw-r--r--src/gui/image/qmovie.h17
-rw-r--r--src/gui/image/qnativeimage.cpp14
-rw-r--r--src/gui/image/qnativeimage_p.h14
-rw-r--r--src/gui/image/qpaintengine_pic.cpp14
-rw-r--r--src/gui/image/qpaintengine_pic_p.h41
-rw-r--r--src/gui/image/qpicture.cpp24
-rw-r--r--src/gui/image/qpicture.h20
-rw-r--r--src/gui/image/qpicture_p.h14
-rw-r--r--src/gui/image/qpictureformatplugin.cpp14
-rw-r--r--src/gui/image/qpictureformatplugin.h14
-rw-r--r--src/gui/image/qpixmap.cpp22
-rw-r--r--src/gui/image/qpixmap.h20
-rw-r--r--src/gui/image/qpixmap_blitter.cpp14
-rw-r--r--src/gui/image/qpixmap_blitter_p.h36
-rw-r--r--src/gui/image/qpixmap_raster.cpp23
-rw-r--r--src/gui/image/qpixmap_raster_p.h48
-rw-r--r--src/gui/image/qpixmap_win.cpp14
-rw-r--r--src/gui/image/qpixmapcache.cpp16
-rw-r--r--src/gui/image/qpixmapcache.h14
-rw-r--r--src/gui/image/qpixmapcache_p.h14
-rw-r--r--src/gui/image/qplatformpixmap.cpp14
-rw-r--r--src/gui/image/qplatformpixmap.h14
-rw-r--r--src/gui/image/qpnghandler.cpp47
-rw-r--r--src/gui/image/qpnghandler_p.h14
-rw-r--r--src/gui/image/qppmhandler.cpp122
-rw-r--r--src/gui/image/qppmhandler_p.h14
-rw-r--r--src/gui/image/qxbmhandler.cpp14
-rw-r--r--src/gui/image/qxbmhandler_p.h14
-rw-r--r--src/gui/image/qxpmhandler.cpp28
-rw-r--r--src/gui/image/qxpmhandler_p.h14
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp20
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.h62
-rw-r--r--src/gui/itemmodels/qstandarditemmodel_p.h14
-rw-r--r--src/gui/kernel/kernel.pri11
-rw-r--r--src/gui/kernel/qclipboard.cpp14
-rw-r--r--src/gui/kernel/qclipboard.h14
-rw-r--r--src/gui/kernel/qcursor.cpp31
-rw-r--r--src/gui/kernel/qcursor.h15
-rw-r--r--src/gui/kernel/qcursor_p.h14
-rw-r--r--src/gui/kernel/qdnd.cpp14
-rw-r--r--src/gui/kernel/qdnd_p.h20
-rw-r--r--src/gui/kernel/qdrag.cpp14
-rw-r--r--src/gui/kernel/qdrag.h14
-rw-r--r--src/gui/kernel/qevent.cpp266
-rw-r--r--src/gui/kernel/qevent.h46
-rw-r--r--src/gui/kernel/qevent_p.h14
-rw-r--r--src/gui/kernel/qgenericplugin.cpp14
-rw-r--r--src/gui/kernel/qgenericplugin.h14
-rw-r--r--src/gui/kernel/qgenericpluginfactory.cpp14
-rw-r--r--src/gui/kernel/qgenericpluginfactory.h14
-rw-r--r--src/gui/kernel/qguiapplication.cpp164
-rw-r--r--src/gui/kernel/qguiapplication.h20
-rw-r--r--src/gui/kernel/qguiapplication_p.h26
-rw-r--r--src/gui/kernel/qguivariant.cpp14
-rw-r--r--src/gui/kernel/qinputdevicemanager.cpp88
-rw-r--r--src/gui/kernel/qinputdevicemanager_p.h80
-rw-r--r--src/gui/kernel/qinputdevicemanager_p_p.h69
-rw-r--r--src/gui/kernel/qinputmethod.cpp14
-rw-r--r--src/gui/kernel/qinputmethod.h16
-rw-r--r--src/gui/kernel/qinputmethod_p.h14
-rw-r--r--src/gui/kernel/qkeymapper.cpp14
-rw-r--r--src/gui/kernel/qkeymapper_p.h14
-rw-r--r--src/gui/kernel/qkeysequence.cpp22
-rw-r--r--src/gui/kernel/qkeysequence.h19
-rw-r--r--src/gui/kernel/qkeysequence_p.h14
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp28
-rw-r--r--src/gui/kernel/qoffscreensurface.h22
-rw-r--r--src/gui/kernel/qopenglcontext.cpp144
-rw-r--r--src/gui/kernel/qopenglcontext.h19
-rw-r--r--src/gui/kernel/qopenglcontext_p.h21
-rw-r--r--src/gui/kernel/qopenglwindow.cpp68
-rw-r--r--src/gui/kernel/qopenglwindow.h17
-rw-r--r--src/gui/kernel/qpaintdevicewindow.cpp19
-rw-r--r--src/gui/kernel/qpaintdevicewindow.h14
-rw-r--r--src/gui/kernel/qpaintdevicewindow_p.h26
-rw-r--r--src/gui/kernel/qpalette.cpp17
-rw-r--r--src/gui/kernel/qpalette.h17
-rw-r--r--src/gui/kernel/qpixelformat.cpp32
-rw-r--r--src/gui/kernel/qpixelformat.h33
-rw-r--r--src/gui/kernel/qplatformclipboard.cpp14
-rw-r--r--src/gui/kernel/qplatformclipboard.h14
-rw-r--r--src/gui/kernel/qplatformcursor.cpp14
-rw-r--r--src/gui/kernel/qplatformcursor.h14
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp14
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h14
-rw-r--r--src/gui/kernel/qplatformdrag.cpp73
-rw-r--r--src/gui/kernel/qplatformdrag.h14
-rw-r--r--src/gui/kernel/qplatformgraphicsbuffer.cpp269
-rw-r--r--src/gui/kernel/qplatformgraphicsbuffer.h109
-rw-r--r--src/gui/kernel/qplatformgraphicsbufferhelper.cpp184
-rw-r--r--src/gui/kernel/qplatformgraphicsbufferhelper.h48
-rw-r--r--src/gui/kernel/qplatforminputcontext.cpp24
-rw-r--r--src/gui/kernel/qplatforminputcontext.h14
-rw-r--r--src/gui/kernel/qplatforminputcontext_p.h14
-rw-r--r--src/gui/kernel/qplatforminputcontextfactory.cpp14
-rw-r--r--src/gui/kernel/qplatforminputcontextfactory_p.h14
-rw-r--r--src/gui/kernel/qplatforminputcontextplugin.cpp14
-rw-r--r--src/gui/kernel/qplatforminputcontextplugin_p.h14
-rw-r--r--src/gui/kernel/qplatformintegration.cpp55
-rw-r--r--src/gui/kernel/qplatformintegration.h23
-rw-r--r--src/gui/kernel/qplatformintegrationfactory.cpp14
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_p.h14
-rw-r--r--src/gui/kernel/qplatformintegrationplugin.cpp14
-rw-r--r--src/gui/kernel/qplatformintegrationplugin.h14
-rw-r--r--src/gui/kernel/qplatformmenu.cpp14
-rw-r--r--src/gui/kernel/qplatformmenu.h15
-rw-r--r--src/gui/kernel/qplatformnativeinterface.cpp14
-rw-r--r--src/gui/kernel/qplatformnativeinterface.h14
-rw-r--r--src/gui/kernel/qplatformoffscreensurface.cpp14
-rw-r--r--src/gui/kernel/qplatformoffscreensurface.h16
-rw-r--r--src/gui/kernel/qplatformopenglcontext.cpp24
-rw-r--r--src/gui/kernel/qplatformopenglcontext.h16
-rw-r--r--src/gui/kernel/qplatformscreen.cpp136
-rw-r--r--src/gui/kernel/qplatformscreen.h27
-rw-r--r--src/gui/kernel/qplatformscreen_p.h16
-rw-r--r--src/gui/kernel/qplatformservices.cpp14
-rw-r--r--src/gui/kernel/qplatformservices.h14
-rw-r--r--src/gui/kernel/qplatformsessionmanager.cpp14
-rw-r--r--src/gui/kernel/qplatformsessionmanager.h14
-rw-r--r--src/gui/kernel/qplatformsharedgraphicscache.cpp14
-rw-r--r--src/gui/kernel/qplatformsharedgraphicscache.h14
-rw-r--r--src/gui/kernel/qplatformsurface.cpp14
-rw-r--r--src/gui/kernel/qplatformsurface.h14
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.cpp16
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.h16
-rw-r--r--src/gui/kernel/qplatformtheme.cpp115
-rw-r--r--src/gui/kernel/qplatformtheme.h22
-rw-r--r--src/gui/kernel/qplatformtheme_p.h14
-rw-r--r--src/gui/kernel/qplatformthemefactory.cpp14
-rw-r--r--src/gui/kernel/qplatformthemefactory_p.h14
-rw-r--r--src/gui/kernel/qplatformthemeplugin.cpp14
-rw-r--r--src/gui/kernel/qplatformthemeplugin.h14
-rw-r--r--src/gui/kernel/qplatformwindow.cpp54
-rw-r--r--src/gui/kernel/qplatformwindow.h17
-rw-r--r--src/gui/kernel/qplatformwindow_p.h14
-rw-r--r--src/gui/kernel/qrasterwindow.cpp14
-rw-r--r--src/gui/kernel/qrasterwindow.h14
-rw-r--r--src/gui/kernel/qscreen.cpp114
-rw-r--r--src/gui/kernel/qscreen.h15
-rw-r--r--src/gui/kernel/qscreen_p.h14
-rw-r--r--src/gui/kernel/qsessionmanager.cpp14
-rw-r--r--src/gui/kernel/qsessionmanager.h14
-rw-r--r--src/gui/kernel/qsessionmanager_p.h14
-rw-r--r--src/gui/kernel/qshapedpixmapdndwindow.cpp14
-rw-r--r--src/gui/kernel/qshapedpixmapdndwindow_p.h16
-rw-r--r--src/gui/kernel/qshortcutmap.cpp24
-rw-r--r--src/gui/kernel/qshortcutmap_p.h14
-rw-r--r--src/gui/kernel/qsimpledrag.cpp22
-rw-r--r--src/gui/kernel/qsimpledrag_p.h28
-rw-r--r--src/gui/kernel/qstylehints.cpp98
-rw-r--r--src/gui/kernel/qstylehints.h38
-rw-r--r--src/gui/kernel/qsurface.cpp14
-rw-r--r--src/gui/kernel/qsurface.h18
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp29
-rw-r--r--src/gui/kernel/qsurfaceformat.h17
-rw-r--r--src/gui/kernel/qt_gui_pch.h14
-rw-r--r--src/gui/kernel/qtouchdevice.cpp17
-rw-r--r--src/gui/kernel/qtouchdevice.h17
-rw-r--r--src/gui/kernel/qtouchdevice_p.h14
-rw-r--r--src/gui/kernel/qwindow.cpp157
-rw-r--r--src/gui/kernel/qwindow.h32
-rw-r--r--src/gui/kernel/qwindow_p.h30
-rw-r--r--src/gui/kernel/qwindowdefs.h14
-rw-r--r--src/gui/kernel/qwindowdefs_win.h14
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp80
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h23
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h39
-rw-r--r--src/gui/math3d/qgenericmatrix.cpp22
-rw-r--r--src/gui/math3d/qgenericmatrix.h18
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp114
-rw-r--r--src/gui/math3d/qmatrix4x4.h22
-rw-r--r--src/gui/math3d/qquaternion.cpp450
-rw-r--r--src/gui/math3d/qquaternion.h80
-rw-r--r--src/gui/math3d/qvector2d.cpp52
-rw-r--r--src/gui/math3d/qvector2d.h29
-rw-r--r--src/gui/math3d/qvector3d.cpp117
-rw-r--r--src/gui/math3d/qvector3d.h34
-rw-r--r--src/gui/math3d/qvector4d.cpp52
-rw-r--r--src/gui/math3d/qvector4d.h31
-rw-r--r--src/gui/opengl/opengl.pri30
-rw-r--r--src/gui/opengl/qopengl.cpp383
-rw-r--r--src/gui/opengl/qopengl.h14
-rw-r--r--src/gui/opengl/qopengl2pexvertexarray.cpp14
-rw-r--r--src/gui/opengl/qopengl2pexvertexarray_p.h14
-rw-r--r--src/gui/opengl/qopengl_p.h58
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp14
-rw-r--r--src/gui/opengl/qopenglbuffer.h14
-rw-r--r--src/gui/opengl/qopenglcustomshaderstage.cpp14
-rw-r--r--src/gui/opengl/qopenglcustomshaderstage_p.h14
-rw-r--r--src/gui/opengl/qopengldebug.cpp12
-rw-r--r--src/gui/opengl/qopengldebug.h14
-rw-r--r--src/gui/opengl/qopenglengineshadermanager.cpp30
-rw-r--r--src/gui/opengl/qopenglengineshadermanager_p.h22
-rw-r--r--src/gui/opengl/qopenglengineshadersource_p.h30
-rw-r--r--src/gui/opengl/qopenglextensions_p.h36
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp14
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h14
-rw-r--r--src/gui/opengl/qopenglframebufferobject_p.h14
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp69
-rw-r--r--src/gui/opengl/qopenglfunctions.h17
-rw-r--r--src/gui/opengl/qopenglfunctions_1_0.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_0.h12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_1.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_1.h18
-rw-r--r--src/gui/opengl/qopenglfunctions_1_2.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_2.h18
-rw-r--r--src/gui/opengl/qopenglfunctions_1_3.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_3.h18
-rw-r--r--src/gui/opengl/qopenglfunctions_1_4.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_4.h18
-rw-r--r--src/gui/opengl/qopenglfunctions_1_5.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_1_5.h18
-rw-r--r--src/gui/opengl/qopenglfunctions_2_0.cpp26
-rw-r--r--src/gui/opengl/qopenglfunctions_2_0.h92
-rw-r--r--src/gui/opengl/qopenglfunctions_2_1.cpp26
-rw-r--r--src/gui/opengl/qopenglfunctions_2_1.h92
-rw-r--r--src/gui/opengl/qopenglfunctions_3_0.cpp40
-rw-r--r--src/gui/opengl/qopenglfunctions_3_0.h134
-rw-r--r--src/gui/opengl/qopenglfunctions_3_1.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_3_1.h22
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp40
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_compatibility.h134
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_core.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_3_2_core.h22
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp42
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_compatibility.h194
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_core.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_3_3_core.h150
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp42
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_compatibility.h194
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_core.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_4_0_core.h150
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp42
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_compatibility.h194
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_core.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_4_1_core.h150
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp42
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_compatibility.h194
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_core.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_4_2_core.h150
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp42
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_compatibility.h194
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_core.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_4_3_core.h150
-rw-r--r--src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp412
-rw-r--r--src/gui/opengl/qopenglfunctions_4_4_compatibility.h5959
-rw-r--r--src/gui/opengl/qopenglfunctions_4_4_core.cpp331
-rw-r--r--src/gui/opengl/qopenglfunctions_4_4_core.h3413
-rw-r--r--src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp438
-rw-r--r--src/gui/opengl/qopenglfunctions_4_5_compatibility.h6677
-rw-r--r--src/gui/opengl/qopenglfunctions_4_5_core.cpp344
-rw-r--r--src/gui/opengl/qopenglfunctions_4_5_core.h4054
-rw-r--r--src/gui/opengl/qopenglfunctions_es2.cpp12
-rw-r--r--src/gui/opengl/qopenglfunctions_es2.h12
-rw-r--r--src/gui/opengl/qopenglgradientcache.cpp14
-rw-r--r--src/gui/opengl/qopenglgradientcache_p.h18
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp14
-rw-r--r--src/gui/opengl/qopenglpaintdevice.h14
-rw-r--r--src/gui/opengl/qopenglpaintdevice_p.h14
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp43
-rw-r--r--src/gui/opengl/qopenglpaintengine_p.h70
-rw-r--r--src/gui/opengl/qopenglpixeltransferoptions.cpp12
-rw-r--r--src/gui/opengl/qopenglpixeltransferoptions.h12
-rw-r--r--src/gui/opengl/qopenglqueryhelper_p.h12
-rw-r--r--src/gui/opengl/qopenglshadercache_meego_p.h14
-rw-r--r--src/gui/opengl/qopenglshadercache_p.h14
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp176
-rw-r--r--src/gui/opengl/qopenglshaderprogram.h14
-rw-r--r--src/gui/opengl/qopengltexture.cpp683
-rw-r--r--src/gui/opengl/qopengltexture.h247
-rw-r--r--src/gui/opengl/qopengltexture_p.h18
-rw-r--r--src/gui/opengl/qopengltextureblitter.cpp14
-rw-r--r--src/gui/opengl/qopengltextureblitter_p.h14
-rw-r--r--src/gui/opengl/qopengltexturecache.cpp47
-rw-r--r--src/gui/opengl/qopengltexturecache_p.h19
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp14
-rw-r--r--src/gui/opengl/qopengltextureglyphcache_p.h30
-rw-r--r--src/gui/opengl/qopengltexturehelper.cpp36
-rw-r--r--src/gui/opengl/qopengltexturehelper_p.h26
-rw-r--r--src/gui/opengl/qopengltimerquery.cpp12
-rw-r--r--src/gui/opengl/qopengltimerquery.h12
-rw-r--r--src/gui/opengl/qopenglversionfunctions.cpp334
-rw-r--r--src/gui/opengl/qopenglversionfunctions.h389
-rw-r--r--src/gui/opengl/qopenglversionfunctionsfactory.cpp28
-rw-r--r--src/gui/opengl/qopenglversionfunctionsfactory_p.h12
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.cpp32
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.h12
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject_p.h12
-rw-r--r--src/gui/opengl/qrbtree_p.h14
-rw-r--r--src/gui/opengl/qtriangulatingstroker.cpp14
-rw-r--r--src/gui/opengl/qtriangulatingstroker_p.h20
-rw-r--r--src/gui/opengl/qtriangulator.cpp28
-rw-r--r--src/gui/opengl/qtriangulator_p.h14
-rw-r--r--src/gui/painting/painting.pri5
-rw-r--r--src/gui/painting/qbackingstore.cpp14
-rw-r--r--src/gui/painting/qbackingstore.h14
-rw-r--r--src/gui/painting/qbezier.cpp17
-rw-r--r--src/gui/painting/qbezier_p.h14
-rw-r--r--src/gui/painting/qblendfunctions.cpp444
-rw-r--r--src/gui/painting/qblendfunctions_p.h14
-rw-r--r--src/gui/painting/qblittable.cpp14
-rw-r--r--src/gui/painting/qblittable_p.h14
-rw-r--r--src/gui/painting/qbrush.cpp67
-rw-r--r--src/gui/painting/qbrush.h20
-rw-r--r--src/gui/painting/qcolor.cpp27
-rw-r--r--src/gui/painting/qcolor.h16
-rw-r--r--src/gui/painting/qcolor_p.cpp14
-rw-r--r--src/gui/painting/qcolor_p.h14
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp27
-rw-r--r--src/gui/painting/qcosmeticstroker_p.h14
-rw-r--r--src/gui/painting/qcssutil.cpp14
-rw-r--r--src/gui/painting/qcssutil_p.h14
-rw-r--r--src/gui/painting/qdatabuffer_p.h14
-rw-r--r--src/gui/painting/qdrawhelper.cpp498
-rw-r--r--src/gui/painting/qdrawhelper_avx2.cpp54
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp.cpp12
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp_asm.S34
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp_p.h12
-rw-r--r--src/gui/painting/qdrawhelper_mips_dspr2_asm.S34
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp14
-rw-r--r--src/gui/painting/qdrawhelper_neon_asm.S36
-rw-r--r--src/gui/painting/qdrawhelper_neon_p.h14
-rw-r--r--src/gui/painting/qdrawhelper_p.h68
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp37
-rw-r--r--src/gui/painting/qdrawhelper_sse4.cpp79
-rw-r--r--src/gui/painting/qdrawhelper_sse_p.h174
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp20
-rw-r--r--src/gui/painting/qdrawhelper_x86_p.h14
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h39
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp14
-rw-r--r--src/gui/painting/qemulationpaintengine_p.h14
-rw-r--r--src/gui/painting/qfixed_p.h14
-rw-r--r--src/gui/painting/qgammatables.cpp14
-rw-r--r--src/gui/painting/qgrayraster.c74
-rw-r--r--src/gui/painting/qgrayraster_p.h14
-rw-r--r--src/gui/painting/qimagescale.cpp58
-rw-r--r--src/gui/painting/qimagescale_p.h14
-rw-r--r--src/gui/painting/qmath_p.h24
-rw-r--r--src/gui/painting/qmatrix.cpp17
-rw-r--r--src/gui/painting/qmatrix.h14
-rw-r--r--src/gui/painting/qmemrotate.cpp31
-rw-r--r--src/gui/painting/qmemrotate_p.h14
-rw-r--r--src/gui/painting/qoutlinemapper.cpp14
-rw-r--r--src/gui/painting/qoutlinemapper_p.h14
-rw-r--r--src/gui/painting/qpagedpaintdevice.cpp14
-rw-r--r--src/gui/painting/qpagedpaintdevice.h14
-rw-r--r--src/gui/painting/qpagedpaintdevice_p.h14
-rw-r--r--src/gui/painting/qpagelayout.cpp15
-rw-r--r--src/gui/painting/qpagelayout.h12
-rw-r--r--src/gui/painting/qpagesize.cpp15
-rw-r--r--src/gui/painting/qpagesize.h12
-rw-r--r--src/gui/painting/qpaintbuffer.cpp2209
-rw-r--r--src/gui/painting/qpaintbuffer_p.h418
-rw-r--r--src/gui/painting/qpaintdevice.cpp14
-rw-r--r--src/gui/painting/qpaintdevice.h14
-rw-r--r--src/gui/painting/qpaintdevice.qdoc12
-rw-r--r--src/gui/painting/qpaintengine.cpp14
-rw-r--r--src/gui/painting/qpaintengine.h18
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp25
-rw-r--r--src/gui/painting/qpaintengine_blitter_p.h14
-rw-r--r--src/gui/painting/qpaintengine_p.h14
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp29
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h14
-rw-r--r--src/gui/painting/qpaintengineex.cpp38
-rw-r--r--src/gui/painting/qpaintengineex_p.h44
-rw-r--r--src/gui/painting/qpainter.cpp75
-rw-r--r--src/gui/painting/qpainter.h14
-rw-r--r--src/gui/painting/qpainter_p.h18
-rw-r--r--src/gui/painting/qpainterpath.cpp14
-rw-r--r--src/gui/painting/qpainterpath.h14
-rw-r--r--src/gui/painting/qpainterpath_p.h14
-rw-r--r--src/gui/painting/qpathclipper.cpp14
-rw-r--r--src/gui/painting/qpathclipper_p.h14
-rw-r--r--src/gui/painting/qpathsimplifier.cpp16
-rw-r--r--src/gui/painting/qpathsimplifier_p.h14
-rw-r--r--src/gui/painting/qpdf.cpp31
-rw-r--r--src/gui/painting/qpdf_p.h40
-rw-r--r--src/gui/painting/qpdfwriter.cpp14
-rw-r--r--src/gui/painting/qpdfwriter.h14
-rw-r--r--src/gui/painting/qpen.cpp21
-rw-r--r--src/gui/painting/qpen.h24
-rw-r--r--src/gui/painting/qpen_p.h14
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp74
-rw-r--r--src/gui/painting/qplatformbackingstore.h17
-rw-r--r--src/gui/painting/qpolygon.cpp20
-rw-r--r--src/gui/painting/qpolygon.h14
-rw-r--r--src/gui/painting/qpolygonclipper_p.h14
-rw-r--r--src/gui/painting/qrasterdefs_p.h14
-rw-r--r--src/gui/painting/qrasterizer.cpp30
-rw-r--r--src/gui/painting/qrasterizer_p.h14
-rw-r--r--src/gui/painting/qregion.cpp14
-rw-r--r--src/gui/painting/qregion.h14
-rw-r--r--src/gui/painting/qrgb.h31
-rw-r--r--src/gui/painting/qstroker.cpp17
-rw-r--r--src/gui/painting/qstroker_p.h14
-rw-r--r--src/gui/painting/qt_mips_asm_dsp_p.h12
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp22
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h20
-rw-r--r--src/gui/painting/qtransform.cpp17
-rw-r--r--src/gui/painting/qtransform.h14
-rw-r--r--src/gui/painting/qvectorpath_p.h14
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp14
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.h14
-rw-r--r--src/gui/text/qabstracttextdocumentlayout_p.h14
-rw-r--r--src/gui/text/qcssparser.cpp45
-rw-r--r--src/gui/text/qcssparser_p.h19
-rw-r--r--src/gui/text/qcssscanner.cpp14
-rw-r--r--src/gui/text/qdistancefield.cpp36
-rw-r--r--src/gui/text/qdistancefield_p.h15
-rw-r--r--src/gui/text/qfont.cpp89
-rw-r--r--src/gui/text/qfont.h36
-rw-r--r--src/gui/text/qfont_p.h18
-rw-r--r--src/gui/text/qfontdatabase.cpp280
-rw-r--r--src/gui/text/qfontdatabase.h21
-rw-r--r--src/gui/text/qfontengine.cpp236
-rw-r--r--src/gui/text/qfontengine_ft.cpp221
-rw-r--r--src/gui/text/qfontengine_ft_p.h101
-rw-r--r--src/gui/text/qfontengine_p.h148
-rw-r--r--src/gui/text/qfontengine_qpf2.cpp16
-rw-r--r--src/gui/text/qfontengine_qpf2_p.h50
-rw-r--r--src/gui/text/qfontengineglyphcache_p.h14
-rw-r--r--src/gui/text/qfontinfo.h16
-rw-r--r--src/gui/text/qfontmetrics.cpp17
-rw-r--r--src/gui/text/qfontmetrics.h14
-rw-r--r--src/gui/text/qfontsubset.cpp21
-rw-r--r--src/gui/text/qfontsubset_agl.cpp14
-rw-r--r--src/gui/text/qfontsubset_p.h14
-rw-r--r--src/gui/text/qfragmentmap.cpp14
-rw-r--r--src/gui/text/qfragmentmap_p.h16
-rw-r--r--src/gui/text/qglyphrun.cpp14
-rw-r--r--src/gui/text/qglyphrun.h14
-rw-r--r--src/gui/text/qglyphrun_p.h14
-rw-r--r--src/gui/text/qharfbuzzng.cpp81
-rw-r--r--src/gui/text/qharfbuzzng_p.h14
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp70
-rw-r--r--src/gui/text/qplatformfontdatabase.h17
-rw-r--r--src/gui/text/qrawfont.cpp14
-rw-r--r--src/gui/text/qrawfont.h14
-rw-r--r--src/gui/text/qrawfont_p.h14
-rw-r--r--src/gui/text/qstatictext.cpp60
-rw-r--r--src/gui/text/qstatictext.h14
-rw-r--r--src/gui/text/qstatictext_p.h35
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp14
-rw-r--r--src/gui/text/qsyntaxhighlighter.h14
-rw-r--r--src/gui/text/qtextcursor.cpp14
-rw-r--r--src/gui/text/qtextcursor.h14
-rw-r--r--src/gui/text/qtextcursor_p.h14
-rw-r--r--src/gui/text/qtextdocument.cpp267
-rw-r--r--src/gui/text/qtextdocument.h27
-rw-r--r--src/gui/text/qtextdocument_p.cpp16
-rw-r--r--src/gui/text/qtextdocument_p.h14
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp14
-rw-r--r--src/gui/text/qtextdocumentfragment.h14
-rw-r--r--src/gui/text/qtextdocumentfragment_p.h14
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp30
-rw-r--r--src/gui/text/qtextdocumentlayout_p.h36
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp14
-rw-r--r--src/gui/text/qtextdocumentwriter.h14
-rw-r--r--src/gui/text/qtextengine.cpp145
-rw-r--r--src/gui/text/qtextengine_p.h14
-rw-r--r--src/gui/text/qtextformat.cpp40
-rw-r--r--src/gui/text/qtextformat.h18
-rw-r--r--src/gui/text/qtextformat_p.h14
-rw-r--r--src/gui/text/qtexthtmlparser.cpp311
-rw-r--r--src/gui/text/qtexthtmlparser_p.h14
-rw-r--r--src/gui/text/qtextimagehandler.cpp14
-rw-r--r--src/gui/text/qtextimagehandler_p.h18
-rw-r--r--src/gui/text/qtextlayout.cpp16
-rw-r--r--src/gui/text/qtextlayout.h14
-rw-r--r--src/gui/text/qtextlist.cpp14
-rw-r--r--src/gui/text/qtextlist.h14
-rw-r--r--src/gui/text/qtextobject.cpp14
-rw-r--r--src/gui/text/qtextobject.h14
-rw-r--r--src/gui/text/qtextobject_p.h14
-rw-r--r--src/gui/text/qtextodfwriter.cpp20
-rw-r--r--src/gui/text/qtextodfwriter_p.h14
-rw-r--r--src/gui/text/qtextoption.cpp14
-rw-r--r--src/gui/text/qtextoption.h14
-rw-r--r--src/gui/text/qtexttable.cpp19
-rw-r--r--src/gui/text/qtexttable.h14
-rw-r--r--src/gui/text/qtexttable_p.h18
-rw-r--r--src/gui/text/qzip.cpp20
-rw-r--r--src/gui/text/qzipreader_p.h14
-rw-r--r--src/gui/text/qzipwriter_p.h14
-rw-r--r--src/gui/text/text.pri2
-rw-r--r--src/gui/util/qabstractlayoutstyleinfo.cpp21
-rw-r--r--src/gui/util/qabstractlayoutstyleinfo_p.h35
-rw-r--r--src/gui/util/qdesktopservices.cpp14
-rw-r--r--src/gui/util/qdesktopservices.h14
-rw-r--r--src/gui/util/qgridlayoutengine.cpp83
-rw-r--r--src/gui/util/qgridlayoutengine_p.h23
-rw-r--r--src/gui/util/qhexstring_p.h14
-rw-r--r--src/gui/util/qlayoutpolicy.cpp17
-rw-r--r--src/gui/util/qlayoutpolicy_p.h14
-rw-r--r--src/gui/util/qvalidator.cpp18
-rw-r--r--src/gui/util/qvalidator.h24
681 files changed, 35889 insertions, 11346 deletions
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index 9a846d435e..07869efd7d 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -57,9 +57,6 @@ set(Qt5Gui_OPENGL_LIBRARIES Qt5::Gui_GLESv2)
set(_GL_INCDIRS $$CMAKE_GL_INCDIRS)
find_path(_qt5gui_OPENGL_INCLUDE_DIR $$CMAKE_GL_HEADER_NAME
PATHS ${_GL_INCDIRS}
-!!IF !mac
- NO_DEFAULT_PATH
-!!ENDIF
)
if (NOT _qt5gui_OPENGL_INCLUDE_DIR)
message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"${_GL_INCDIRS}\\\".\")
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index a7053aa3da..fb30b5f8ee 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -455,14 +455,13 @@ QT_BEGIN_NAMESPACE
Synonym for unsigned, used by the QAccessibleInterface cache.
*/
+#ifndef QT_NO_ACCESSIBILITY
/* accessible widgets plugin discovery stuff */
-#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAccessibleFactoryInterface_iid, QLatin1String("/accessible")))
#endif
-#endif
// FIXME turn this into one global static struct
Q_GLOBAL_STATIC(QList<QAccessible::InterfaceFactory>, qAccessibleFactories)
@@ -475,13 +474,11 @@ QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0;
static bool cleanupAdded = false;
-#ifndef QT_NO_ACCESSIBILITY
static QPlatformAccessibility *platformAccessibility()
{
QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
return pfIntegration ? pfIntegration->accessibility() : 0;
}
-#endif
/*!
\fn QAccessible::QAccessible()
@@ -497,10 +494,8 @@ static QPlatformAccessibility *platformAccessibility()
*/
void QAccessible::cleanup()
{
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->cleanup();
-#endif
}
static void qAccessibleCleanup()
@@ -684,7 +679,6 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
return iface;
}
}
-#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_LIBRARY
// Find a QAccessiblePlugin (factory) for the class name. If there's
// no entry in the cache try to create it using the plugin loader.
@@ -708,18 +702,15 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
return result;
}
#endif
-#endif
mo = mo->superClass();
}
-#ifndef QT_NO_ACCESSIBILITY
if (object == qApp) {
QAccessibleInterface *appInterface = new QAccessibleApplication;
QAccessibleCache::instance()->insert(object, appInterface);
Q_ASSERT(QAccessibleCache::instance()->objectToId.contains(qApp));
return appInterface;
}
-#endif
return 0;
}
@@ -789,10 +780,8 @@ QAccessibleInterface *QAccessible::accessibleInterface(Id id)
*/
bool QAccessible::isActive()
{
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
return pfAccessibility->isActive();
-#endif
return false;
}
@@ -827,10 +816,8 @@ void QAccessible::setRootObject(QObject *object)
return;
}
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->setRootObject(object);
-#endif
}
/*!
@@ -863,7 +850,6 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (!isActive() || !event->accessibleInterface())
return;
-#ifndef QT_NO_ACCESSIBILITY
if (event->type() == QAccessible::TableModelChanged) {
QAccessibleInterface *iface = event->accessibleInterface();
if (iface && iface->tableInterface())
@@ -877,7 +863,6 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->notifyAccessibilityUpdate(event);
-#endif
}
#if QT_DEPRECATED_SINCE(5, 0)
@@ -1733,7 +1718,7 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
return d;
}
d.nospace();
- d << "QAccessibleInterface(" << hex << (void *) iface << dec;
+ d << "QAccessibleInterface(" << hex << (const void *) iface << dec;
if (iface->isValid()) {
d << " name=" << iface->text(QAccessible::Name) << " ";
d << "role=" << qAccessibleRoleString(iface->role()) << " ";
@@ -1824,7 +1809,7 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
d.nospace() << ")";
return d.space();
}
-
+#endif // QT_NO_DEBUGSTREAM
/*!
\class QAccessibleTextInterface
@@ -2626,7 +2611,14 @@ struct QAccessibleActionStrings
decreaseAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Decrease"))),
showMenuAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "ShowMenu"))),
setFocusAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "SetFocus"))),
- toggleAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Toggle"))) {}
+ toggleAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Toggle"))),
+ scrollLeftAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Scroll Left"))),
+ scrollRightAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Scroll Right"))),
+ scrollUpAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Scroll Up"))),
+ scrollDownAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Scroll Down"))),
+ previousPageAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Previous Page"))),
+ nextPageAction(QStringLiteral(QT_TRANSLATE_NOOP("QAccessibleActionInterface", "Next Page")))
+ {}
const QString pressAction;
const QString increaseAction;
@@ -2634,6 +2626,12 @@ struct QAccessibleActionStrings
const QString showMenuAction;
const QString setFocusAction;
const QString toggleAction;
+ const QString scrollLeftAction;
+ const QString scrollRightAction;
+ const QString scrollUpAction;
+ const QString scrollDownAction;
+ const QString previousPageAction;
+ const QString nextPageAction;
QString localizedDescription(const QString &actionName)
{
@@ -2649,6 +2647,20 @@ struct QAccessibleActionStrings
return QAccessibleActionInterface::tr("Sets the focus");
else if (actionName == toggleAction)
return QAccessibleActionInterface::tr("Toggles the state");
+ else if (actionName == scrollLeftAction)
+ return QAccessibleActionInterface::tr("Scrolls to the left");
+ else if (actionName == scrollRightAction)
+ return QAccessibleActionInterface::tr("Scrolls to the right");
+ else if (actionName == scrollUpAction)
+ return QAccessibleActionInterface::tr("Scrolls up");
+ else if (actionName == scrollDownAction)
+ return QAccessibleActionInterface::tr("Scrolls down");
+ else if (actionName == previousPageAction)
+ return QAccessibleActionInterface::tr("Goes back a page");
+ else if (actionName == nextPageAction)
+ return QAccessibleActionInterface::tr("Goes to the next page");
+
+
return QString();
}
};
@@ -2719,14 +2731,67 @@ const QString &QAccessibleActionInterface::toggleAction()
return accessibleActionStrings()->toggleAction;
}
+/*!
+ Returns the name of the scroll left default action.
+ \sa actionNames(), localizedActionName()
+ */
+const QString &QAccessibleActionInterface::scrollLeftAction()
+{
+ return accessibleActionStrings()->scrollLeftAction;
+}
+
+/*!
+ Returns the name of the scroll right default action.
+ \sa actionNames(), localizedActionName()
+ */
+const QString &QAccessibleActionInterface::scrollRightAction()
+{
+ return accessibleActionStrings()->scrollRightAction;
+}
+
+/*!
+ Returns the name of the scroll up default action.
+ \sa actionNames(), localizedActionName()
+ */
+const QString &QAccessibleActionInterface::scrollUpAction()
+{
+ return accessibleActionStrings()->scrollUpAction;
+}
+
+/*!
+ Returns the name of the scroll down default action.
+ \sa actionNames(), localizedActionName()
+ */
+const QString &QAccessibleActionInterface::scrollDownAction()
+{
+ return accessibleActionStrings()->scrollDownAction;
+}
+
+/*!
+ Returns the name of the previous page default action.
+ \sa actionNames(), localizedActionName()
+ */
+const QString &QAccessibleActionInterface::previousPageAction()
+{
+ return accessibleActionStrings()->previousPageAction;
+}
+
+/*!
+ Returns the name of the next page default action.
+ \sa actionNames(), localizedActionName()
+ */
+const QString &QAccessibleActionInterface::nextPageAction()
+{
+ return accessibleActionStrings()->nextPageAction;
+}
+
/*! \internal */
QString qAccessibleLocalizedActionDescription(const QString &actionName)
{
return accessibleActionStrings()->localizedDescription(actionName);
}
-
-#endif
+#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 7b5d7a1bfd..faa8cd719d 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -60,7 +60,6 @@ class QTextCursor;
class Q_GUI_EXPORT QAccessible
{
Q_GADGET
- Q_ENUMS(Role Event)
public:
enum Event {
@@ -140,6 +139,7 @@ public:
InvalidEvent
};
+ Q_ENUM(Event)
// 64 bit enums seem hard on some platforms (windows...)
// which makes using a bit field a sensible alternative
@@ -344,6 +344,7 @@ public:
UserRole = 0x0000ffff
};
+ Q_ENUM(Role)
enum Text {
Name = 0,
@@ -635,6 +636,12 @@ public:
static const QString &showMenuAction();
static const QString &setFocusAction();
static const QString &toggleAction();
+ static const QString &scrollLeftAction();
+ static const QString &scrollRightAction();
+ static const QString &scrollUpAction();
+ static const QString &scrollDownAction();
+ static const QString &nextPageAction();
+ static const QString &previousPageAction();
};
class Q_GUI_EXPORT QAccessibleImageInterface
diff --git a/src/gui/accessible/qaccessiblebridge.cpp b/src/gui/accessible/qaccessiblebridge.cpp
index 21cb0ef35c..b4f28a6968 100644
--- a/src/gui/accessible/qaccessiblebridge.cpp
+++ b/src/gui/accessible/qaccessiblebridge.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qaccessiblebridge.h b/src/gui/accessible/qaccessiblebridge.h
index c3dba47711..f0df5e1f39 100644
--- a/src/gui/accessible/qaccessiblebridge.h
+++ b/src/gui/accessible/qaccessiblebridge.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qaccessiblecache.cpp b/src/gui/accessible/qaccessiblecache.cpp
index cf5290ed38..0b9366631c 100644
--- a/src/gui/accessible/qaccessiblecache.cpp
+++ b/src/gui/accessible/qaccessiblecache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -33,6 +33,8 @@
#include "qaccessiblecache_p.h"
+#ifndef QT_NO_ACCESSIBILITY
+
QT_BEGIN_NAMESPACE
/*!
@@ -119,3 +121,5 @@ void QAccessibleCache::deleteInterface(QAccessible::Id id, QObject *obj)
}
QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/accessible/qaccessiblecache_mac.mm b/src/gui/accessible/qaccessiblecache_mac.mm
index 97c0c7e097..b0266ee25f 100644
--- a/src/gui/accessible/qaccessiblecache_mac.mm
+++ b/src/gui/accessible/qaccessiblecache_mac.mm
@@ -1,46 +1,43 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qaccessiblecache_p.h"
+// qcocoaaccessibilityelement.h in Cocoa platform plugin
+@interface QT_MANGLE_NAMESPACE(QMacAccessibilityElement)
+- (void)invalidate;
+@end
+
QT_BEGIN_NAMESPACE
void QAccessibleCache::insertElement(QAccessible::Id axid, QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *element) const
diff --git a/src/gui/accessible/qaccessiblecache_p.h b/src/gui/accessible/qaccessiblecache_p.h
index 97d2b41bbb..ffaccbca42 100644
--- a/src/gui/accessible/qaccessiblecache_p.h
+++ b/src/gui/accessible/qaccessiblecache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -51,6 +51,8 @@
#include "qaccessible.h"
+#ifndef QT_NO_ACCESSIBILITY
+
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QMacAccessibilityElement));
QT_BEGIN_NAMESPACE
@@ -90,4 +92,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_ACCESSIBILITY
+
#endif
diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp
index 7b0549874b..dcf46244e6 100644
--- a/src/gui/accessible/qaccessibleobject.cpp
+++ b/src/gui/accessible/qaccessibleobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qaccessibleobject.h b/src/gui/accessible/qaccessibleobject.h
index 8d793e5fb7..8a871adedb 100644
--- a/src/gui/accessible/qaccessibleobject.h
+++ b/src/gui/accessible/qaccessibleobject.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qaccessibleplugin.cpp b/src/gui/accessible/qaccessibleplugin.cpp
index 1b71b14465..1755db5ec4 100644
--- a/src/gui/accessible/qaccessibleplugin.cpp
+++ b/src/gui/accessible/qaccessibleplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qaccessibleplugin.h b/src/gui/accessible/qaccessibleplugin.h
index fc2086cb20..a4b782af11 100644
--- a/src/gui/accessible/qaccessibleplugin.h
+++ b/src/gui/accessible/qaccessibleplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qplatformaccessibility.cpp b/src/gui/accessible/qplatformaccessibility.cpp
index 6655de7b97..b6b44c1c32 100644
--- a/src/gui/accessible/qplatformaccessibility.cpp
+++ b/src/gui/accessible/qplatformaccessibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/accessible/qplatformaccessibility.h b/src/gui/accessible/qplatformaccessibility.h
index 3ef2ac1557..c7002cbec2 100644
--- a/src/gui/accessible/qplatformaccessibility.h
+++ b/src/gui/accessible/qplatformaccessibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/animation/qguivariantanimation.cpp b/src/gui/animation/qguivariantanimation.cpp
index 1906040b5e..2a87c814b8 100644
--- a/src/gui/animation/qguivariantanimation.cpp
+++ b/src/gui/animation/qguivariantanimation.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/doc/snippets/brush/brush.cpp b/src/gui/doc/snippets/brush/brush.cpp
index 7f18e2eb79..449b86e1e2 100644
--- a/src/gui/doc/snippets/brush/brush.cpp
+++ b/src/gui/doc/snippets/brush/brush.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp b/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp
index c3ed044c01..0bfa6b8ed6 100644
--- a/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp
+++ b/src/gui/doc/snippets/brush/gradientcreationsnippet.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/clipboard/clipwindow.cpp b/src/gui/doc/snippets/clipboard/clipwindow.cpp
index 19a685b9d4..90eed1786a 100644
--- a/src/gui/doc/snippets/clipboard/clipwindow.cpp
+++ b/src/gui/doc/snippets/clipboard/clipwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/clipboard/clipwindow.h b/src/gui/doc/snippets/clipboard/clipwindow.h
index d7b647dd0a..65b94d0cf7 100644
--- a/src/gui/doc/snippets/clipboard/clipwindow.h
+++ b/src/gui/doc/snippets/clipboard/clipwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/clipboard/main.cpp b/src/gui/doc/snippets/clipboard/main.cpp
index 8a036c64fa..f8bbeed8d1 100644
--- a/src/gui/doc/snippets/clipboard/main.cpp
+++ b/src/gui/doc/snippets/clipboard/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/doc_src_coordsys.cpp b/src/gui/doc/snippets/code/doc_src_coordsys.cpp
index f3d59656de..a13c8d294f 100644
--- a/src/gui/doc/snippets/code/doc_src_coordsys.cpp
+++ b/src/gui/doc/snippets/code/doc_src_coordsys.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/doc_src_richtext.cpp b/src/gui/doc/snippets/code/doc_src_richtext.cpp
index 3de3459f37..b55e23cabb 100644
--- a/src/gui/doc/snippets/code/doc_src_richtext.cpp
+++ b/src/gui/doc/snippets/code/doc_src_richtext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/doc_src_richtext.qdoc b/src/gui/doc/snippets/code/doc_src_richtext.qdoc
index e368c7db36..bfe1601aea 100644
--- a/src/gui/doc/snippets/code/doc_src_richtext.qdoc
+++ b/src/gui/doc/snippets/code/doc_src_richtext.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp b/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp
index 52818261ee..a9666145a8 100644
--- a/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp
+++ b/src/gui/doc/snippets/code/src_gui_accessible_qaccessible.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qicon.cpp b/src/gui/doc/snippets/code/src_gui_image_qicon.cpp
index a40b5acbd9..7294fdbc81 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qicon.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qicon.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qimage.cpp b/src/gui/doc/snippets/code/src_gui_image_qimage.cpp
index e171d98ec7..f153de26ed 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qimage.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qimage.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp b/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp
index f02b4753e7..aff9b1b41a 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qimagereader.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp b/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp
index 11b0a32ac4..d6c3bd2929 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qimagewriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp b/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp
index 99a21f38d9..35090a06dd 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qmovie.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
index a691c24ce0..73620b1560 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp
index b8742460ec..df654fcc71 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qpixmapcache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
index 6cd07b5af1..7cd3277534 100644
--- a/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
+++ b/src/gui/doc/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
index b79a30f37b..8177927a8b 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qapplication.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp
index 3e29262e8d..2596845275 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qclipboard.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp
index 0a7a57be16..c8934db152 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qevent.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp
index 914748b7dd..4ddf8c8acb 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp
index b136c2ad51..b751f95c57 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp
index 289cb0e876..8517bfcb9d 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qkeysequence.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp
index 85b51b682d..f0c355f65d 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qshortcutmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp b/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp
index 218464b380..aee6a9289c 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qbrush.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp b/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp
index 1f312c911e..1ff6b9705e 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qcolor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp b/src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp
index f086c7c4aa..f7acdfda99 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qmatrix.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
index 144858816b..1367ab2f8c 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp
index 83e66ef683..378b98abaa 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpainterpath.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp
index e562e83ffd..c6aea733ae 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qpen.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp b/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp
index 68d956494e..6979ab51a5 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qregion.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp b/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp
index 220d31a50f..401d9b6080 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qregion_unix.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp b/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp
index 8fcf691e6c..47c249532e 100644
--- a/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp
+++ b/src/gui/doc/snippets/code/src_gui_painting_qtransform.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp b/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
index b34d54ccfc..ab8ee67929 100644
--- a/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
+++ b/src/gui/doc/snippets/code/src_gui_qopenglshaderprogram.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qfont.cpp b/src/gui/doc/snippets/code/src_gui_text_qfont.cpp
index 8b0821b35d..ddb06af8e0 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qfont.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qfont.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp b/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp
index bfd6c300af..87c19ac9f6 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qfontmetrics.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
index ccbfe1b8cc..9aa5ac4c87 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp
index 5063ca842a..d52b7a5188 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextcursor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp
index d92c69588c..7440a0b7f1 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextdocument.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp
index bfd05bbf4a..3b9fd62dac 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextdocumentwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp b/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp
index 01a966091e..88bd66ce3e 100644
--- a/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp
+++ b/src/gui/doc/snippets/code/src_gui_text_qtextlayout.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp
index bc48e9abfc..a360ab0d61 100644
--- a/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp
+++ b/src/gui/doc/snippets/code/src_gui_util_qdesktopservices.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp b/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp
index f9a4ee4ad1..dd1438179b 100644
--- a/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp
+++ b/src/gui/doc/snippets/code/src_gui_util_qvalidator.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/draganddrop/dragwidget.cpp b/src/gui/doc/snippets/draganddrop/dragwidget.cpp
index 91d177148b..8d1b418513 100644
--- a/src/gui/doc/snippets/draganddrop/dragwidget.cpp
+++ b/src/gui/doc/snippets/draganddrop/dragwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/draganddrop/dragwidget.h b/src/gui/doc/snippets/draganddrop/dragwidget.h
index 5eb3cdc5d7..45eb3cfe5d 100644
--- a/src/gui/doc/snippets/draganddrop/dragwidget.h
+++ b/src/gui/doc/snippets/draganddrop/dragwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/draganddrop/main.cpp b/src/gui/doc/snippets/draganddrop/main.cpp
index 3ef419feb3..21a4e9b4f4 100644
--- a/src/gui/doc/snippets/draganddrop/main.cpp
+++ b/src/gui/doc/snippets/draganddrop/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/draganddrop/mainwindow.cpp b/src/gui/doc/snippets/draganddrop/mainwindow.cpp
index c8d0bf4e09..5866a1caa3 100644
--- a/src/gui/doc/snippets/draganddrop/mainwindow.cpp
+++ b/src/gui/doc/snippets/draganddrop/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/draganddrop/mainwindow.h b/src/gui/doc/snippets/draganddrop/mainwindow.h
index 4c52ddf641..cba0bcda7d 100644
--- a/src/gui/doc/snippets/draganddrop/mainwindow.h
+++ b/src/gui/doc/snippets/draganddrop/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/dragging/main.cpp b/src/gui/doc/snippets/dragging/main.cpp
index c4a8aebb01..12324a3bcb 100644
--- a/src/gui/doc/snippets/dragging/main.cpp
+++ b/src/gui/doc/snippets/dragging/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/dragging/mainwindow.cpp b/src/gui/doc/snippets/dragging/mainwindow.cpp
index 70730ef293..b52dc86429 100644
--- a/src/gui/doc/snippets/dragging/mainwindow.cpp
+++ b/src/gui/doc/snippets/dragging/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/dragging/mainwindow.h b/src/gui/doc/snippets/dragging/mainwindow.h
index 62bce77a93..c518d1b7ec 100644
--- a/src/gui/doc/snippets/dragging/mainwindow.h
+++ b/src/gui/doc/snippets/dragging/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/droparea.cpp b/src/gui/doc/snippets/droparea.cpp
index 3d20266fa2..13cf540d5e 100644
--- a/src/gui/doc/snippets/droparea.cpp
+++ b/src/gui/doc/snippets/droparea.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/dropevents/main.cpp b/src/gui/doc/snippets/dropevents/main.cpp
index 1404c18840..1a1e60345f 100644
--- a/src/gui/doc/snippets/dropevents/main.cpp
+++ b/src/gui/doc/snippets/dropevents/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/dropevents/window.cpp b/src/gui/doc/snippets/dropevents/window.cpp
index c9cefe9b00..33409db517 100644
--- a/src/gui/doc/snippets/dropevents/window.cpp
+++ b/src/gui/doc/snippets/dropevents/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/dropevents/window.h b/src/gui/doc/snippets/dropevents/window.h
index 3c7ee2c73b..12c59a5988 100644
--- a/src/gui/doc/snippets/dropevents/window.h
+++ b/src/gui/doc/snippets/dropevents/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/droprectangle/main.cpp b/src/gui/doc/snippets/droprectangle/main.cpp
index f462406618..2bbab17333 100644
--- a/src/gui/doc/snippets/droprectangle/main.cpp
+++ b/src/gui/doc/snippets/droprectangle/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/droprectangle/window.cpp b/src/gui/doc/snippets/droprectangle/window.cpp
index 7ff44c8259..b5f5322b0e 100644
--- a/src/gui/doc/snippets/droprectangle/window.cpp
+++ b/src/gui/doc/snippets/droprectangle/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/droprectangle/window.h b/src/gui/doc/snippets/droprectangle/window.h
index d14255c903..41638bebef 100644
--- a/src/gui/doc/snippets/droprectangle/window.h
+++ b/src/gui/doc/snippets/droprectangle/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/image/image.cpp b/src/gui/doc/snippets/image/image.cpp
index dcc1180b59..efa64f52f3 100644
--- a/src/gui/doc/snippets/image/image.cpp
+++ b/src/gui/doc/snippets/image/image.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/image/supportedformat.cpp b/src/gui/doc/snippets/image/supportedformat.cpp
index 0b52156b80..2a2508ab94 100644
--- a/src/gui/doc/snippets/image/supportedformat.cpp
+++ b/src/gui/doc/snippets/image/supportedformat.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/matrix/matrix.cpp b/src/gui/doc/snippets/matrix/matrix.cpp
index caf1814625..e33b80c0c0 100644
--- a/src/gui/doc/snippets/matrix/matrix.cpp
+++ b/src/gui/doc/snippets/matrix/matrix.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/picture/picture.cpp b/src/gui/doc/snippets/picture/picture.cpp
index d287f4b38b..8b4281905f 100644
--- a/src/gui/doc/snippets/picture/picture.cpp
+++ b/src/gui/doc/snippets/picture/picture.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/plaintextlayout/main.cpp b/src/gui/doc/snippets/plaintextlayout/main.cpp
index 1994a9926a..af0bc9884c 100644
--- a/src/gui/doc/snippets/plaintextlayout/main.cpp
+++ b/src/gui/doc/snippets/plaintextlayout/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/plaintextlayout/window.cpp b/src/gui/doc/snippets/plaintextlayout/window.cpp
index a5f8f65036..baeb1fdf6c 100644
--- a/src/gui/doc/snippets/plaintextlayout/window.cpp
+++ b/src/gui/doc/snippets/plaintextlayout/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/plaintextlayout/window.h b/src/gui/doc/snippets/plaintextlayout/window.h
index 4a8cc4ddd8..9e56f33750 100644
--- a/src/gui/doc/snippets/plaintextlayout/window.h
+++ b/src/gui/doc/snippets/plaintextlayout/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/polygon/polygon.cpp b/src/gui/doc/snippets/polygon/polygon.cpp
index 7af36a3da3..daaf5b7f4e 100644
--- a/src/gui/doc/snippets/polygon/polygon.cpp
+++ b/src/gui/doc/snippets/polygon/polygon.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/qfontdatabase/main.cpp b/src/gui/doc/snippets/qfontdatabase/main.cpp
index e3bcda35d8..e33ad5f539 100644
--- a/src/gui/doc/snippets/qfontdatabase/main.cpp
+++ b/src/gui/doc/snippets/qfontdatabase/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/qstatustipevent/main.cpp b/src/gui/doc/snippets/qstatustipevent/main.cpp
index 19b6c1cf56..72e758c91b 100644
--- a/src/gui/doc/snippets/qstatustipevent/main.cpp
+++ b/src/gui/doc/snippets/qstatustipevent/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/qtextobject/textobjectinterface.h b/src/gui/doc/snippets/qtextobject/textobjectinterface.h
index b830cd82c6..7bd5a1d83e 100644
--- a/src/gui/doc/snippets/qtextobject/textobjectinterface.h
+++ b/src/gui/doc/snippets/qtextobject/textobjectinterface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/scribe-overview/main.cpp b/src/gui/doc/snippets/scribe-overview/main.cpp
index 7f5e1ffd92..f1ed77a277 100644
--- a/src/gui/doc/snippets/scribe-overview/main.cpp
+++ b/src/gui/doc/snippets/scribe-overview/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/finalwidget.cpp b/src/gui/doc/snippets/separations/finalwidget.cpp
index a314cf1a6e..cf5a36f98f 100644
--- a/src/gui/doc/snippets/separations/finalwidget.cpp
+++ b/src/gui/doc/snippets/separations/finalwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/finalwidget.h b/src/gui/doc/snippets/separations/finalwidget.h
index b4aeb66c80..0eec10f477 100644
--- a/src/gui/doc/snippets/separations/finalwidget.h
+++ b/src/gui/doc/snippets/separations/finalwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/main.cpp b/src/gui/doc/snippets/separations/main.cpp
index fbd641cbc9..4c3d5b1b64 100644
--- a/src/gui/doc/snippets/separations/main.cpp
+++ b/src/gui/doc/snippets/separations/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/screenwidget.cpp b/src/gui/doc/snippets/separations/screenwidget.cpp
index 93298d87a2..11ed28a35d 100644
--- a/src/gui/doc/snippets/separations/screenwidget.cpp
+++ b/src/gui/doc/snippets/separations/screenwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/screenwidget.h b/src/gui/doc/snippets/separations/screenwidget.h
index 70d8dabeac..319550e0f8 100644
--- a/src/gui/doc/snippets/separations/screenwidget.h
+++ b/src/gui/doc/snippets/separations/screenwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/separations.qdoc b/src/gui/doc/snippets/separations/separations.qdoc
index a5a037f24b..097f155190 100644
--- a/src/gui/doc/snippets/separations/separations.qdoc
+++ b/src/gui/doc/snippets/separations/separations.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/viewer.cpp b/src/gui/doc/snippets/separations/viewer.cpp
index 6a0f49ee2f..30c9d2e7d9 100644
--- a/src/gui/doc/snippets/separations/viewer.cpp
+++ b/src/gui/doc/snippets/separations/viewer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/separations/viewer.h b/src/gui/doc/snippets/separations/viewer.h
index b05d1823d3..ebb7be4d24 100644
--- a/src/gui/doc/snippets/separations/viewer.h
+++ b/src/gui/doc/snippets/separations/viewer.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textblock-formats/main.cpp b/src/gui/doc/snippets/textblock-formats/main.cpp
index 813e11124d..712f586785 100644
--- a/src/gui/doc/snippets/textblock-formats/main.cpp
+++ b/src/gui/doc/snippets/textblock-formats/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textblock-fragments/main.cpp b/src/gui/doc/snippets/textblock-fragments/main.cpp
index 6e7f12b113..10cec127c2 100644
--- a/src/gui/doc/snippets/textblock-fragments/main.cpp
+++ b/src/gui/doc/snippets/textblock-fragments/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textblock-fragments/mainwindow.cpp b/src/gui/doc/snippets/textblock-fragments/mainwindow.cpp
index 062521f50d..9730b40212 100644
--- a/src/gui/doc/snippets/textblock-fragments/mainwindow.cpp
+++ b/src/gui/doc/snippets/textblock-fragments/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textblock-fragments/mainwindow.h b/src/gui/doc/snippets/textblock-fragments/mainwindow.h
index bc2fc59fb0..8f234e20c7 100644
--- a/src/gui/doc/snippets/textblock-fragments/mainwindow.h
+++ b/src/gui/doc/snippets/textblock-fragments/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp b/src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp
index 422f80b573..fa6c5a1fa1 100644
--- a/src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp
+++ b/src/gui/doc/snippets/textblock-fragments/xmlwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textblock-fragments/xmlwriter.h b/src/gui/doc/snippets/textblock-fragments/xmlwriter.h
index 1c1eb09f3b..a83c208944 100644
--- a/src/gui/doc/snippets/textblock-fragments/xmlwriter.h
+++ b/src/gui/doc/snippets/textblock-fragments/xmlwriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-blocks/main.cpp b/src/gui/doc/snippets/textdocument-blocks/main.cpp
index 6e7f12b113..10cec127c2 100644
--- a/src/gui/doc/snippets/textdocument-blocks/main.cpp
+++ b/src/gui/doc/snippets/textdocument-blocks/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-blocks/mainwindow.cpp b/src/gui/doc/snippets/textdocument-blocks/mainwindow.cpp
index 871fa525a5..5a9c468a71 100644
--- a/src/gui/doc/snippets/textdocument-blocks/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-blocks/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-blocks/mainwindow.h b/src/gui/doc/snippets/textdocument-blocks/mainwindow.h
index bc2fc59fb0..8f234e20c7 100644
--- a/src/gui/doc/snippets/textdocument-blocks/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-blocks/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-blocks/xmlwriter.cpp b/src/gui/doc/snippets/textdocument-blocks/xmlwriter.cpp
index e868bf0feb..832eccbc7b 100644
--- a/src/gui/doc/snippets/textdocument-blocks/xmlwriter.cpp
+++ b/src/gui/doc/snippets/textdocument-blocks/xmlwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-blocks/xmlwriter.h b/src/gui/doc/snippets/textdocument-blocks/xmlwriter.h
index 6158e971ea..bce27ed3a9 100644
--- a/src/gui/doc/snippets/textdocument-blocks/xmlwriter.h
+++ b/src/gui/doc/snippets/textdocument-blocks/xmlwriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-charformats/main.cpp b/src/gui/doc/snippets/textdocument-charformats/main.cpp
index 628d207cb7..41d6f24f41 100644
--- a/src/gui/doc/snippets/textdocument-charformats/main.cpp
+++ b/src/gui/doc/snippets/textdocument-charformats/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-css/main.cpp b/src/gui/doc/snippets/textdocument-css/main.cpp
index d9b9668687..fa68ad86fc 100644
--- a/src/gui/doc/snippets/textdocument-css/main.cpp
+++ b/src/gui/doc/snippets/textdocument-css/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-cursors/main.cpp b/src/gui/doc/snippets/textdocument-cursors/main.cpp
index 7daaeab1e4..135747f58c 100644
--- a/src/gui/doc/snippets/textdocument-cursors/main.cpp
+++ b/src/gui/doc/snippets/textdocument-cursors/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-find/main.cpp b/src/gui/doc/snippets/textdocument-find/main.cpp
index 78771613e7..f25d326312 100644
--- a/src/gui/doc/snippets/textdocument-find/main.cpp
+++ b/src/gui/doc/snippets/textdocument-find/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-frames/main.cpp b/src/gui/doc/snippets/textdocument-frames/main.cpp
index 82b3f0ac3b..853203949a 100644
--- a/src/gui/doc/snippets/textdocument-frames/main.cpp
+++ b/src/gui/doc/snippets/textdocument-frames/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-frames/mainwindow.cpp b/src/gui/doc/snippets/textdocument-frames/mainwindow.cpp
index 9b1b9a4812..52d26bd838 100644
--- a/src/gui/doc/snippets/textdocument-frames/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-frames/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-frames/mainwindow.h b/src/gui/doc/snippets/textdocument-frames/mainwindow.h
index f861686697..115b1cf3fa 100644
--- a/src/gui/doc/snippets/textdocument-frames/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-frames/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-frames/xmlwriter.cpp b/src/gui/doc/snippets/textdocument-frames/xmlwriter.cpp
index 760d9cf8a7..02f9602e9c 100644
--- a/src/gui/doc/snippets/textdocument-frames/xmlwriter.cpp
+++ b/src/gui/doc/snippets/textdocument-frames/xmlwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-frames/xmlwriter.h b/src/gui/doc/snippets/textdocument-frames/xmlwriter.h
index ba9c1f6079..997f66dc3a 100644
--- a/src/gui/doc/snippets/textdocument-frames/xmlwriter.h
+++ b/src/gui/doc/snippets/textdocument-frames/xmlwriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-imagedrop/main.cpp b/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
index 47521452d9..17d395ab41 100644
--- a/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
+++ b/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-imagedrop/textedit.h b/src/gui/doc/snippets/textdocument-imagedrop/textedit.h
index e6c950e7a1..bf6603eda9 100644
--- a/src/gui/doc/snippets/textdocument-imagedrop/textedit.h
+++ b/src/gui/doc/snippets/textdocument-imagedrop/textedit.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-imageformat/main.cpp b/src/gui/doc/snippets/textdocument-imageformat/main.cpp
index 7818c81450..c64288a649 100644
--- a/src/gui/doc/snippets/textdocument-imageformat/main.cpp
+++ b/src/gui/doc/snippets/textdocument-imageformat/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-images/main.cpp b/src/gui/doc/snippets/textdocument-images/main.cpp
index d8b79718a1..1ab51876b7 100644
--- a/src/gui/doc/snippets/textdocument-images/main.cpp
+++ b/src/gui/doc/snippets/textdocument-images/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-listitems/main.cpp b/src/gui/doc/snippets/textdocument-listitems/main.cpp
index 6e7f12b113..10cec127c2 100644
--- a/src/gui/doc/snippets/textdocument-listitems/main.cpp
+++ b/src/gui/doc/snippets/textdocument-listitems/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp b/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp
index 8ac622b907..80d4af5327 100644
--- a/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-listitems/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-listitems/mainwindow.h b/src/gui/doc/snippets/textdocument-listitems/mainwindow.h
index 5a143833ef..ef05c91716 100644
--- a/src/gui/doc/snippets/textdocument-listitems/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-listitems/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-listitemstyles/main.cpp b/src/gui/doc/snippets/textdocument-listitemstyles/main.cpp
index 6e7f12b113..10cec127c2 100644
--- a/src/gui/doc/snippets/textdocument-listitemstyles/main.cpp
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp
index 226a4e9dcb..d8dd61f98f 100644
--- a/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h
index 76f5a8cc9a..af96c7bc8b 100644
--- a/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-listitemstyles/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-lists/mainwindow.cpp b/src/gui/doc/snippets/textdocument-lists/mainwindow.cpp
index 82138c6843..16efe8c632 100644
--- a/src/gui/doc/snippets/textdocument-lists/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-lists/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-printing/main.cpp b/src/gui/doc/snippets/textdocument-printing/main.cpp
index 6e7f12b113..10cec127c2 100644
--- a/src/gui/doc/snippets/textdocument-printing/main.cpp
+++ b/src/gui/doc/snippets/textdocument-printing/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp b/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp
index 81c490d948..8564bf6be7 100644
--- a/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-printing/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-printing/mainwindow.h b/src/gui/doc/snippets/textdocument-printing/mainwindow.h
index 2605f3285b..4c1dcf457b 100644
--- a/src/gui/doc/snippets/textdocument-printing/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-printing/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-resources/main.cpp b/src/gui/doc/snippets/textdocument-resources/main.cpp
index 5808fcddd3..26574bf428 100644
--- a/src/gui/doc/snippets/textdocument-resources/main.cpp
+++ b/src/gui/doc/snippets/textdocument-resources/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-selections/main.cpp b/src/gui/doc/snippets/textdocument-selections/main.cpp
index 6e7f12b113..10cec127c2 100644
--- a/src/gui/doc/snippets/textdocument-selections/main.cpp
+++ b/src/gui/doc/snippets/textdocument-selections/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp b/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
index 051b57582b..05a8c86d63 100644
--- a/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-selections/mainwindow.h b/src/gui/doc/snippets/textdocument-selections/mainwindow.h
index 52c3517e07..3db7e0c2a9 100644
--- a/src/gui/doc/snippets/textdocument-selections/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-selections/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-tables/main.cpp b/src/gui/doc/snippets/textdocument-tables/main.cpp
index 0fe0308653..4cb0a1daa6 100644
--- a/src/gui/doc/snippets/textdocument-tables/main.cpp
+++ b/src/gui/doc/snippets/textdocument-tables/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp b/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
index 1169254253..cfd679c39c 100644
--- a/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-tables/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-tables/mainwindow.h b/src/gui/doc/snippets/textdocument-tables/mainwindow.h
index c86b27b27c..7a2e081517 100644
--- a/src/gui/doc/snippets/textdocument-tables/mainwindow.h
+++ b/src/gui/doc/snippets/textdocument-tables/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-tables/xmlwriter.cpp b/src/gui/doc/snippets/textdocument-tables/xmlwriter.cpp
index ab4f644e38..fd860c73ee 100644
--- a/src/gui/doc/snippets/textdocument-tables/xmlwriter.cpp
+++ b/src/gui/doc/snippets/textdocument-tables/xmlwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-tables/xmlwriter.h b/src/gui/doc/snippets/textdocument-tables/xmlwriter.h
index 7d2929b646..5a64fb0a4e 100644
--- a/src/gui/doc/snippets/textdocument-tables/xmlwriter.h
+++ b/src/gui/doc/snippets/textdocument-tables/xmlwriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocument-texttable/main.cpp b/src/gui/doc/snippets/textdocument-texttable/main.cpp
index f82b5235cf..b5dc412edb 100644
--- a/src/gui/doc/snippets/textdocument-texttable/main.cpp
+++ b/src/gui/doc/snippets/textdocument-texttable/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/textdocumentendsnippet.cpp b/src/gui/doc/snippets/textdocumentendsnippet.cpp
index 17e0bd483b..5510fbae9d 100644
--- a/src/gui/doc/snippets/textdocumentendsnippet.cpp
+++ b/src/gui/doc/snippets/textdocumentendsnippet.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/snippets/transform/main.cpp b/src/gui/doc/snippets/transform/main.cpp
index 6f985de1ab..361ba6b178 100644
--- a/src/gui/doc/snippets/transform/main.cpp
+++ b/src/gui/doc/snippets/transform/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/gui/doc/src/coordsys.qdoc b/src/gui/doc/src/coordsys.qdoc
index d9c7c7e3c1..117bac20a2 100644
--- a/src/gui/doc/src/coordsys.qdoc
+++ b/src/gui/doc/src/coordsys.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/doc/src/dnd.qdoc b/src/gui/doc/src/dnd.qdoc
index 844848c76c..6e76c2faa9 100644
--- a/src/gui/doc/src/dnd.qdoc
+++ b/src/gui/doc/src/dnd.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/doc/src/external-resources.qdoc b/src/gui/doc/src/external-resources.qdoc
index 0e955b11f6..b3854923f3 100644
--- a/src/gui/doc/src/external-resources.qdoc
+++ b/src/gui/doc/src/external-resources.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/doc/src/paintsystem.qdoc b/src/gui/doc/src/paintsystem.qdoc
index 1006d2ef65..955543668d 100644
--- a/src/gui/doc/src/paintsystem.qdoc
+++ b/src/gui/doc/src/paintsystem.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/doc/src/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc
index 404b7be8d5..6e29597152 100644
--- a/src/gui/doc/src/qtgui.qdoc
+++ b/src/gui/doc/src/qtgui.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc
index 460018a52e..770ff985af 100644
--- a/src/gui/doc/src/richtext.qdoc
+++ b/src/gui/doc/src/richtext.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index af84eb7342..aa05d72a3d 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -9,11 +9,13 @@ QMAKE_DOCS = $$PWD/doc/qtgui.qdocconf
MODULE_PLUGIN_TYPES = \
platforms \
+ xcbglintegrations \
platformthemes \
platforminputcontexts \
generic \
iconengines \
- imageformats
+ imageformats \
+ egldeviceintegrations
# This is here only because the platform plugin is no module, obviously.
win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index 7022a6efd0..8db944e5e3 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -80,6 +80,8 @@ contains(QT_CONFIG, gif):include($$PWD/qgifhandler.pri)
# SIMD
SSE2_SOURCES += image/qimage_sse2.cpp
SSSE3_SOURCES += image/qimage_ssse3.cpp
+SSE4_1_SOURCES += image/qimage_sse4.cpp
+AVX2_SOURCES += image/qimage_avx2.cpp
NEON_SOURCES += image/qimage_neon.cpp
MIPS_DSPR2_SOURCES += image/qimage_mips_dspr2.cpp
MIPS_DSPR2_ASM += image/qimage_mips_dspr2_asm.S
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index ef00cbddaf..745f6f59cb 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h
index ec4fc08526..f3ad90be20 100644
--- a/src/gui/image/qbitmap.h
+++ b/src/gui/image/qbitmap.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 8acc593c16..f124cede36 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -640,7 +640,7 @@ bool qt_write_dib(QDataStream &s, QImage image)
if (nbits == 1 || nbits == 8) { // direct output
for (y=image.height()-1; y>=0; y--) {
- if (d->write((char*)image.constScanLine(y), bpl) == -1)
+ if (d->write((const char*)image.constScanLine(y), bpl) == -1)
return false;
}
return true;
@@ -800,6 +800,10 @@ bool QBmpHandler::write(const QImage &img)
case QImage::Format_ARGB32:
image = img;
break;
+ case QImage::Format_Alpha8:
+ case QImage::Format_Grayscale8:
+ image = img.convertToFormat(QImage::Format_Indexed8);
+ break;
default:
if (img.hasAlphaChannel())
image = img.convertToFormat(QImage::Format_ARGB32);
diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h
index 1a3b159c95..0d6909c050 100644
--- a/src/gui/image/qbmphandler_p.h
+++ b/src/gui/image/qbmphandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
index 8d8c4aef7d..7ba6b123e8 100644
--- a/src/gui/image/qgifhandler.cpp
+++ b/src/gui/image/qgifhandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qgifhandler_p.h b/src/gui/image/qgifhandler_p.h
index 40bff19e7a..5c8a6ba003 100644
--- a/src/gui/image/qgifhandler_p.h
+++ b/src/gui/image/qgifhandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -63,22 +63,22 @@ public:
QGifHandler();
~QGifHandler();
- bool canRead() const;
- bool read(QImage *image);
- bool write(const QImage &image);
+ bool canRead() const Q_DECL_OVERRIDE;
+ bool read(QImage *image) Q_DECL_OVERRIDE;
+ bool write(const QImage &image) Q_DECL_OVERRIDE;
- QByteArray name() const;
+ QByteArray name() const Q_DECL_OVERRIDE;
static bool canRead(QIODevice *device);
- QVariant option(ImageOption option) const;
- void setOption(ImageOption option, const QVariant &value);
- bool supportsOption(ImageOption option) const;
+ QVariant option(ImageOption option) const Q_DECL_OVERRIDE;
+ void setOption(ImageOption option, const QVariant &value) Q_DECL_OVERRIDE;
+ bool supportsOption(ImageOption option) const Q_DECL_OVERRIDE;
- int imageCount() const;
- int loopCount() const;
- int nextImageDelay() const;
- int currentImageNumber() const;
+ int imageCount() const Q_DECL_OVERRIDE;
+ int loopCount() const Q_DECL_OVERRIDE;
+ int nextImageDelay() const Q_DECL_OVERRIDE;
+ int currentImageNumber() const Q_DECL_OVERRIDE;
private:
bool imageIsComing() const;
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 86d9c02c6e..6d7a40c2ef 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -46,7 +46,7 @@
#include "qdebug.h"
#include "qpalette.h"
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
@@ -1024,7 +1024,7 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
d->engine->addFile(fileName, size, mode, state);
// Check if a "@2x" file exists and add it.
- static bool disable2xImageLoading = !qgetenv("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING").isEmpty();
+ static bool disable2xImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING");
if (!disable2xImageLoading && qApp->devicePixelRatio() > 1.0) {
QString at2xfileName = fileName;
int dotIndex = fileName.lastIndexOf(QLatin1Char('.'));
@@ -1197,7 +1197,7 @@ bool QIcon::hasThemeIcon(const QString &name)
{
QIcon icon = fromTheme(name);
- return !icon.isNull();
+ return icon.name() == name;
}
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index 717bb55404..d87468b4f0 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qicon_p.h b/src/gui/image/qicon_p.h
index 4896aa89c0..8b42e770fa 100644
--- a/src/gui/image/qicon_p.h
+++ b/src/gui/image/qicon_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -99,23 +99,23 @@ inline QPixmapIconEngineEntry::QPixmapIconEngineEntry(const QString &file, const
pixmap.setDevicePixelRatio(1.0);
}
-class QPixmapIconEngine : public QIconEngine {
+class Q_GUI_EXPORT QPixmapIconEngine : public QIconEngine {
public:
QPixmapIconEngine();
QPixmapIconEngine(const QPixmapIconEngine &);
~QPixmapIconEngine();
- void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state);
- QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state);
+ void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) Q_DECL_OVERRIDE;
+ QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) Q_DECL_OVERRIDE;
QPixmapIconEngineEntry *bestMatch(const QSize &size, QIcon::Mode mode, QIcon::State state, bool sizeOnly);
- QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state);
- void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state);
- void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state);
-
- QString key() const;
- QIconEngine *clone() const;
- bool read(QDataStream &in);
- bool write(QDataStream &out) const;
- void virtual_hook(int id, void *data);
+ QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) Q_DECL_OVERRIDE;
+ void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) Q_DECL_OVERRIDE;
+ void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) Q_DECL_OVERRIDE;
+
+ QString key() const Q_DECL_OVERRIDE;
+ QIconEngine *clone() const Q_DECL_OVERRIDE;
+ bool read(QDataStream &in) Q_DECL_OVERRIDE;
+ bool write(QDataStream &out) const Q_DECL_OVERRIDE;
+ void virtual_hook(int id, void *data) Q_DECL_OVERRIDE;
private:
QPixmapIconEngineEntry *tryMatch(const QSize &size, QIcon::Mode mode, QIcon::State state);
diff --git a/src/gui/image/qiconengine.cpp b/src/gui/image/qiconengine.cpp
index 56a0288bf6..a25b216432 100644
--- a/src/gui/image/qiconengine.cpp
+++ b/src/gui/image/qiconengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qiconengine.h b/src/gui/image/qiconengine.h
index 0078590bb5..735da863fd 100644
--- a/src/gui/image/qiconengine.h
+++ b/src/gui/image/qiconengine.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qiconengineplugin.cpp b/src/gui/image/qiconengineplugin.cpp
index 66bb0cbbec..07cf269bd0 100644
--- a/src/gui/image/qiconengineplugin.cpp
+++ b/src/gui/image/qiconengineplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qiconengineplugin.h b/src/gui/image/qiconengineplugin.h
index 2ef6c9f4f4..66684c871d 100644
--- a/src/gui/image/qiconengineplugin.h
+++ b/src/gui/image/qiconengineplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 06491f1155..fa14c84e83 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -47,7 +47,7 @@
#include <QtCore/QSettings>
#include <QtGui/QPainter>
-#ifdef Q_WS_MAC
+#ifdef Q_DEAD_CODE_FROM_QT4_MAC
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
@@ -172,11 +172,15 @@ QIconTheme::QIconTheme(const QString &themeName)
for ( int i = 0 ; i < iconDirs.size() ; ++i) {
QDir iconDir(iconDirs[i]);
QString themeDir = iconDir.path() + QLatin1Char('/') + themeName;
- themeIndex.setFileName(themeDir + QLatin1String("/index.theme"));
- if (themeIndex.exists()) {
- m_contentDir = themeDir;
- m_valid = true;
- break;
+ QFileInfo themeDirInfo(themeDir);
+
+ if (themeDirInfo.isDir())
+ m_contentDirs << themeDir;
+
+ if (!m_valid) {
+ themeIndex.setFileName(themeDir + QLatin1String("/index.theme"));
+ if (themeIndex.exists())
+ m_valid = true;
}
}
#ifndef QT_NO_SETTINGS
@@ -239,11 +243,11 @@ QIconTheme::QIconTheme(const QString &themeName)
#endif //QT_NO_SETTINGS
}
-QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
- const QString &iconName,
- QStringList &visited) const
+QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName,
+ const QString &iconName,
+ QStringList &visited) const
{
- QThemeIconEntries entries;
+ QThemeIconInfo info;
Q_ASSERT(!themeName.isEmpty());
QPixmap pixmap;
@@ -260,34 +264,54 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
themeList.insert(themeName, theme);
}
- QString contentDir = theme.contentDir() + QLatin1Char('/');
+ const QStringList contentDirs = theme.contentDirs();
const QVector<QIconDirInfo> subDirs = theme.keyList();
- const QString svgext(QLatin1String(".svg"));
- const QString pngext(QLatin1String(".png"));
-
- // Add all relevant files
- for (int i = 0; i < subDirs.size() ; ++i) {
- const QIconDirInfo &dirInfo = subDirs.at(i);
- QString subdir = dirInfo.path;
- QDir currentDir(contentDir + subdir);
- if (currentDir.exists(iconName + pngext)) {
- PixmapEntry *iconEntry = new PixmapEntry;
- iconEntry->dir = dirInfo;
- iconEntry->filename = currentDir.filePath(iconName + pngext);
- // Notice we ensure that pixmap entries always come before
- // scalable to preserve search order afterwards
- entries.prepend(iconEntry);
- } else if (m_supportsSvg &&
- currentDir.exists(iconName + svgext)) {
- ScalableEntry *iconEntry = new ScalableEntry;
- iconEntry->dir = dirInfo;
- iconEntry->filename = currentDir.filePath(iconName + svgext);
- entries.append(iconEntry);
+ QString iconNameFallback = iconName;
+
+ // Iterate through all icon's fallbacks in current theme
+ while (info.entries.isEmpty()) {
+ const QString svgIconName = iconNameFallback + QLatin1String(".svg");
+ const QString pngIconName = iconNameFallback + QLatin1String(".png");
+
+ // Add all relevant files
+ for (int i = 0; i < contentDirs.size(); ++i) {
+ QString contentDir = contentDirs.at(i) + QLatin1Char('/');
+ for (int j = 0; j < subDirs.size() ; ++j) {
+ const QIconDirInfo &dirInfo = subDirs.at(j);
+ QString subdir = dirInfo.path;
+ QDir currentDir(contentDir + subdir);
+ if (currentDir.exists(pngIconName)) {
+ PixmapEntry *iconEntry = new PixmapEntry;
+ iconEntry->dir = dirInfo;
+ iconEntry->filename = currentDir.filePath(pngIconName);
+ // Notice we ensure that pixmap entries always come before
+ // scalable to preserve search order afterwards
+ info.entries.prepend(iconEntry);
+ } else if (m_supportsSvg &&
+ currentDir.exists(svgIconName)) {
+ ScalableEntry *iconEntry = new ScalableEntry;
+ iconEntry->dir = dirInfo;
+ iconEntry->filename = currentDir.filePath(svgIconName);
+ info.entries.append(iconEntry);
+ }
+ }
+ }
+
+ if (!info.entries.isEmpty()) {
+ info.iconName = iconNameFallback;
+ break;
}
+
+ // If it's possible - find next fallback for the icon
+ const int indexOfDash = iconNameFallback.lastIndexOf(QLatin1Char('-'));
+ if (indexOfDash == -1)
+ break;
+
+ iconNameFallback.truncate(indexOfDash);
}
- if (entries.isEmpty()) {
+ if (info.entries.isEmpty()) {
const QStringList parents = theme.parents();
// Search recursively through inherited themes
for (int i = 0 ; i < parents.size() ; ++i) {
@@ -295,23 +319,23 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
const QString parentTheme = parents.at(i).trimmed();
if (!visited.contains(parentTheme)) // guard against recursion
- entries = findIconHelper(parentTheme, iconName, visited);
+ info = findIconHelper(parentTheme, iconName, visited);
- if (!entries.isEmpty()) // success
+ if (!info.entries.isEmpty()) // success
break;
}
}
- return entries;
+ return info;
}
-QThemeIconEntries QIconLoader::loadIcon(const QString &name) const
+QThemeIconInfo QIconLoader::loadIcon(const QString &name) const
{
if (!themeName().isEmpty()) {
QStringList visited;
return findIconHelper(themeName(), name, visited);
}
- return QThemeIconEntries();
+ return QThemeIconInfo();
}
@@ -325,7 +349,7 @@ QIconLoaderEngine::QIconLoaderEngine(const QString& iconName)
QIconLoaderEngine::~QIconLoaderEngine()
{
- qDeleteAll(m_entries);
+ qDeleteAll(m_info.entries);
}
QIconLoaderEngine::QIconLoaderEngine(const QIconLoaderEngine &other)
@@ -353,17 +377,19 @@ bool QIconLoaderEngine::write(QDataStream &out) const
bool QIconLoaderEngine::hasIcon() const
{
- return !(m_entries.isEmpty());
+ return !(m_info.entries.isEmpty());
}
// Lazily load the icon
void QIconLoaderEngine::ensureLoaded()
{
if (!(QIconLoader::instance()->themeKey() == m_key)) {
+ qDeleteAll(m_info.entries);
+ m_info.entries.clear();
+ m_info.iconName.clear();
- qDeleteAll(m_entries);
-
- m_entries = QIconLoader::instance()->loadIcon(m_iconName);
+ Q_ASSERT(m_info.entries.size() == 0);
+ m_info = QIconLoader::instance()->loadIcon(m_iconName);
m_key = QIconLoader::instance()->themeKey();
}
}
@@ -372,7 +398,7 @@ void QIconLoaderEngine::paint(QPainter *painter, const QRect &rect,
QIcon::Mode mode, QIcon::State state)
{
QSize pixmapSize = rect.size();
-#if defined(Q_WS_MAC)
+#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
pixmapSize *= qt_mac_get_scalefactor();
#endif
painter->drawPixmap(rect, pixmap(pixmapSize, mode, state));
@@ -433,14 +459,14 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size)
{
int iconsize = qMin(size.width(), size.height());
- // Note that m_entries are sorted so that png-files
+ // Note that m_info.entries are sorted so that png-files
// come first
- const int numEntries = m_entries.size();
+ const int numEntries = m_info.entries.size();
// Search for exact matches first
for (int i = 0; i < numEntries; ++i) {
- QIconLoaderEngineEntry *entry = m_entries.at(i);
+ QIconLoaderEngineEntry *entry = m_info.entries.at(i);
if (directoryMatchesSize(entry->dir, iconsize)) {
return entry;
}
@@ -450,7 +476,7 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size)
int minimalSize = INT_MAX;
QIconLoaderEngineEntry *closestMatch = 0;
for (int i = 0; i < numEntries; ++i) {
- QIconLoaderEngineEntry *entry = m_entries.at(i);
+ QIconLoaderEngineEntry *entry = m_info.entries.at(i);
int distance = directorySizeDistance(entry->dir, iconsize);
if (distance < minimalSize) {
minimalSize = distance;
@@ -554,13 +580,13 @@ void QIconLoaderEngine::virtual_hook(int id, void *data)
{
QIconEngine::AvailableSizesArgument &arg
= *reinterpret_cast<QIconEngine::AvailableSizesArgument*>(data);
- const int N = m_entries.size();
+ const int N = m_info.entries.size();
QList<QSize> sizes;
sizes.reserve(N);
// Gets all sizes from the DirectoryInfo entries
for (int i = 0; i < N; ++i) {
- int size = m_entries.at(i)->dir.size;
+ int size = m_info.entries.at(i)->dir.size;
sizes.append(QSize(size, size));
}
arg.sizes.swap(sizes); // commit
@@ -569,7 +595,7 @@ void QIconLoaderEngine::virtual_hook(int id, void *data)
case QIconEngine::IconNameHook:
{
QString &name = *reinterpret_cast<QString*>(data);
- name = m_iconName;
+ name = m_info.iconName;
}
break;
default:
diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h
index 50a6e6d3a7..38cf9c1736 100644
--- a/src/gui/image/qiconloader_p.h
+++ b/src/gui/image/qiconloader_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -106,6 +106,12 @@ struct PixmapEntry : public QIconLoaderEngineEntry
typedef QList<QIconLoaderEngineEntry*> QThemeIconEntries;
+struct QThemeIconInfo
+{
+ QThemeIconEntries entries;
+ QString iconName;
+};
+
class QIconLoaderEngine : public QIconEngine
{
public:
@@ -126,7 +132,7 @@ private:
void virtual_hook(int id, void *data);
QIconLoaderEngineEntry *entryForSize(const QSize &size);
QIconLoaderEngine(const QIconLoaderEngine &other);
- QThemeIconEntries m_entries;
+ QThemeIconInfo m_info;
QString m_iconName;
uint m_key;
@@ -140,11 +146,11 @@ public:
QIconTheme() : m_valid(false) {}
QStringList parents() { return m_parents; }
QVector<QIconDirInfo> keyList() { return m_keyList; }
- QString contentDir() { return m_contentDir; }
+ QStringList contentDirs() { return m_contentDirs; }
bool isValid() { return m_valid; }
private:
- QString m_contentDir;
+ QStringList m_contentDirs;
QVector<QIconDirInfo> m_keyList;
QStringList m_parents;
bool m_valid;
@@ -154,7 +160,7 @@ class Q_GUI_EXPORT QIconLoader
{
public:
QIconLoader();
- QThemeIconEntries loadIcon(const QString &iconName) const;
+ QThemeIconInfo loadIcon(const QString &iconName) const;
uint themeKey() const { return m_themeKey; }
QString themeName() const { return m_userTheme.isEmpty() ? m_systemTheme : m_userTheme; }
@@ -169,9 +175,9 @@ public:
void ensureInitialized();
private:
- QThemeIconEntries findIconHelper(const QString &themeName,
- const QString &iconName,
- QStringList &visited) const;
+ QThemeIconInfo findIconHelper(const QString &themeName,
+ const QString &iconName,
+ QStringList &visited) const;
uint m_themeKey;
bool m_supportsSvg;
bool m_initialized;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 6699e516a0..5cc1cf760f 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -47,7 +47,6 @@
#include <ctype.h>
#include <stdlib.h>
#include <limits.h>
-#include <math.h>
#include <qpa/qplatformpixmap.h>
#include <private/qdrawhelper_p.h>
#include <private/qmemrotate_p.h>
@@ -653,7 +652,8 @@ bool QImageData::checkForAlphaPixels() const
The following image formats are available in Qt. Values from Format_ARGB8565_Premultiplied
to Format_ARGB4444_Premultiplied were added in Qt 4.4. Values Format_RGBX8888, Format_RGBA8888
and Format_RGBA8888_Premultiplied were added in Qt 5.2. Values Format_BGR30, Format_A2BGR30_Premultiplied,
- Format_RGB30, Format_A2RGB30_Premultiplied were added in Qt 5.4.
+ Format_RGB30, Format_A2RGB30_Premultiplied were added in Qt 5.4. Format_Alpha8 and Format_Grayscale8
+ were added in Qt 5.5.
See the notes after the table.
\value Format_Invalid The image is invalid.
@@ -709,6 +709,8 @@ bool QImageData::checkForAlphaPixels() const
\value Format_A2BGR30_Premultiplied The image is stored using a 32-bit premultiplied ABGR format (2-10-10-10).
\value Format_RGB30 The image is stored using a 32-bit RGB format (x-10-10-10).
\value Format_A2RGB30_Premultiplied The image is stored using a 32-bit premultiplied ARGB format (2-10-10-10).
+ \value Format_Alpha8 The image is stored using an 8-bit alpha only format.
+ \value Format_Grayscale8 The image is stored using an 8-bit grayscale format.
\note Drawing into a QImage with QImage::Format_Indexed8 is not
supported.
@@ -1079,7 +1081,8 @@ void QImage::detach()
if (d->ref.load() != 1 || d->ro_data)
*this = copy();
- ++d->detach_no;
+ if (d)
+ ++d->detach_no;
}
}
@@ -1349,7 +1352,11 @@ int QImage::colorCount() const
\sa colorTable(), setColor(), {QImage#Image Transformations}{Image
Transformations}
*/
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+void QImage::setColorTable(const QVector<QRgb> &colors)
+#else
void QImage::setColorTable(const QVector<QRgb> colors)
+#endif
{
if (!d)
return;
@@ -1359,7 +1366,11 @@ void QImage::setColorTable(const QVector<QRgb> colors)
if (!d)
return;
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ d->colortable = colors;
+#else
d->colortable = qMove(const_cast<QVector<QRgb>&>(colors));
+#endif
d->has_alpha_clut = false;
for (int i = 0; i < d->colortable.size(); ++i) {
if (qAlpha(d->colortable.at(i)) != 255) {
@@ -1423,6 +1434,10 @@ void QImage::setDevicePixelRatio(qreal scaleFactor)
{
if (!d)
return;
+
+ if (scaleFactor == d->devicePixelRatio)
+ return;
+
detach();
d->devicePixelRatio = scaleFactor;
}
@@ -2039,7 +2054,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format,
if (format == QImage::Format_Indexed8) {
for (int y=0; y<h; ++y) {
- QRgb *src_pixels = (QRgb *) src.scanLine(y);
+ const QRgb *src_pixels = (const QRgb *) src.scanLine(y);
uchar *dest_pixels = (uchar *) dest.scanLine(y);
for (int x=0; x<w; ++x) {
int src_pixel = src_pixels[x];
@@ -2055,7 +2070,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format,
QVector<QRgb> table = clut;
table.resize(2);
for (int y=0; y<h; ++y) {
- QRgb *src_pixels = (QRgb *) src.scanLine(y);
+ const QRgb *src_pixels = (const QRgb *) src.scanLine(y);
for (int x=0; x<w; ++x) {
int src_pixel = src_pixels[x];
int value = cache.value(src_pixel, -1);
@@ -2352,6 +2367,10 @@ bool QImage::allGray() const
return false;
}
return true;
+ case Format_Alpha8:
+ return false;
+ case Format_Grayscale8:
+ return true;
case Format_RGB32:
case Format_ARGB32:
case Format_ARGB32_Premultiplied:
@@ -2405,9 +2424,9 @@ bool QImage::allGray() const
/*!
For 32-bit images, this function is equivalent to allGray().
- For 8-bpp images, this function returns \c true if color(i) is
- QRgb(i, i, i) for all indexes of the color table; otherwise
- returns \c false.
+ For color indexed images, this function returns \c true if
+ color(i) is QRgb(i, i, i) for all indexes of the color table;
+ otherwise returns \c false.
\sa allGray(), {QImage#Image Formats}{Image Formats}
*/
@@ -2416,12 +2435,19 @@ bool QImage::isGrayscale() const
if (!d)
return false;
+ if (d->format == QImage::Format_Alpha8)
+ return false;
+
+ if (d->format == QImage::Format_Grayscale8)
+ return true;
+
switch (depth()) {
case 32:
case 24:
case 16:
return allGray();
case 8: {
+ Q_ASSERT(d->format == QImage::Format_Indexed8);
for (int i = 0; i < colorCount(); i++)
if (d->colortable.at(i) != qRgb(i,i,i))
return false;
@@ -2655,7 +2681,7 @@ QImage QImage::createHeuristicMask(bool clipTight) const
return img32.createHeuristicMask(clipTight);
}
-#define PIX(x,y) (*((QRgb*)scanLine(y)+x) & 0x00ffffff)
+#define PIX(x,y) (*((const QRgb*)scanLine(y)+x) & 0x00ffffff)
int w = width();
int h = height();
@@ -2689,7 +2715,7 @@ QImage QImage::createHeuristicMask(bool clipTight) const
ypp = ypc;
ypc = ypn;
ypn = (y == h-1) ? 0 : m.scanLine(y+1);
- QRgb *p = (QRgb *)scanLine(y);
+ const QRgb *p = (const QRgb *)scanLine(y);
for (x = 0; x < w; x++) {
// slowness here - it's possible to do six of these tests
// together in one go. oh well.
@@ -2715,7 +2741,7 @@ QImage QImage::createHeuristicMask(bool clipTight) const
ypp = ypc;
ypc = ypn;
ypn = (y == h-1) ? 0 : m.scanLine(y+1);
- QRgb *p = (QRgb *)scanLine(y);
+ const QRgb *p = (const QRgb *)scanLine(y);
for (x = 0; x < w; x++) {
if ((*p & 0x00ffffff) != background) {
if (x > 0)
@@ -2759,7 +2785,7 @@ QImage QImage::createMaskFromColor(QRgb color, Qt::MaskMode mode) const
if (depth() == 32) {
for (int h = 0; h < d->height; h++) {
- const uint *sl = (uint *) scanLine(h);
+ const uint *sl = (const uint *) scanLine(h);
for (int w = 0; w < d->width; w++) {
if (sl[w] == color)
*(s + (w >> 3)) |= (1 << (w & 7));
@@ -2998,6 +3024,9 @@ QImage QImage::rgbSwapped_helper() const
case NImageFormats:
Q_ASSERT(false);
break;
+ case Format_Alpha8:
+ case Format_Grayscale8:
+ return *this;
case Format_Mono:
case Format_MonoLSB:
case Format_Indexed8:
@@ -3084,6 +3113,9 @@ void QImage::rgbSwapped_inplace()
case NImageFormats:
Q_ASSERT(false);
break;
+ case Format_Alpha8:
+ case Format_Grayscale8:
+ return;
case Format_Mono:
case Format_MonoLSB:
case Format_Indexed8:
@@ -3846,7 +3878,7 @@ bool qt_xForm_helper(const QTransform &trueMat, int xoffset, int type, int depth
case 16: // 16 bpp transform
while (dptr < maxp) {
if (trigx < maxws && trigy < maxhs)
- *((ushort*)dptr) = *((ushort *)(sptr+sbpl*(trigy>>12) +
+ *((ushort*)dptr) = *((const ushort *)(sptr+sbpl*(trigy>>12) +
((trigx>>12)<<1)));
trigx += m11;
trigy += m12;
@@ -3872,7 +3904,7 @@ bool qt_xForm_helper(const QTransform &trueMat, int xoffset, int type, int depth
case 32: // 32 bpp transform
while (dptr < maxp) {
if (trigx < maxws && trigy < maxhs)
- *((uint*)dptr) = *((uint *)(sptr+sbpl*(trigy>>12) +
+ *((uint*)dptr) = *((const uint *)(sptr+sbpl*(trigy>>12) +
((trigx>>12)<<2)));
trigx += m11;
trigy += m12;
@@ -4017,9 +4049,9 @@ void QImage::setAlphaChannel(const QImage &alphaChannel)
return;
// Slight optimization since alphachannels are returned as 8-bit grays.
- if (alphaChannel.d->depth == 8 && alphaChannel.isGrayscale()) {
+ if (alphaChannel.format() == QImage::Format_Alpha8 ||( alphaChannel.d->depth == 8 && alphaChannel.isGrayscale())) {
const uchar *src_data = alphaChannel.d->data;
- const uchar *dest_data = d->data;
+ uchar *dest_data = d->data;
for (int y=0; y<h; ++y) {
const uchar *src = src_data;
QRgb *dest = (QRgb *)dest_data;
@@ -4040,7 +4072,7 @@ void QImage::setAlphaChannel(const QImage &alphaChannel)
} else {
const QImage sourceImage = alphaChannel.convertToFormat(QImage::Format_RGB32);
const uchar *src_data = sourceImage.d->data;
- const uchar *dest_data = d->data;
+ uchar *dest_data = d->data;
for (int y=0; y<h; ++y) {
const QRgb *src = (const QRgb *) src_data;
QRgb *dest = (QRgb *) dest_data;
@@ -4075,9 +4107,13 @@ void QImage::setAlphaChannel(const QImage &alphaChannel)
Most usecases for this function can be replaced with QPainter and
using composition modes.
+ Note this returns a color-indexed image if you want the alpha channel in
+ the alpha8 format instead use convertToFormat(Format_Alpha8) on the source
+ image.
+
\warning This is an expensive function.
- \sa setAlphaChannel(), hasAlphaChannel(),
+ \sa setAlphaChannel(), hasAlphaChannel(), convertToFormat(),
{QPixmap#Pixmap Information}{Pixmap},
{QImage#Image Transformations}{Image Transformations}
*/
@@ -4087,6 +4123,9 @@ QImage QImage::alphaChannel() const
if (!d)
return QImage();
+ if (d->format == QImage::Format_Alpha8)
+ return *this;
+
int w = d->width;
int h = d->height;
@@ -4264,6 +4303,8 @@ static QImage rotated90(const QImage &image) {
reinterpret_cast<quint16*>(out.bits()),
out.bytesPerLine());
break;
+ case QImage::Format_Alpha8:
+ case QImage::Format_Grayscale8:
case QImage::Format_Indexed8:
qt_memrotate270(reinterpret_cast<const quint8*>(image.bits()),
w, h, image.bytesPerLine(),
@@ -4330,6 +4371,8 @@ static QImage rotated270(const QImage &image) {
reinterpret_cast<quint16*>(out.bits()),
out.bytesPerLine());
break;
+ case QImage::Format_Alpha8:
+ case QImage::Format_Grayscale8:
case QImage::Format_Indexed8:
qt_memrotate90(reinterpret_cast<const quint8*>(image.bits()),
w, h, image.bytesPerLine(),
@@ -4481,24 +4524,17 @@ QImage QImage::transformed(const QTransform &matrix, Qt::TransformationMode mode
dImage.d->dpmx = dotsPerMeterX();
dImage.d->dpmy = dotsPerMeterY();
- switch (bpp) {
- // initizialize the data
- case 8:
- if (dImage.d->colortable.size() < 256) {
- // colors are left in the color table, so pick that one as transparent
- dImage.d->colortable.append(0x0);
- memset(dImage.bits(), dImage.d->colortable.size() - 1, dImage.byteCount());
- } else {
- memset(dImage.bits(), 0, dImage.byteCount());
- }
- break;
- case 1:
- case 16:
- case 24:
- case 32:
- memset(dImage.bits(), 0x00, dImage.byteCount());
- break;
- }
+ // initizialize the data
+ if (d->format == QImage::Format_Indexed8) {
+ if (dImage.d->colortable.size() < 256) {
+ // colors are left in the color table, so pick that one as transparent
+ dImage.d->colortable.append(0x0);
+ memset(dImage.bits(), dImage.d->colortable.size() - 1, dImage.byteCount());
+ } else {
+ memset(dImage.bits(), 0, dImage.byteCount());
+ }
+ } else
+ memset(dImage.bits(), 0x00, dImage.byteCount());
if (target_format >= QImage::Format_RGB32) {
// Prevent QPainter from applying devicePixelRatio corrections
@@ -4572,7 +4608,9 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
InPlace_Image_Converter converter = *converterPtr;
if (converter)
return converter(this, flags);
- else if (format > QImage::Format_Indexed8 && newFormat > QImage::Format_Indexed8)
+ else if (format > QImage::Format_Indexed8 && newFormat > QImage::Format_Indexed8 && !qimage_converter_map[format][newFormat])
+ // Convert inplace generic, but only if there are no direct converters,
+ // any direct ones are probably better even if not inplace.
return convert_generic_inplace(this, newFormat, flags);
else
return false;
@@ -4942,6 +4980,32 @@ static Q_CONSTEXPR QPixelFormat pixelformats[] = {
/*PREMULTIPLIED*/ QPixelFormat::Premultiplied,
/*INTERPRETATION*/ QPixelFormat::UnsignedInteger,
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
+ //QImage::Format_Alpha8:
+ QPixelFormat(QPixelFormat::Alpha,
+ /*First*/ 0,
+ /*SECOND*/ 0,
+ /*THIRD*/ 0,
+ /*FOURTH*/ 0,
+ /*FIFTH*/ 0,
+ /*ALPHA*/ 8,
+ /*ALPHA USAGE*/ QPixelFormat::UsesAlpha,
+ /*ALPHA POSITION*/ QPixelFormat::AtBeginning,
+ /*PREMULTIPLIED*/ QPixelFormat::Premultiplied,
+ /*INTERPRETATION*/ QPixelFormat::UnsignedByte,
+ /*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
+ //QImage::Format_Grayscale8:
+ QPixelFormat(QPixelFormat::Grayscale,
+ /*GRAY*/ 8,
+ /*SECOND*/ 0,
+ /*THIRD*/ 0,
+ /*FOURTH*/ 0,
+ /*FIFTH*/ 0,
+ /*ALPHA*/ 0,
+ /*ALPHA USAGE*/ QPixelFormat::IgnoresAlpha,
+ /*ALPHA POSITION*/ QPixelFormat::AtBeginning,
+ /*PREMULTIPLIED*/ QPixelFormat::NotPremultiplied,
+ /*INTERPRETATION*/ QPixelFormat::UnsignedByte,
+ /*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
};
Q_STATIC_ASSERT(sizeof(pixelformats) / sizeof(*pixelformats) == QImage::NImageFormats);
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 55b8690c77..4ce99b9ab1 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -106,20 +106,16 @@ public:
Format_RGBX8888,
Format_RGBA8888,
Format_RGBA8888_Premultiplied,
-#if 0
- // reserved for future use
- Format_RGB15,
- Format_Grayscale16,
- Format_Grayscale8,
- Format_Grayscale4,
- Format_Grayscale4LSB,
- Format_Grayscale2,
- Format_Grayscale2LSB
-#endif
Format_BGR30,
Format_A2BGR30_Premultiplied,
Format_RGB30,
Format_A2RGB30_Premultiplied,
+ Format_Alpha8,
+ Format_Grayscale8,
+#if 0
+ // reserved for future use
+ Format_Grayscale16,
+#endif
#ifndef Q_QDOC
NImageFormats
#endif
@@ -155,7 +151,7 @@ public:
bool isNull() const;
- int devType() const;
+ int devType() const Q_DECL_OVERRIDE;
bool operator==(const QImage &) const;
bool operator!=(const QImage &) const;
@@ -224,7 +220,11 @@ public:
void setPixel(const QPoint &pt, uint index_or_rgb);
QVector<QRgb> colorTable() const;
- void setColorTable(const QVector<QRgb> colors); // ### Qt 6: remove const
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ void setColorTable(const QVector<QRgb> &colors);
+#else
+ void setColorTable(const QVector<QRgb> colors);
+#endif
qreal devicePixelRatio() const;
void setDevicePixelRatio(qreal scaleFactor);
@@ -288,7 +288,7 @@ public:
#endif
qint64 cacheKey() const;
- QPaintEngine *paintEngine() const;
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
// Auxiliary data
int dotsPerMeterX() const;
@@ -321,7 +321,7 @@ public:
#endif
protected:
- virtual int metric(PaintDeviceMetric metric) const;
+ virtual int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
QImage mirrored_helper(bool horizontal, bool vertical) const;
QImage rgbSwapped_helper() const;
void mirrored_inplace(bool horizontal, bool vertical);
@@ -353,13 +353,9 @@ inline void QImage::setPixel(const QPoint &pt, uint index_or_rgb) { setPixel(pt.
#if QT_DEPRECATED_SINCE(5, 0)
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#elif defined(Q_CC_MSVC)
-# pragma warning(push)
-# pragma warning(disable: 4996)
-#endif
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
+QT_WARNING_DISABLE_MSVC(4996)
inline QString QImage::text(const char* key, const char* lang) const
{
@@ -431,11 +427,7 @@ inline void QImage::setText(const char* key, const char* lang, const QString &s)
setText(k, s);
}
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
-# pragma GCC diagnostic pop
-#elif defined(Q_CC_MSVC)
-# pragma warning(pop)
-#endif
+QT_WARNING_POP
inline int QImage::numColors() const
{
diff --git a/src/gui/image/qimage_avx2.cpp b/src/gui/image/qimage_avx2.cpp
new file mode 100644
index 0000000000..c52baec948
--- /dev/null
+++ b/src/gui/image/qimage_avx2.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qimage.h>
+#include <private/qdrawhelper_p.h>
+#include <private/qimage_p.h>
+#include <private/qsimd_p.h>
+
+#ifdef QT_COMPILER_SUPPORTS_AVX2
+
+QT_BEGIN_NAMESPACE
+
+void convert_ARGB_to_ARGB_PM_avx2(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888);
+ Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied || dest->format == QImage::Format_RGBA8888_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const uint *src_data = (uint *) src->data;
+ uint *dest_data = (uint *) dest->data;
+ for (int i = 0; i < src->height; ++i) {
+ qt_convertARGB32ToARGB32PM(dest_data, src_data, src->width);
+ src_data += src->bytes_per_line >> 2;
+ dest_data += dest->bytes_per_line >> 2;
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_COMPILER_SUPPORTS_AVX2
diff --git a/src/gui/image/qimage_compat.cpp b/src/gui/image/qimage_compat.cpp
index 7fdaf529c8..9982ca6192 100644
--- a/src/gui/image/qimage_compat.cpp
+++ b/src/gui/image/qimage_compat.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
index bd40d0d4fc..28e3a48689 100644
--- a/src/gui/image/qimage_conversions.cpp
+++ b/src/gui/image/qimage_conversions.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -34,8 +34,8 @@
#include <private/qdrawhelper_p.h>
#include <private/qguiapplication_p.h>
#include <private/qsimd_p.h>
-
#include <private/qimage_p.h>
+#include <qendian.h>
QT_BEGIN_NAMESPACE
@@ -100,9 +100,30 @@ void qGamma_correct_back_to_linear_cs(QImage *image)
Internal routines for converting image depth.
*****************************************************************************/
-// Cannot be used with indexed formats.
+// The drawhelper conversions from/to RGB32 are passthroughs which is not always correct for general image conversion.
+static const uint *QT_FASTCALL convertRGB32FromARGB32PM(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = 0xff000000 | qUnpremultiply(src[i]);
+ return buffer;
+}
+
+static const uint *QT_FASTCALL convertRGB32ToARGB32PM(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = 0xff000000 |src[i];
+ return buffer;
+}
+
+#ifdef QT_COMPILER_SUPPORTS_SSE4_1
+extern const uint *QT_FASTCALL convertRGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+#endif
+
void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
+ // Cannot be used with indexed formats.
Q_ASSERT(dest->format > QImage::Format_Indexed8);
Q_ASSERT(src->format > QImage::Format_Indexed8);
const int buffer_size = 2048;
@@ -112,16 +133,33 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
const uchar *srcData = src->data;
uchar *destData = dest->data;
- FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp];
- StorePixelsFunc store = qStorePixels[destLayout->bpp];
+ const FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp];
+ const StorePixelsFunc store = qStorePixels[destLayout->bpp];
+ ConvertFunc convertToARGB32PM = srcLayout->convertToARGB32PM;
+ ConvertFunc convertFromARGB32PM = destLayout->convertFromARGB32PM;
+ if (srcLayout->alphaWidth == 0 && destLayout->convertFromRGB32) {
+ // If the source doesn't have an alpha channel, we can use the faster convertFromRGB32 method.
+ convertFromARGB32PM = destLayout->convertFromRGB32;
+ } else {
+ if (src->format == QImage::Format_RGB32)
+ convertToARGB32PM = convertRGB32ToARGB32PM;
+ if (dest->format == QImage::Format_RGB32) {
+#ifdef QT_COMPILER_SUPPORTS_SSE4_1
+ if (qCpuHasFeature(SSE4_1))
+ convertFromARGB32PM = convertRGB32FromARGB32PM_sse4;
+ else
+#endif
+ convertFromARGB32PM = convertRGB32FromARGB32PM;
+ }
+ }
for (int y = 0; y < src->height; ++y) {
int x = 0;
while (x < src->width) {
int l = qMin(src->width - x, buffer_size);
const uint *ptr = fetch(buffer, srcData, x, l);
- ptr = srcLayout->convertToARGB32PM(buffer, ptr, l, srcLayout, 0);
- ptr = destLayout->convertFromARGB32PM(buffer, ptr, l, destLayout, 0);
+ ptr = convertToARGB32PM(buffer, ptr, l, srcLayout, 0);
+ ptr = convertFromARGB32PM(buffer, ptr, l, destLayout, 0);
store(destData, ptr, x, l);
x += l;
}
@@ -130,9 +168,9 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
}
}
-// Cannot be used with indexed formats or between formats with different pixel depths.
bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags)
{
+ // Cannot be used with indexed formats or between formats with different pixel depths.
Q_ASSERT(dst_format > QImage::Format_Indexed8);
Q_ASSERT(data->format > QImage::Format_Indexed8);
if (data->depth != qt_depthForFormat(dst_format))
@@ -142,19 +180,35 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
uint buffer[buffer_size];
const QPixelLayout *srcLayout = &qPixelLayouts[data->format];
const QPixelLayout *destLayout = &qPixelLayouts[dst_format];
-
uchar *srcData = data->data;
- FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp];
- StorePixelsFunc store = qStorePixels[destLayout->bpp];
+ const FetchPixelsFunc fetch = qFetchPixels[srcLayout->bpp];
+ const StorePixelsFunc store = qStorePixels[destLayout->bpp];
+ ConvertFunc convertToARGB32PM = srcLayout->convertToARGB32PM;
+ ConvertFunc convertFromARGB32PM = destLayout->convertFromARGB32PM;
+ if (srcLayout->alphaWidth == 0 && destLayout->convertFromRGB32) {
+ // If the source doesn't have an alpha channel, we can use the faster convertFromRGB32 method.
+ convertFromARGB32PM = destLayout->convertFromRGB32;
+ } else {
+ if (data->format == QImage::Format_RGB32)
+ convertToARGB32PM = convertRGB32ToARGB32PM;
+ if (dst_format == QImage::Format_RGB32) {
+#ifdef QT_COMPILER_SUPPORTS_SSE4_1
+ if (qCpuHasFeature(SSE4_1))
+ convertFromARGB32PM = convertRGB32FromARGB32PM_sse4;
+ else
+#endif
+ convertFromARGB32PM = convertRGB32FromARGB32PM;
+ }
+ }
for (int y = 0; y < data->height; ++y) {
int x = 0;
while (x < data->width) {
int l = qMin(data->width - x, buffer_size);
const uint *ptr = fetch(buffer, srcData, x, l);
- ptr = srcLayout->convertToARGB32PM(buffer, ptr, l, srcLayout, 0);
- ptr = destLayout->convertFromARGB32PM(buffer, ptr, l, destLayout, 0);
+ ptr = convertToARGB32PM(buffer, ptr, l, srcLayout, 0);
+ ptr = convertFromARGB32PM(buffer, ptr, l, destLayout, 0);
// The conversions might be passthrough and not use the buffer, in that case we are already done.
if (srcData != (const uchar*)ptr)
store(srcData, ptr, x, l);
@@ -219,29 +273,110 @@ static void convert_ARGB_to_ARGB_PM(QImageData *dest, const QImageData *src, Qt:
}
}
-extern bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags);
-
-#ifndef __SSE2__
-static bool convert_ARGB_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConversionFlags)
+Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32(quint32 *dest_data, const uchar *src_data, int len)
{
- Q_ASSERT(data->format == QImage::Format_ARGB32);
+ int pixel = 0;
+ // prolog: align input to 32bit
+ while ((quintptr(src_data) & 0x3) && pixel < len) {
+ *dest_data = 0xff000000 | (src_data[0] << 16) | (src_data[1] << 8) | (src_data[2]);
+ src_data += 3;
+ ++dest_data;
+ ++pixel;
+ }
- const int pad = (data->bytes_per_line >> 2) - data->width;
- QRgb *rgb_data = (QRgb *) data->data;
+ // Handle 4 pixels at a time 12 bytes input to 16 bytes output.
+ for (; pixel + 3 < len; pixel += 4) {
+ const quint32 *src_packed = (const quint32 *) src_data;
+ const quint32 src1 = qFromBigEndian(src_packed[0]);
+ const quint32 src2 = qFromBigEndian(src_packed[1]);
+ const quint32 src3 = qFromBigEndian(src_packed[2]);
- for (int i = 0; i < data->height; ++i) {
- const QRgb *end = rgb_data + data->width;
- while (rgb_data < end) {
- *rgb_data = PREMUL(*rgb_data);
- ++rgb_data;
- }
- rgb_data += pad;
+ dest_data[0] = 0xff000000 | (src1 >> 8);
+ dest_data[1] = 0xff000000 | (src1 << 16) | (src2 >> 16);
+ dest_data[2] = 0xff000000 | (src2 << 8) | (src3 >> 24);
+ dest_data[3] = 0xff000000 | src3;
+
+ src_data += 12;
+ dest_data += 4;
+ }
+
+ // epilog: handle left over pixels
+ for (; pixel < len; ++pixel) {
+ *dest_data = 0xff000000 | (src_data[0] << 16) | (src_data[1] << 8) | (src_data[2]);
+ src_data += 3;
+ ++dest_data;
}
- data->format = QImage::Format_ARGB32_Premultiplied;
- return true;
}
+
+Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgbx8888(quint32 *dest_data, const uchar *src_data, int len)
+{
+ int pixel = 0;
+ // prolog: align input to 32bit
+ while ((quintptr(src_data) & 0x3) && pixel < len) {
+ *dest_data = ARGB2RGBA(0xff000000 | (src_data[0] << 16) | (src_data[1] << 8) | (src_data[2]));
+ src_data += 3;
+ ++dest_data;
+ ++pixel;
+ }
+
+ // Handle 4 pixels at a time 12 bytes input to 16 bytes output.
+ for (; pixel + 3 < len; pixel += 4) {
+ const quint32 *src_packed = (const quint32 *) src_data;
+ const quint32 src1 = src_packed[0];
+ const quint32 src2 = src_packed[1];
+ const quint32 src3 = src_packed[2];
+
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+ dest_data[0] = 0xff000000 | src1;
+ dest_data[1] = 0xff000000 | (src1 >> 24) | (src2 << 8);
+ dest_data[2] = 0xff000000 | (src2 >> 16) | (src3 << 16);
+ dest_data[3] = 0xff000000 | (src3 >> 8);
+#else
+ dest_data[0] = 0xff | src1;
+ dest_data[1] = 0xff | (src1 << 24) | (src2 >> 8);
+ dest_data[2] = 0xff | (src2 << 16) | (src3 >> 16);
+ dest_data[3] = 0xff | (src3 << 8);
#endif
+ src_data += 12;
+ dest_data += 4;
+ }
+
+ // epilog: handle left over pixels
+ for (; pixel < len; ++pixel) {
+ *dest_data = ARGB2RGBA(0xff000000 | (src_data[0] << 16) | (src_data[1] << 8) | (src_data[2]));
+ src_data += 3;
+ ++dest_data;
+ }
+}
+
+typedef void (QT_FASTCALL *Rgb888ToRgbConverter)(quint32 *dst, const uchar *src, int len);
+
+template <bool rgbx>
+static void convert_RGB888_to_RGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_RGB888);
+ if (rgbx)
+ Q_ASSERT(dest->format == QImage::Format_RGBX8888 || dest->format == QImage::Format_RGBA8888 || dest->format == QImage::Format_RGBA8888_Premultiplied);
+ else
+ Q_ASSERT(dest->format == QImage::Format_RGB32 || dest->format == QImage::Format_ARGB32 || dest->format == QImage::Format_ARGB32_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const uchar *src_data = (uchar *) src->data;
+ quint32 *dest_data = (quint32 *) dest->data;
+
+ Rgb888ToRgbConverter line_converter= rgbx ? qt_convert_rgb888_to_rgbx8888 : qt_convert_rgb888_to_rgb32;
+
+ for (int i = 0; i < src->height; ++i) {
+ line_converter(dest_data, src_data, src->width);
+ src_data += src->bytes_per_line;
+ dest_data = (quint32 *)((uchar*)dest_data + dest->bytes_per_line);
+ }
+}
+
+extern bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags);
+
static void convert_ARGB_to_RGBx(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_ARGB32);
@@ -312,30 +447,6 @@ static bool convert_ARGB_to_RGBA_inplace(QImageData *data, Qt::ImageConversionFl
return true;
}
-static void convert_ARGB_to_RGBA_PM(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32);
- Q_ASSERT(dest->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const quint32 *src_data = (quint32 *) src->data;
- quint32 *dest_data = (quint32 *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const quint32 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = ARGB2RGBA(qPremultiply(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
static void convert_RGBA_to_ARGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_RGBX8888 || src->format == QImage::Format_RGBA8888 || src->format == QImage::Format_RGBA8888_Premultiplied);
@@ -360,70 +471,24 @@ static void convert_RGBA_to_ARGB(QImageData *dest, const QImageData *src, Qt::Im
}
}
+template<QImage::Format DestFormat>
static bool convert_RGBA_to_ARGB_inplace(QImageData *data, Qt::ImageConversionFlags)
{
Q_ASSERT(data->format == QImage::Format_RGBX8888 || data->format == QImage::Format_RGBA8888 || data->format == QImage::Format_RGBA8888_Premultiplied);
const int pad = (data->bytes_per_line >> 2) - data->width;
QRgb *rgb_data = (QRgb *) data->data;
+ Q_CONSTEXPR uint mask = (DestFormat == QImage::Format_RGB32) ? 0xff000000 : 0;
for (int i = 0; i < data->height; ++i) {
const QRgb *end = rgb_data + data->width;
while (rgb_data < end) {
- *rgb_data = RGBA2ARGB(*rgb_data);
- ++rgb_data;
- }
- rgb_data += pad;
- }
- if (data->format == QImage::Format_RGBA8888_Premultiplied)
- data->format = QImage::Format_ARGB32_Premultiplied;
- else if (data->format == QImage::Format_RGBX8888)
- data->format = QImage::Format_RGB32;
- else
- data->format = QImage::Format_ARGB32;
- return true;
-}
-
-static void convert_RGBA_to_ARGB_PM(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGBA8888);
- Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const quint32 *src_data = (quint32 *) src->data;
- quint32 *dest_data = (quint32 *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const quint32 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qPremultiply(RGBA2ARGB(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-static bool convert_RGBA_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConversionFlags)
-{
- Q_ASSERT(data->format == QImage::Format_RGBA8888);
-
- const int pad = (data->bytes_per_line >> 2) - data->width;
- QRgb *rgb_data = (QRgb *) data->data;
-
- for (int i = 0; i < data->height; ++i) {
- const QRgb *end = rgb_data + data->width;
- while (rgb_data < end) {
- *rgb_data = qPremultiply(RGBA2ARGB(*rgb_data));
+ *rgb_data = mask | RGBA2ARGB(*rgb_data);
++rgb_data;
}
rgb_data += pad;
}
- data->format = QImage::Format_ARGB32_Premultiplied;
+ data->format = DestFormat;
return true;
}
@@ -479,106 +544,6 @@ static void convert_RGB30_to_RGB(QImageData *dest, const QImageData *src, Qt::Im
}
}
-template<QtPixelOrder PixelOrder>
-static void convert_A2RGB30_PM_to_RGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_A2RGB30_Premultiplied || src->format == QImage::Format_A2BGR30_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_RGB32);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const quint32 *src_data = (quint32 *) src->data;
- quint32 *dest_data = (quint32 *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const quint32 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = 0xff000000 | qUnpremultiply(qConvertA2rgb30ToArgb32<PixelOrder>(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-template<QtPixelOrder PixelOrder>
-static void convert_ARGB_PM_to_RGB30(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_BGR30 || dest->format == QImage::Format_RGB30);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const quint32 *src_data = (quint32 *) src->data;
- quint32 *dest_data = (quint32 *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const quint32 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qConvertRgb32ToRgb30<PixelOrder>(qUnpremultiply(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-template<QtPixelOrder PixelOrder>
-static void convert_ARGB_to_A2RGB30(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_A2BGR30_Premultiplied || dest->format == QImage::Format_A2RGB30_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const quint32 *src_data = (quint32 *) src->data;
- quint32 *dest_data = (quint32 *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const quint32 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qConvertArgb32ToA2rgb30<PixelOrder>(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-template<QtPixelOrder PixelOrder>
-static void convert_A2RGB30_to_ARGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_A2BGR30_Premultiplied || src->format == QImage::Format_A2RGB30_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const quint32 *src_data = (quint32 *) src->data;
- quint32 *dest_data = (quint32 *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const quint32 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qConvertA2rgb30ToArgb32<PixelOrder>(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
static inline uint qUnpremultiplyRgb30(uint rgb30)
{
const uint a = rgb30 >> 30;
@@ -906,7 +871,7 @@ static bool convert_RGB_to_RGB16_inplace(QImageData *data, Qt::ImageConversionFl
}
}
-static void convert_ARGB_PM_to_ARGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+static void convert_ARGB_PM_to_ARGB(QImageData *dest, const QImageData *src)
{
Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied || src->format == QImage::Format_RGBA8888_Premultiplied);
Q_ASSERT(dest->format == QImage::Format_ARGB32 || dest->format == QImage::Format_RGBA8888);
@@ -930,78 +895,6 @@ static void convert_ARGB_PM_to_ARGB(QImageData *dest, const QImageData *src, Qt:
}
}
-static void convert_ARGB_PM_to_RGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied || src->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_RGB32 || dest->format == QImage::Format_RGBX8888);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgb *src_data = (QRgb *) src->data;
- QRgb *dest_data = (QRgb *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const QRgb *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = 0xff000000 | qUnpremultiply(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-static void convert_ARGB_PM_to_RGBx(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_RGBX8888);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgb *src_data = (QRgb *) src->data;
- QRgb *dest_data = (QRgb *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const QRgb *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = ARGB2RGBA(0xff000000 | qUnpremultiply(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-static void convert_ARGB_PM_to_RGBA(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_ARGB32_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_RGBA8888);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgb *src_data = (QRgb *) src->data;
- QRgb *dest_data = (QRgb *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const QRgb *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = ARGB2RGBA(qUnpremultiply(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
static void convert_RGBA_to_RGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_RGBA8888 || src->format == QImage::Format_RGBX8888);
@@ -1026,78 +919,6 @@ static void convert_RGBA_to_RGB(QImageData *dest, const QImageData *src, Qt::Ima
}
}
-static void convert_RGB_to_RGBA(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGB32);
- Q_ASSERT(dest->format == QImage::Format_RGBX8888 || dest->format == QImage::Format_RGBA8888 || dest->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const uint *src_data = (const uint *)src->data;
- uint *dest_data = (uint *)dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const uint *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = ARGB2RGBA(*src_data | 0xff000000);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-static void convert_RGBA_PM_to_ARGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_ARGB32);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgb *src_data = (QRgb *) src->data;
- QRgb *dest_data = (QRgb *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const QRgb *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qUnpremultiply(RGBA2ARGB(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-static void convert_RGBA_PM_to_RGB(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGBA8888_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_RGB32);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgb *src_data = (QRgb *) src->data;
- QRgb *dest_data = (QRgb *) dest->data;
-
- for (int i = 0; i < src->height; ++i) {
- const QRgb *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = 0xff000000 | qUnpremultiply(RGBA2ARGB(*src_data));
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
static void swap_bit_order(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(src->format == QImage::Format_Mono || src->format == QImage::Format_MonoLSB);
@@ -1141,6 +962,26 @@ static void mask_alpha_converter(QImageData *dest, const QImageData *src, Qt::Im
}
}
+template<QImage::Format DestFormat>
+static bool mask_alpha_converter_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_RGB32 || DestFormat == QImage::Format_RGB32);
+
+ const int pad = (data->bytes_per_line >> 2) - data->width;
+ QRgb *rgb_data = (QRgb *) data->data;
+
+ for (int i = 0; i < data->height; ++i) {
+ const QRgb *end = rgb_data + data->width;
+ while (rgb_data < end) {
+ *rgb_data = *rgb_data | 0xff000000;
+ ++rgb_data;
+ }
+ rgb_data += pad;
+ }
+ data->format = DestFormat;
+ return true;
+}
+
static void mask_alpha_converter_RGBx(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags flags)
{
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
@@ -1259,12 +1100,12 @@ void dither_to_Mono(QImageData *dst, const QImageData *src,
} else { // 32 bit image
if (fromalpha) {
while (p < end) {
- *b2++ = 255 - (*(uint*)p >> 24);
+ *b2++ = 255 - (*(const uint*)p >> 24);
p += 4;
}
} else {
while (p < end) {
- *b2++ = qGray(*(uint*)p);
+ *b2++ = qGray(*(const uint*)p);
p += 4;
}
}
@@ -1282,12 +1123,12 @@ void dither_to_Mono(QImageData *dst, const QImageData *src,
} else { // 24 bit image
if (fromalpha) {
while (p < end) {
- *b2++ = 255 - (*(uint*)p >> 24);
+ *b2++ = 255 - (*(const uint*)p >> 24);
p += 4;
}
} else {
while (p < end) {
- *b2++ = qGray(*(uint*)p);
+ *b2++ = qGray(*(const uint*)p);
p += 4;
}
}
@@ -1465,7 +1306,7 @@ static void convert_X_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageC
static void convert_ARGB_PM_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags)
{
QScopedPointer<QImageData> tmp(QImageData::create(QSize(src->width, src->height), QImage::Format_ARGB32));
- convert_ARGB_PM_to_ARGB(tmp.data(), src, flags);
+ convert_ARGB_PM_to_ARGB(tmp.data(), src);
dither_to_Mono(dst, tmp.data(), flags, false);
}
@@ -1745,7 +1586,7 @@ static void convert_RGB_to_Indexed8(QImageData *dst, const QImageData *src, Qt::
static void convert_ARGB_PM_to_Indexed8(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags)
{
QScopedPointer<QImageData> tmp(QImageData::create(QSize(src->width, src->height), QImage::Format_ARGB32));
- convert_ARGB_PM_to_ARGB(tmp.data(), src, flags);
+ convert_ARGB_PM_to_ARGB(tmp.data(), src);
convert_RGB_to_Indexed8(dst, tmp.data(), flags);
}
@@ -1869,11 +1710,154 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt
}
}
+static void convert_Indexed8_to_Alpha8(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_Indexed8);
+ Q_ASSERT(dest->format == QImage::Format_Alpha8);
+
+ uchar translate[256];
+ const QVector<QRgb> &colors = src->colortable;
+ bool simpleCase = (colors.size() == 256);
+ for (int i = 0; i < colors.size(); ++i) {
+ uchar alpha = qAlpha(colors[i]);
+ translate[i] = alpha;
+ simpleCase = simpleCase && (alpha == i);
+ }
+
+ if (simpleCase)
+ memcpy(dest->data, src->data, src->bytes_per_line * src->height);
+ else {
+ int size = src->bytes_per_line * src->height;
+ for (int i = 0; i < size; ++i) {
+ dest->data[i] = translate[src->data[i]];
+ }
+ }
+}
+
+static void convert_Indexed8_to_Grayscale8(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_Indexed8);
+ Q_ASSERT(dest->format == QImage::Format_Grayscale8);
+
+ uchar translate[256];
+ const QVector<QRgb> &colors = src->colortable;
+ bool simpleCase = (colors.size() == 256);
+ for (int i = 0; i < colors.size(); ++i) {
+ uchar gray = qGray(colors[i]);
+ translate[i] = gray;
+ simpleCase = simpleCase && (gray == i);
+ }
+
+ if (simpleCase)
+ memcpy(dest->data, src->data, src->bytes_per_line * src->height);
+ else {
+ int size = src->bytes_per_line * src->height;
+ for (int i = 0; i < size; ++i) {
+ dest->data[i] = translate[src->data[i]];
+ }
+ }
+}
+
+static bool convert_Indexed8_to_Alpha8_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Indexed8);
+
+ // Just check if this is an Alpha8 in Indexed8 disguise.
+ const QVector<QRgb> &colors = data->colortable;
+ if (colors.size() != 256)
+ return false;
+ for (int i = 0; i < colors.size(); ++i) {
+ if (i != qAlpha(colors[i]))
+ return false;
+ }
+
+ data->colortable.clear();
+ data->format = QImage::Format_Alpha8;
+
+ return true;
+}
+
+static bool convert_Indexed8_to_Grayscale8_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Indexed8);
+
+ // Just check if this is a Grayscale8 in Indexed8 disguise.
+ const QVector<QRgb> &colors = data->colortable;
+ if (colors.size() != 256)
+ return false;
+ for (int i = 0; i < colors.size(); ++i) {
+ if (i != qGray(colors[i]))
+ return false;
+ }
+
+ data->colortable.clear();
+ data->format = QImage::Format_Grayscale8;
+
+ return true;
+}
+
+static void convert_Alpha8_to_Indexed8(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_Alpha8);
+ Q_ASSERT(dest->format == QImage::Format_Indexed8);
+
+ memcpy(dest->data, src->data, src->bytes_per_line * src->height);
+
+ QVector<QRgb> colors(256);
+ for (int i=0; i<256; ++i)
+ colors[i] = qRgba(0, 0, 0, i);
+
+ dest->colortable = colors;
+}
+
+static void convert_Grayscale8_to_Indexed8(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_Grayscale8);
+ Q_ASSERT(dest->format == QImage::Format_Indexed8);
+
+ memcpy(dest->data, src->data, src->bytes_per_line * src->height);
+
+ QVector<QRgb> colors(256);
+ for (int i=0; i<256; ++i)
+ colors[i] = qRgb(i, i, i);
+
+ dest->colortable = colors;
+}
+
+static bool convert_Alpha8_to_Indexed8_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Alpha8);
+
+ QVector<QRgb> colors(256);
+ for (int i=0; i<256; ++i)
+ colors[i] = qRgba(0, 0, 0, i);
+
+ data->colortable = colors;
+ data->format = QImage::Format_Indexed8;
+
+ return true;
+}
+
+static bool convert_Grayscale8_to_Indexed8_inplace(QImageData *data, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(data->format == QImage::Format_Grayscale8);
+
+ QVector<QRgb> colors(256);
+ for (int i=0; i<256; ++i)
+ colors[i] = qRgb(i, i, i);
+
+ data->colortable = colors;
+ data->format = QImage::Format_Indexed8;
+
+ return true;
+}
+
+
// first index source, second dest
Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormats] =
{
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
{
0,
@@ -1894,7 +1878,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_Mono
{
@@ -1916,7 +1900,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_MonoLSB
{
@@ -1938,7 +1922,9 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0,
+ convert_Indexed8_to_Alpha8,
+ convert_Indexed8_to_Grayscale8,
}, // Format_Indexed8
{
@@ -1958,13 +1944,14 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- convert_RGB_to_RGBA,
- convert_RGB_to_RGBA,
- convert_RGB_to_RGBA,
+ 0,
+ 0,
+ 0,
convert_RGB_to_RGB30<PixelOrderBGR>,
convert_RGB_to_RGB30<PixelOrderBGR>,
convert_RGB_to_RGB30<PixelOrderRGB>,
convert_RGB_to_RGB30<PixelOrderRGB>,
+ 0, 0
}, // Format_RGB32
{
@@ -1986,11 +1973,12 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
convert_ARGB_to_RGBx,
convert_ARGB_to_RGBA,
- convert_ARGB_to_RGBA_PM,
+ 0,
convert_RGB_to_RGB30<PixelOrderBGR>,
0,
convert_RGB_to_RGB30<PixelOrderRGB>,
0,
+ 0, 0
}, // Format_ARGB32
{
@@ -1998,8 +1986,6 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_ARGB_PM_to_Mono,
convert_ARGB_PM_to_Mono,
convert_ARGB_PM_to_Indexed8,
- convert_ARGB_PM_to_RGB,
- convert_ARGB_PM_to_ARGB,
0,
0,
0,
@@ -2010,13 +1996,16 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- convert_ARGB_PM_to_RGBx,
- convert_ARGB_PM_to_RGBA,
+ 0,
+ 0,
+ 0,
+ 0,
convert_ARGB_to_RGBA,
- convert_ARGB_PM_to_RGB30<PixelOrderBGR>,
- convert_ARGB_to_A2RGB30<PixelOrderBGR>,
- convert_ARGB_PM_to_RGB30<PixelOrderRGB>,
- convert_ARGB_to_A2RGB30<PixelOrderRGB>,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0, 0
}, // Format_ARGB32_Premultiplied
{
@@ -2038,7 +2027,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB16
{
@@ -2060,7 +2049,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8565_Premultiplied
{
@@ -2082,7 +2071,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB666
{
@@ -2104,7 +2093,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB6666_Premultiplied
{
@@ -2126,7 +2115,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB555
{
@@ -2148,7 +2137,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8555_Premultiplied
{
@@ -2156,6 +2145,9 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
+ convert_RGB888_to_RGB<false>,
+ convert_RGB888_to_RGB<false>,
+ convert_RGB888_to_RGB<false>,
0,
0,
0,
@@ -2165,12 +2157,10 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0, 0, 0, 0, 0
+ convert_RGB888_to_RGB<true>,
+ convert_RGB888_to_RGB<true>,
+ convert_RGB888_to_RGB<true>,
+ 0, 0, 0, 0, 0, 0
}, // Format_RGB888
{
@@ -2192,7 +2182,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB444
{
@@ -2213,7 +2203,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB4444_Premultiplied
{
0,
@@ -2235,7 +2225,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
mask_alpha_converter_RGBx,
mask_alpha_converter_RGBx,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGBX8888
{
0,
@@ -2244,7 +2234,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
convert_RGBA_to_RGB,
convert_RGBA_to_ARGB,
- convert_RGBA_to_ARGB_PM,
+ 0,
0,
0,
0,
@@ -2262,7 +2252,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
#endif
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGBA8888
{
@@ -2270,11 +2260,9 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- convert_RGBA_PM_to_RGB,
- convert_RGBA_PM_to_ARGB,
- convert_RGBA_to_ARGB,
0,
0,
+ convert_RGBA_to_ARGB,
0,
0,
0,
@@ -2282,16 +2270,11 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
-#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- convert_ARGB_PM_to_RGB,
- convert_ARGB_PM_to_ARGB,
0,
-#else
0,
0,
0,
-#endif
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGBA8888_Premultiplied
{
@@ -2317,16 +2300,17 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
convert_passthrough,
convert_BGR30_to_RGB30,
- convert_BGR30_to_RGB30
+ convert_BGR30_to_RGB30,
+ 0, 0
}, // Format_BGR30
{
0,
0,
0,
0,
- convert_A2RGB30_PM_to_RGB<PixelOrderBGR>,
0,
- convert_A2RGB30_to_ARGB<PixelOrderBGR>,
+ 0,
+ 0,
0,
0,
0,
@@ -2342,7 +2326,8 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_A2RGB30_PM_to_RGB30,
0,
0,
- convert_BGR30_to_RGB30
+ convert_BGR30_to_RGB30,
+ 0, 0
}, // Format_BGR30A2_Premultiplied
{
0,
@@ -2368,15 +2353,16 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
convert_passthrough,
+ 0, 0
}, // Format_RGB30
{
0,
0,
0,
0,
- convert_A2RGB30_PM_to_RGB<PixelOrderRGB>,
0,
- convert_A2RGB30_to_ARGB<PixelOrderRGB>,
+ 0,
+ 0,
0,
0,
0,
@@ -2393,19 +2379,61 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_BGR30_to_RGB30,
convert_A2RGB30_PM_to_RGB30,
0,
+ 0,
+ 0,
}, // Format_RGB30A2_Premultiplied
+ {
+ 0,
+ 0,
+ 0,
+ convert_Alpha8_to_Indexed8,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0, 0, 0, 0, 0, 0, 0
+ }, // Format_Alpha8
+ {
+ 0,
+ 0,
+ 0,
+ convert_Grayscale8_to_Indexed8,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0, 0, 0, 0, 0, 0, 0
+ } // Format_Grayscale8
};
InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats] =
{
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_Mono
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_MonoLSB
{
0,
@@ -2426,7 +2454,9 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0,
+ convert_Indexed8_to_Alpha8_inplace,
+ convert_Indexed8_to_Grayscale8_inplace,
}, // Format_Indexed8
{
0,
@@ -2434,8 +2464,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- 0,
- 0,
+ mask_alpha_converter_inplace<QImage::Format_ARGB32>,
+ mask_alpha_converter_inplace<QImage::Format_ARGB32_Premultiplied>,
convert_RGB_to_RGB16_inplace,
0,
0,
@@ -2447,19 +2477,20 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- 0, 0, 0, 0, 0
+ 0,
+ 0, 0, 0, 0, 0, 0
}, // Format_RGB32
{
0,
0,
0,
0,
- 0,
+ mask_alpha_converter_inplace<QImage::Format_RGB32>,
0,
#ifdef __SSE2__
convert_ARGB_to_ARGB_PM_inplace_sse2,
#else
- convert_ARGB_to_ARGB_PM_inplace,
+ 0,
#endif
0,
0,
@@ -2472,7 +2503,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
convert_ARGB_to_RGBA_inplace,
- 0, 0, 0, 0, 0
+ 0,
+ 0, 0, 0, 0, 0, 0
}, // Format_ARGB32
{
0,
@@ -2494,43 +2526,43 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
convert_ARGB_to_RGBA_inplace,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_ARGB32_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB16
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8565_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB666
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB6666_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB555
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8555_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB888
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB444
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB4444_Premultiplied
{
0,
0,
0,
0,
- convert_RGBA_to_ARGB_inplace,
- convert_RGBA_to_ARGB_inplace,
- convert_RGBA_to_ARGB_inplace,
+ convert_RGBA_to_ARGB_inplace<QImage::Format_RGB32>,
+ convert_RGBA_to_ARGB_inplace<QImage::Format_ARGB32>,
+ convert_RGBA_to_ARGB_inplace<QImage::Format_ARGB32_Premultiplied>,
0,
0,
0,
@@ -2543,16 +2575,16 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
convert_passthrough_inplace<QImage::Format_RGBA8888>,
convert_passthrough_inplace<QImage::Format_RGBA8888_Premultiplied>,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGBX8888
{
0,
0,
0,
0,
+ convert_RGBA_to_ARGB_inplace<QImage::Format_RGB32>,
+ convert_RGBA_to_ARGB_inplace<QImage::Format_ARGB32>,
0,
- convert_RGBA_to_ARGB_inplace,
- convert_RGBA_to_ARGB_PM_inplace,
0,
0,
0,
@@ -2563,9 +2595,14 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN && __SSE2__
0,
+ convert_ARGB_to_ARGB_PM_inplace_sse2,
+#else
0,
- 0, 0, 0, 0
+ 0,
+#endif
+ 0, 0, 0, 0, 0, 0
}, // Format_RGBA8888
{
0,
@@ -2574,7 +2611,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- convert_RGBA_to_ARGB_inplace,
+ convert_RGBA_to_ARGB_inplace<QImage::Format_ARGB32_Premultiplied>,
0,
0,
0,
@@ -2587,7 +2624,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGBA8888_Premultiplied
{
0,
@@ -2612,7 +2649,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
convert_passthrough_inplace<QImage::Format_A2BGR30_Premultiplied>,
convert_BGR30_to_RGB30_inplace,
- convert_BGR30_to_RGB30_inplace
+ convert_BGR30_to_RGB30_inplace,
+ 0, 0
}, // Format_BGR30
{
0,
@@ -2637,7 +2675,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_A2RGB30_PM_to_RGB30_inplace,
0,
0,
- convert_BGR30_to_RGB30_inplace
+ convert_BGR30_to_RGB30_inplace,
+ 0, 0
}, // Format_BGR30A2_Premultiplied
{
0,
@@ -2662,7 +2701,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_BGR30_to_RGB30_inplace,
convert_BGR30_to_RGB30_inplace,
0,
- convert_passthrough_inplace<QImage::Format_A2RGB30_Premultiplied>
+ convert_passthrough_inplace<QImage::Format_A2RGB30_Premultiplied>,
+ 0, 0
}, // Format_RGB30
{
0,
@@ -2687,8 +2727,61 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
convert_BGR30_to_RGB30_inplace,
convert_A2RGB30_PM_to_RGB30_inplace,
- 0
+ 0,
+ 0, 0
}, // Format_RGB30A2_Premultiplied
+ {
+ 0,
+ 0,
+ 0,
+ convert_Alpha8_to_Indexed8_inplace,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0, 0
+ }, // Format_Alpha8
+ {
+ 0,
+ 0,
+ 0,
+ convert_Grayscale8_to_Indexed8_inplace,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0, 0
+ } // Format_Grayscale8
};
void qInitImageConversions()
@@ -2702,6 +2795,22 @@ void qInitImageConversions()
}
#endif
+#if defined(QT_COMPILER_SUPPORTS_SSE4_1) && !defined(__SSE4_1__)
+ if (qCpuHasFeature(SSE4_1)) {
+ extern void convert_ARGB_to_ARGB_PM_sse4(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
+ qimage_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_sse4;
+ qimage_converter_map[QImage::Format_RGBA8888][QImage::Format_RGBA8888_Premultiplied] = convert_ARGB_to_ARGB_PM_sse4;
+ }
+#endif
+
+#if defined(QT_COMPILER_SUPPORTS_AVX2) && !defined(__AVX2__)
+ if (qCpuHasFeature(AVX2)) {
+ extern void convert_ARGB_to_ARGB_PM_avx2(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
+ qimage_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_avx2;
+ qimage_converter_map[QImage::Format_RGBA8888][QImage::Format_RGBA8888_Premultiplied] = convert_ARGB_to_ARGB_PM_avx2;
+ }
+#endif
+
#if defined(__ARM_NEON__) && !defined(Q_PROCESSOR_ARM_64)
extern void convert_RGB888_to_RGB32_neon(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
qimage_converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_neon;
diff --git a/src/gui/image/qimage_mips_dspr2.cpp b/src/gui/image/qimage_mips_dspr2.cpp
index 7b16790e16..0d0942298b 100644
--- a/src/gui/image/qimage_mips_dspr2.cpp
+++ b/src/gui/image/qimage_mips_dspr2.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qimage_mips_dspr2_asm.S b/src/gui/image/qimage_mips_dspr2_asm.S
index df626586dc..a14a91b390 100644
--- a/src/gui/image/qimage_mips_dspr2_asm.S
+++ b/src/gui/image/qimage_mips_dspr2_asm.S
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/image/qimage_neon.cpp b/src/gui/image/qimage_neon.cpp
index 88d1c87ee7..b51c43aa9d 100644
--- a/src/gui/image/qimage_neon.cpp
+++ b/src/gui/image/qimage_neon.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index 7e2d4305ef..7eb571900a 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -131,6 +131,8 @@ inline int qt_depthForFormat(QImage::Format format)
depth = 1;
break;
case QImage::Format_Indexed8:
+ case QImage::Format_Alpha8:
+ case QImage::Format_Grayscale8:
depth = 8;
break;
case QImage::Format_RGB32:
diff --git a/src/gui/image/qimage_sse2.cpp b/src/gui/image/qimage_sse2.cpp
index 84612e297d..4a719d4c26 100644
--- a/src/gui/image/qimage_sse2.cpp
+++ b/src/gui/image/qimage_sse2.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags)
{
- Q_ASSERT(data->format == QImage::Format_ARGB32);
+ Q_ASSERT(data->format == QImage::Format_ARGB32 || data->format == QImage::Format_RGBA8888);
// extra pixels on each line
const int spare = data->width & 3;
@@ -92,7 +92,10 @@ bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionF
d = reinterpret_cast<__m128i*>(p+pad);
}
- data->format = QImage::Format_ARGB32_Premultiplied;
+ if (data->format == QImage::Format_ARGB32)
+ data->format = QImage::Format_ARGB32_Premultiplied;
+ else
+ data->format = QImage::Format_RGBA8888_Premultiplied;
return true;
}
diff --git a/src/gui/image/qimage_sse4.cpp b/src/gui/image/qimage_sse4.cpp
new file mode 100644
index 0000000000..5fad4f572a
--- /dev/null
+++ b/src/gui/image/qimage_sse4.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qimage.h>
+#include <private/qdrawhelper_p.h>
+#include <private/qdrawingprimitive_sse2_p.h>
+#include <private/qimage_p.h>
+#include <private/qsimd_p.h>
+
+#ifdef QT_COMPILER_SUPPORTS_SSE4_1
+
+QT_BEGIN_NAMESPACE
+
+const uint *QT_FASTCALL convertRGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = 0xff000000 | qUnpremultiply_sse4(src[i]);
+ return buffer;
+}
+
+void convert_ARGB_to_ARGB_PM_sse4(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888);
+ Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied || dest->format == QImage::Format_RGBA8888_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const uint *src_data = (uint *) src->data;
+ uint *dest_data = (uint *) dest->data;
+ for (int i = 0; i < src->height; ++i) {
+ qt_convertARGB32ToARGB32PM(dest_data, src_data, src->width);
+ src_data += src->bytes_per_line >> 2;
+ dest_data += dest->bytes_per_line >> 2;
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_COMPILER_SUPPORTS_SSE4_1
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
index 24bdba3b36..4597661776 100644
--- a/src/gui/image/qimage_ssse3.cpp
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -65,7 +65,7 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con
// Mask to have alpha = 0xff
const __m128i alphaMask = _mm_set1_epi32(0xff000000);
- __m128i *inVectorPtr = (__m128i *)src;
+ const __m128i *inVectorPtr = (const __m128i *)src;
__m128i *dstVectorPtr = (__m128i *)dst;
const int simdRoundCount = (len - prologLength) / 16; // one iteration in the loop converts 16 pixels
@@ -110,7 +110,7 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con
_mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
++dstVectorPtr;
}
- src = (uchar *)inVectorPtr;
+ src = (const uchar *)inVectorPtr;
dst = (quint32 *)dstVectorPtr;
while (dst != end) {
diff --git a/src/gui/image/qimageiohandler.cpp b/src/gui/image/qimageiohandler.cpp
index 1ecf445d57..cc9a6ae2a1 100644
--- a/src/gui/image/qimageiohandler.cpp
+++ b/src/gui/image/qimageiohandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -153,6 +153,12 @@
\value SupportedSubTypes Image formats that support different saving
variants should return a list of supported variant names
(QList<QByteArray>) in this option.
+
+ \value OptimizedWrite. A handler which supports this option
+ is expected to turn on optimization flags when writing.
+
+ \value ProgressiveScanWrite. A handler which supports
+ this option is expected to write the image as a progressive scan image.
*/
/*!
diff --git a/src/gui/image/qimageiohandler.h b/src/gui/image/qimageiohandler.h
index 3b3c410e0c..b48226f619 100644
--- a/src/gui/image/qimageiohandler.h
+++ b/src/gui/image/qimageiohandler.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -84,7 +84,9 @@ public:
Animation,
BackgroundColor,
ImageFormat,
- SupportedSubTypes
+ SupportedSubTypes,
+ OptimizedWrite,
+ ProgressiveScanWrite
};
virtual QVariant option(ImageOption option) const;
virtual void setOption(ImageOption option, const QVariant &value);
diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp
index 9ed2f31f19..613a1de678 100644
--- a/src/gui/image/qimagepixmapcleanuphooks.cpp
+++ b/src/gui/image/qimagepixmapcleanuphooks.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qimagepixmapcleanuphooks_p.h b/src/gui/image/qimagepixmapcleanuphooks_p.h
index 58eb2a75a2..76fd5ca9be 100644
--- a/src/gui/image/qimagepixmapcleanuphooks_p.h
+++ b/src/gui/image/qimagepixmapcleanuphooks_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index a7a08a6fee..c2795cc38d 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1290,7 +1290,7 @@ bool QImageReader::read(QImage *image)
}
// successful read; check for "@2x" file name suffix and set device pixel ratio.
- static bool disable2xImageLoading = !qgetenv("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING").isEmpty();
+ static bool disable2xImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING");
if (!disable2xImageLoading && QFileInfo(fileName()).baseName().endsWith(QLatin1String("@2x"))) {
image->setDevicePixelRatio(2.0);
}
diff --git a/src/gui/image/qimagereader.h b/src/gui/image/qimagereader.h
index 6686915e50..34191ed657 100644
--- a/src/gui/image/qimagereader.h
+++ b/src/gui/image/qimagereader.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index fa261df1a5..b418101163 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -252,6 +252,8 @@ public:
QString description;
QString text;
QByteArray subType;
+ bool optimizedWrite;
+ bool progressiveScanWrite;
// error
QImageWriter::ImageWriterError imageWriterError;
@@ -271,6 +273,8 @@ QImageWriterPrivate::QImageWriterPrivate(QImageWriter *qq)
quality = -1;
compression = 0;
gamma = 0.0;
+ optimizedWrite = false;
+ progressiveScanWrite = false;
imageWriterError = QImageWriter::UnknownError;
errorString = QImageWriter::tr("Unknown error");
@@ -555,6 +559,63 @@ QList<QByteArray> QImageWriter::supportedSubTypes() const
}
/*!
+ \since 5.5
+
+ This is an image format-specific function which sets the \a optimize flags when
+ writing images. For image formats that do not support setting an \a optimize flag,
+ this value is ignored.
+
+ The default is false.
+
+ \sa optimizedWrite()
+*/
+void QImageWriter::setOptimizedWrite(bool optimize)
+{
+ d->optimizedWrite = optimize;
+}
+
+/*!
+ \since 5.5
+
+ Returns whether optimization has been turned on for writing the image.
+
+ \sa setOptimizedWrite()
+*/
+bool QImageWriter::optimizedWrite() const
+{
+ return d->optimizedWrite;
+}
+
+/*!
+ \since 5.5
+
+ This is an image format-specific function which turns on \a progressive scanning
+ when writing images. For image formats that do not support setting a \a progressive
+ scan flag, this value is ignored.
+
+ The default is false.
+
+ \sa progressiveScanWrite()
+*/
+
+void QImageWriter::setProgressiveScanWrite(bool progressive)
+{
+ d->progressiveScanWrite = progressive;
+}
+
+/*!
+ \since 5.5
+
+ Returns whether the image should be written as a progressive image.
+
+ \sa setProgressiveScanWrite()
+*/
+bool QImageWriter::progressiveScanWrite() const
+{
+ return d->progressiveScanWrite;
+}
+
+/*!
\obsolete
Use setText() instead.
@@ -657,6 +718,10 @@ bool QImageWriter::write(const QImage &image)
d->handler->setOption(QImageIOHandler::Description, d->description);
if (!d->subType.isEmpty() && d->handler->supportsOption(QImageIOHandler::SubType))
d->handler->setOption(QImageIOHandler::SubType, d->subType);
+ if (d->handler->supportsOption(QImageIOHandler::OptimizedWrite))
+ d->handler->setOption(QImageIOHandler::OptimizedWrite, d->optimizedWrite);
+ if (d->handler->supportsOption(QImageIOHandler::ProgressiveScanWrite))
+ d->handler->setOption(QImageIOHandler::ProgressiveScanWrite, d->progressiveScanWrite);
if (!d->handler->write(image))
return false;
diff --git a/src/gui/image/qimagewriter.h b/src/gui/image/qimagewriter.h
index f458a259aa..96d8f51b3a 100644
--- a/src/gui/image/qimagewriter.h
+++ b/src/gui/image/qimagewriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -83,6 +83,12 @@ public:
QByteArray subType() const;
QList<QByteArray> supportedSubTypes() const;
+ void setOptimizedWrite(bool optimize);
+ bool optimizedWrite() const;
+
+ void setProgressiveScanWrite(bool progressive);
+ bool progressiveScanWrite() const;
+
// Obsolete as of 4.1
void setDescription(const QString &description);
QString description() const;
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index 9cf9947b6c..839f90f17c 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -69,26 +69,14 @@ extern "C" {
QT_BEGIN_NAMESPACE
-void QT_FASTCALL convert_rgb888_to_rgb32_C(quint32 *dst, const uchar *src, int len)
-{
- // Expand 24->32 bpp.
- for (int i = 0; i < len; ++i) {
- *dst++ = qRgb(src[0], src[1], src[2]);
- src += 3;
- }
-}
-
+Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32(quint32 *dst, const uchar *src, int len);
typedef void (QT_FASTCALL *Rgb888ToRgb32Converter)(quint32 *dst, const uchar *src, int len);
-static Rgb888ToRgb32Converter rgb888ToRgb32ConverterPtr = convert_rgb888_to_rgb32_C;
-
struct my_error_mgr : public jpeg_error_mgr {
jmp_buf setjmp_buffer;
};
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void my_error_exit (j_common_ptr cinfo)
{
@@ -106,9 +94,7 @@ static void my_output_message(j_common_ptr cinfo)
qWarning("%s", buffer);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
static const int max_buf = 4096;
@@ -123,9 +109,7 @@ public:
my_jpeg_source_mgr(QIODevice *device);
};
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void qt_init_source(j_decompress_ptr)
{
@@ -185,9 +169,7 @@ static void qt_term_source(j_decompress_ptr cinfo)
src->device->seek(src->device->pos() - src->bytes_in_buffer);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
inline my_jpeg_source_mgr::my_jpeg_source_mgr(QIODevice *device)
{
@@ -220,7 +202,7 @@ inline static bool read_jpeg_format(QImage::Format &format, j_decompress_ptr cin
bool result = true;
switch (cinfo->output_components) {
case 1:
- format = QImage::Format_Indexed8;
+ format = QImage::Format_Grayscale8;
break;
case 3:
case 4:
@@ -240,7 +222,7 @@ static bool ensureValidImage(QImage *dest, struct jpeg_decompress_struct *info,
QImage::Format format;
switch (info->output_components) {
case 1:
- format = QImage::Format_Indexed8;
+ format = QImage::Format_Grayscale8;
break;
case 3:
case 4:
@@ -250,22 +232,17 @@ static bool ensureValidImage(QImage *dest, struct jpeg_decompress_struct *info,
return false; // unsupported format
}
- if (dest->size() != size || dest->format() != format) {
+ if (dest->size() != size || dest->format() != format)
*dest = QImage(size, format);
- if (format == QImage::Format_Indexed8) {
- dest->setColorCount(256);
- for (int i = 0; i < 256; i++)
- dest->setColor(i, qRgb(i,i,i));
- }
- }
-
return !dest->isNull();
}
static bool read_jpeg_image(QImage *outImage,
QSize scaledSize, QRect scaledClipRect,
- QRect clipRect, volatile int inQuality, j_decompress_ptr info, struct my_error_mgr* err )
+ QRect clipRect, volatile int inQuality,
+ Rgb888ToRgb32Converter converter,
+ j_decompress_ptr info, struct my_error_mgr* err )
{
if (!setjmp(err->setjmp_buffer)) {
// -1 means default quality.
@@ -406,7 +383,7 @@ static bool read_jpeg_image(QImage *outImage,
if (info->output_components == 3) {
uchar *in = rows[0] + clip.x() * 3;
QRgb *out = (QRgb*)outImage->scanLine(y);
- rgb888ToRgb32ConverterPtr(out, in, clip.width());
+ converter(out, in, clip.width());
} else if (info->out_color_space == JCS_CMYK) {
// Convert CMYK->RGB.
uchar *in = rows[0] + clip.x() * 4;
@@ -465,9 +442,7 @@ public:
};
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void qt_init_destination(j_compress_ptr)
{
@@ -497,9 +472,7 @@ static void qt_term_destination(j_compress_ptr cinfo)
(*cinfo->err->error_exit)((j_common_ptr)cinfo);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
inline my_jpeg_destination_mgr::my_jpeg_destination_mgr(QIODevice *device)
{
@@ -541,15 +514,18 @@ static inline void set_text(const QImage &image, j_compress_ptr cinfo, const QSt
comment += it.value().toLatin1();
if (comment.length() > 65530)
comment.truncate(65530);
- jpeg_write_marker(cinfo, JPEG_COM, (JOCTET *)comment.constData(), comment.size());
+ jpeg_write_marker(cinfo, JPEG_COM, (const JOCTET *)comment.constData(), comment.size());
}
}
-static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile int sourceQuality, const QString &description)
+static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile int sourceQuality, const QString &description, bool optimize, bool progressive)
{
bool success = false;
const QVector<QRgb> cmap = image.colorTable();
+ if (image.format() == QImage::Format_Invalid || image.format() == QImage::Format_Alpha8)
+ return false;
+
struct jpeg_compress_struct cinfo;
JSAMPROW row_pointer[1];
row_pointer[0] = 0;
@@ -573,19 +549,23 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile in
cinfo.image_width = image.width();
cinfo.image_height = image.height();
- bool gray=false;
+ bool gray = false;
switch (image.format()) {
case QImage::Format_Mono:
case QImage::Format_MonoLSB:
case QImage::Format_Indexed8:
gray = true;
- for (int i = image.colorCount(); gray && i--;) {
- gray = gray & (qRed(cmap[i]) == qGreen(cmap[i]) &&
- qRed(cmap[i]) == qBlue(cmap[i]));
+ for (int i = image.colorCount(); gray && i; i--) {
+ gray = gray & qIsGray(cmap[i-1]);
}
cinfo.input_components = gray ? 1 : 3;
cinfo.in_color_space = gray ? JCS_GRAYSCALE : JCS_RGB;
break;
+ case QImage::Format_Grayscale8:
+ gray = true;
+ cinfo.input_components = 1;
+ cinfo.in_color_space = JCS_GRAYSCALE;
+ break;
default:
cinfo.input_components = 3;
cinfo.in_color_space = JCS_RGB;
@@ -607,6 +587,11 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile in
cinfo.Y_density = (image.dotsPerMeterY()+50) / 100;
}
+ if (optimize)
+ cinfo.optimize_coding = true;
+
+ if (progressive)
+ jpeg_simple_progression(&cinfo);
int quality = sourceQuality >= 0 ? qMin(int(sourceQuality),100) : 75;
jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
@@ -670,6 +655,9 @@ static bool write_jpeg_image(const QImage &image, QIODevice *device, volatile in
}
}
break;
+ case QImage::Format_Grayscale8:
+ memcpy(row, image.constScanLine(cinfo.next_scanline), w);
+ break;
case QImage::Format_RGB888:
memcpy(row, image.constScanLine(cinfo.next_scanline), w * 3);
break;
@@ -726,7 +714,8 @@ public:
};
QJpegHandlerPrivate(QJpegHandler *qq)
- : quality(75), exifOrientation(1), iod_src(0), state(Ready), q(qq)
+ : quality(75), exifOrientation(1), iod_src(0),
+ rgb888ToRgb32ConverterPtr(qt_convert_rgb888_to_rgb32), state(Ready), optimize(false), progressive(false), q(qq)
{}
~QJpegHandlerPrivate()
@@ -757,8 +746,13 @@ public:
struct my_jpeg_source_mgr * iod_src;
struct my_error_mgr err;
+ Rgb888ToRgb32Converter rgb888ToRgb32ConverterPtr;
+
State state;
+ bool optimize;
+ bool progressive;
+
QJpegHandler *q;
};
@@ -977,7 +971,7 @@ bool QJpegHandlerPrivate::read(QImage *image)
if(state == ReadHeader)
{
- bool success = read_jpeg_image(image, scaledSize, scaledClipRect, clipRect, quality, &info, &err);
+ bool success = read_jpeg_image(image, scaledSize, scaledClipRect, clipRect, quality, rgb888ToRgb32ConverterPtr, &info, &err);
if (success) {
for (int i = 0; i < readTexts.size()-1; i+=2)
image->setText(readTexts.at(i), readTexts.at(i+1));
@@ -1005,20 +999,18 @@ QJpegHandler::QJpegHandler()
// from qimage_neon.cpp
if (qCpuHasFeature(NEON))
- rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_neon;
+ d->rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_neon;
#endif
#if defined(QT_COMPILER_SUPPORTS_SSSE3)
- // from qimage_ssse3.cpp
-
- if (false) {
- } else if (qCpuHasFeature(SSSE3)) {
- rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_ssse3;
+ // from qimage_ssse3.cpps
+ if (qCpuHasFeature(SSSE3)) {
+ d->rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_ssse3;
}
#endif // QT_COMPILER_SUPPORTS_SSSE3
#if defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
if (qCpuHasFeature(DSPR2)) {
- rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_mips_dspr2_asm;
+ d->rgb888ToRgb32ConverterPtr = qt_convert_rgb888_to_rgb32_mips_dspr2_asm;
}
#endif // QT_COMPILER_SUPPORTS_DSPR2
}
@@ -1063,7 +1055,7 @@ bool QJpegHandler::read(QImage *image)
bool QJpegHandler::write(const QImage &image)
{
- return write_jpeg_image(image, device(), d->quality, d->description);
+ return write_jpeg_image(image, device(), d->quality, d->description, d->optimize, d->progressive);
}
bool QJpegHandler::supportsOption(ImageOption option) const
@@ -1074,7 +1066,9 @@ bool QJpegHandler::supportsOption(ImageOption option) const
|| option == ClipRect
|| option == Description
|| option == Size
- || option == ImageFormat;
+ || option == ImageFormat
+ || option == OptimizedWrite
+ || option == ProgressiveScanWrite;
}
QVariant QJpegHandler::option(ImageOption option) const
@@ -1097,6 +1091,10 @@ QVariant QJpegHandler::option(ImageOption option) const
case ImageFormat:
d->readJpegHeader(device());
return d->format;
+ case OptimizedWrite:
+ return d->optimize;
+ case ProgressiveScanWrite:
+ return d->progressive;
default:
break;
}
@@ -1122,6 +1120,12 @@ void QJpegHandler::setOption(ImageOption option, const QVariant &value)
case Description:
d->description = value.toString();
break;
+ case OptimizedWrite:
+ d->optimize = value.toBool();
+ break;
+ case ProgressiveScanWrite:
+ d->progressive = value.toBool();
+ break;
default:
break;
}
diff --git a/src/gui/image/qjpeghandler_p.h b/src/gui/image/qjpeghandler_p.h
index 85b903bf44..ce53085031 100644
--- a/src/gui/image/qjpeghandler_p.h
+++ b/src/gui/image/qjpeghandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -58,17 +58,17 @@ public:
QJpegHandler();
~QJpegHandler();
- bool canRead() const;
- bool read(QImage *image);
- bool write(const QImage &image);
+ bool canRead() const Q_DECL_OVERRIDE;
+ bool read(QImage *image) Q_DECL_OVERRIDE;
+ bool write(const QImage &image) Q_DECL_OVERRIDE;
- QByteArray name() const;
+ QByteArray name() const Q_DECL_OVERRIDE;
static bool canRead(QIODevice *device);
- QVariant option(ImageOption option) const;
- void setOption(ImageOption option, const QVariant &value);
- bool supportsOption(ImageOption option) const;
+ QVariant option(ImageOption option) const Q_DECL_OVERRIDE;
+ void setOption(ImageOption option, const QVariant &value) Q_DECL_OVERRIDE;
+ bool supportsOption(ImageOption option) const Q_DECL_OVERRIDE;
private:
QJpegHandlerPrivate *d;
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index 8a90a2c25b..09cd788c61 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qmovie.h b/src/gui/image/qmovie.h
index c1560fdab6..13bc381f8e 100644
--- a/src/gui/image/qmovie.h
+++ b/src/gui/image/qmovie.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -58,7 +58,6 @@ class Q_GUI_EXPORT QMovie : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QMovie)
- Q_ENUMS(MovieState CacheMode)
Q_PROPERTY(int speed READ speed WRITE setSpeed)
Q_PROPERTY(CacheMode cacheMode READ cacheMode WRITE setCacheMode)
public:
@@ -67,10 +66,12 @@ public:
Paused,
Running
};
+ Q_ENUM(MovieState)
enum CacheMode {
CacheNone,
CacheAll
};
+ Q_ENUM(CacheMode)
explicit QMovie(QObject *parent = 0);
explicit QMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent = 0);
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index ae60d80afb..f349cba374 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h
index 54dbe352f3..49477521dc 100644
--- a/src/gui/image/qnativeimage_p.h
+++ b/src/gui/image/qnativeimage_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp
index d450d82496..b17fb73133 100644
--- a/src/gui/image/qpaintengine_pic.cpp
+++ b/src/gui/image/qpaintengine_pic.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpaintengine_pic_p.h b/src/gui/image/qpaintengine_pic_p.h
index ef8b5643d1..f7f945bbbb 100644
--- a/src/gui/image/qpaintengine_pic_p.h
+++ b/src/gui/image/qpaintengine_pic_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -62,10 +62,10 @@ public:
QPicturePaintEngine();
~QPicturePaintEngine();
- bool begin(QPaintDevice *pdev);
- bool end();
+ bool begin(QPaintDevice *pdev) Q_DECL_OVERRIDE;
+ bool end() Q_DECL_OVERRIDE;
- void updateState(const QPaintEngineState &state);
+ void updateState(const QPaintEngineState &state) Q_DECL_OVERRIDE;
void updatePen(const QPen &pen);
void updateBrush(const QBrush &brush);
@@ -80,23 +80,18 @@ public:
void updateClipEnabled(bool enabled);
void updateOpacity(qreal opacity);
- void drawEllipse(const QRectF &rect);
- void drawPath(const QPainterPath &path);
- void drawPolygon(const QPointF *points, int numPoints, PolygonDrawMode mode);
-#ifdef Q_NO_USING_KEYWORD
- inline void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
- { QPaintEngine::drawPolygon(points, pointCount, mode); }
-#else
+ void drawEllipse(const QRectF &rect) Q_DECL_OVERRIDE;
+ void drawPath(const QPainterPath &path) Q_DECL_OVERRIDE;
+ void drawPolygon(const QPointF *points, int numPoints, PolygonDrawMode mode) Q_DECL_OVERRIDE;
using QPaintEngine::drawPolygon;
-#endif
- void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
- void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
+ void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) Q_DECL_OVERRIDE;
+ void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) Q_DECL_OVERRIDE;
void drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
- Qt::ImageConversionFlags flags = Qt::AutoColor);
- void drawTextItem(const QPointF &p, const QTextItem &ti);
+ Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE;
+ void drawTextItem(const QPointF &p, const QTextItem &ti) Q_DECL_OVERRIDE;
- Type type() const { return Picture; }
+ Type type() const Q_DECL_OVERRIDE { return Picture; }
protected:
QPicturePaintEngine(QPaintEnginePrivate &dptr);
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index bb37461b4f..b63be19153 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -450,8 +450,8 @@ public:
QFakeDevice() { dpi_x = qt_defaultDpiX(); dpi_y = qt_defaultDpiY(); }
void setDpiX(int dpi) { dpi_x = dpi; }
void setDpiY(int dpi) { dpi_y = dpi; }
- QPaintEngine *paintEngine() const { return 0; }
- int metric(PaintDeviceMetric m) const
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE { return 0; }
+ int metric(PaintDeviceMetric m) const Q_DECL_OVERRIDE
{
switch(m) {
case PdmPhysicalDpiX:
@@ -1213,7 +1213,7 @@ QList<QByteArray> QPicture::inputFormats()
return QPictureIO::inputFormats();
}
-static QStringList qToStringList(const QList<QByteArray> arr)
+static QStringList qToStringList(const QList<QByteArray> &arr)
{
QStringList list;
for (int i = 0; i < arr.count(); ++i)
@@ -1362,7 +1362,7 @@ void QPictureIO::init()
QPictureIO::~QPictureIO()
{
if (d->parameters)
- delete [] (char*)d->parameters;
+ delete [] d->parameters;
delete d;
}
@@ -1671,7 +1671,7 @@ const char *QPictureIO::parameters() const
void QPictureIO::setParameters(const char *parameters)
{
if (d->parameters)
- delete [] (char*)d->parameters;
+ delete [] d->parameters;
d->parameters = qstrdup(parameters);
}
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index 1ad20a4e70..9bb193321b 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -55,7 +55,7 @@ public:
bool isNull() const;
- int devType() const;
+ int devType() const Q_DECL_OVERRIDE;
uint size() const;
const char* data() const;
virtual void setData(const char* data, uint size);
@@ -88,12 +88,12 @@ public:
static QStringList inputFormatList();
static QStringList outputFormatList();
- QPaintEngine *paintEngine() const;
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
protected:
QPicture(QPicturePrivate &data);
- int metric(PaintDeviceMetric m) const;
+ int metric(PaintDeviceMetric m) const Q_DECL_OVERRIDE;
private:
bool exec(QPainter *p, QDataStream &ds, int i);
diff --git a/src/gui/image/qpicture_p.h b/src/gui/image/qpicture_p.h
index bc6ccdbe24..56e6e1249c 100644
--- a/src/gui/image/qpicture_p.h
+++ b/src/gui/image/qpicture_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpictureformatplugin.cpp b/src/gui/image/qpictureformatplugin.cpp
index 4c7ad42b8f..0400a3a843 100644
--- a/src/gui/image/qpictureformatplugin.cpp
+++ b/src/gui/image/qpictureformatplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpictureformatplugin.h b/src/gui/image/qpictureformatplugin.h
index 8bf5676c08..773c0180d3 100644
--- a/src/gui/image/qpictureformatplugin.h
+++ b/src/gui/image/qpictureformatplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index d4c0f264e8..e53af8038f 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -675,13 +675,16 @@ qreal QPixmap::devicePixelRatio() const
high-DPI pixmap rather than a large pixmap
(see \l{Drawing High Resolution Versions of Pixmaps and Images}).
- \sa devicePixelRatio()
+ \sa devicePixelRatio()
*/
void QPixmap::setDevicePixelRatio(qreal scaleFactor)
{
if (isNull())
return;
+ if (scaleFactor == data->devicePixelRatio())
+ return;
+
detach();
data->setDevicePixelRatio(scaleFactor);
}
@@ -821,8 +824,7 @@ bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::I
return false;
}
- if (!data)
- data = QPlatformPixmap::create(0, 0, QPlatformPixmap::PixmapType);
+ data = QPlatformPixmap::create(0, 0, QPlatformPixmap::PixmapType);
if (data->fromData(buf, len, format, flags))
return true;
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index dce64bd2dd..810883ea6c 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -75,7 +75,7 @@ public:
operator QVariant() const;
bool isNull() const;
- int devType() const;
+ int devType() const Q_DECL_OVERRIDE;
int width() const;
int height() const;
@@ -154,7 +154,7 @@ public:
bool isQBitmap() const;
- QPaintEngine *paintEngine() const;
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
inline bool operator!() const { return isNull(); }
@@ -164,7 +164,7 @@ public:
#endif
protected:
- int metric(PaintDeviceMetric) const;
+ int metric(PaintDeviceMetric) const Q_DECL_OVERRIDE;
static QPixmap fromImageInPlace(QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor);
private:
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index 0e911cd9aa..f24cbc3db9 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h
index ec6c1eb8e5..6dbcbd91be 100644
--- a/src/gui/image/qpixmap_blitter_p.h
+++ b/src/gui/image/qpixmap_blitter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -62,17 +62,17 @@ public:
QBlittable *blittable() const;
void setBlittable(QBlittable *blittable);
- void resize(int width, int height);
- int metric(QPaintDevice::PaintDeviceMetric metric) const;
- void fill(const QColor &color);
- QImage *buffer();
- QImage toImage() const;
- bool hasAlphaChannel() const;
- void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
- qreal devicePixelRatio() const;
- void setDevicePixelRatio(qreal scaleFactor);
-
- QPaintEngine *paintEngine() const;
+ void resize(int width, int height) Q_DECL_OVERRIDE;
+ int metric(QPaintDevice::PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
+ void fill(const QColor &color) Q_DECL_OVERRIDE;
+ QImage *buffer() Q_DECL_OVERRIDE;
+ QImage toImage() const Q_DECL_OVERRIDE;
+ bool hasAlphaChannel() const Q_DECL_OVERRIDE;
+ void fromImage(const QImage &image, Qt::ImageConversionFlags flags) Q_DECL_OVERRIDE;
+ qreal devicePixelRatio() const Q_DECL_OVERRIDE;
+ void setDevicePixelRatio(qreal scaleFactor) Q_DECL_OVERRIDE;
+
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
void markRasterOverlay(const QRectF &);
void markRasterOverlay(const QPointF &, const QTextItem &);
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 65e7fb0096..9c8835a7a0 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -203,9 +203,14 @@ void QRasterPlatformPixmap::fill(const QColor &color)
pixel = qPremultiply(color.rgba());
const QPixelLayout *layout = &qPixelLayouts[image.format()];
layout->convertFromARGB32PM(&pixel, &pixel, 1, layout, 0);
- } else {
+ } else if (image.format() == QImage::Format_Alpha8) {
+ pixel = qAlpha(color.rgba());
+ } else if (image.format() == QImage::Format_Grayscale8) {
+ pixel = qGray(color.rgba());
+ } else
+ {
pixel = 0;
- // ### what about 8 bits
+ // ### what about 8 bit indexed?
}
image.fill(pixel);
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h
index ffb4b591de..7f3c54f853 100644
--- a/src/gui/image/qpixmap_raster_p.h
+++ b/src/gui/image/qpixmap_raster_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -56,28 +56,28 @@ public:
QRasterPlatformPixmap(PixelType type);
~QRasterPlatformPixmap();
- QPlatformPixmap *createCompatiblePlatformPixmap() const;
+ QPlatformPixmap *createCompatiblePlatformPixmap() const Q_DECL_OVERRIDE;
- void resize(int width, int height);
- bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags);
- void fromImage(const QImage &image, Qt::ImageConversionFlags flags);
- void fromImageInPlace(QImage &image, Qt::ImageConversionFlags flags);
- void fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags);
+ void resize(int width, int height) Q_DECL_OVERRIDE;
+ bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags) Q_DECL_OVERRIDE;
+ void fromImage(const QImage &image, Qt::ImageConversionFlags flags) Q_DECL_OVERRIDE;
+ void fromImageInPlace(QImage &image, Qt::ImageConversionFlags flags) Q_DECL_OVERRIDE;
+ void fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags) Q_DECL_OVERRIDE;
- void copy(const QPlatformPixmap *data, const QRect &rect);
- bool scroll(int dx, int dy, const QRect &rect);
- void fill(const QColor &color);
- bool hasAlphaChannel() const;
- QImage toImage() const;
- QImage toImage(const QRect &rect) const;
- QPaintEngine* paintEngine() const;
- QImage* buffer();
- qreal devicePixelRatio() const;
- void setDevicePixelRatio(qreal scaleFactor);
+ void copy(const QPlatformPixmap *data, const QRect &rect) Q_DECL_OVERRIDE;
+ bool scroll(int dx, int dy, const QRect &rect) Q_DECL_OVERRIDE;
+ void fill(const QColor &color) Q_DECL_OVERRIDE;
+ bool hasAlphaChannel() const Q_DECL_OVERRIDE;
+ QImage toImage() const Q_DECL_OVERRIDE;
+ QImage toImage(const QRect &rect) const Q_DECL_OVERRIDE;
+ QPaintEngine* paintEngine() const Q_DECL_OVERRIDE;
+ QImage* buffer() Q_DECL_OVERRIDE;
+ qreal devicePixelRatio() const Q_DECL_OVERRIDE;
+ void setDevicePixelRatio(qreal scaleFactor) Q_DECL_OVERRIDE;
protected:
- int metric(QPaintDevice::PaintDeviceMetric metric) const;
+ int metric(QPaintDevice::PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
void createPixmapForImage(QImage &sourceImage, Qt::ImageConversionFlags flags, bool inPlace);
void setImage(const QImage &image);
QImage image;
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index 8cc840ccbd..0de47f55af 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 170a295cf8..f9c362e194 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -159,7 +159,7 @@ public:
QPMCache();
~QPMCache();
- void timerEvent(QTimerEvent *);
+ void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
bool insert(const QString& key, const QPixmap &pixmap, int cost);
QPixmapCache::Key insert(const QPixmap &pixmap, int cost);
bool replace(const QPixmapCache::Key &key, const QPixmap &pixmap, int cost);
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index ac8496614e..345389e987 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
index ec4ca43481..99490a0e17 100644
--- a/src/gui/image/qpixmapcache_p.h
+++ b/src/gui/image/qpixmapcache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp
index 15f83f2f7d..8e8b192cdd 100644
--- a/src/gui/image/qplatformpixmap.cpp
+++ b/src/gui/image/qplatformpixmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qplatformpixmap.h b/src/gui/image/qplatformpixmap.h
index a7d7629ea9..f0f17a5bbb 100644
--- a/src/gui/image/qplatformpixmap.h
+++ b/src/gui/image/qplatformpixmap.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 17a0dd3eb9..3c88d2e9c1 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -157,10 +157,6 @@ public:
};
-#if defined(Q_C_CALLBACKS)
-extern "C" {
-#endif
-
class QPNGImageWriter {
public:
explicit QPNGImageWriter(QIODevice*);
@@ -190,6 +186,7 @@ private:
float gamma;
};
+extern "C" {
static
void CALLBACK_CALL_TYPE iod_read_fn(png_structp png_ptr, png_bytep data, png_size_t length)
{
@@ -234,9 +231,7 @@ void CALLBACK_CALL_TYPE qpiw_flush_fn(png_structp /* png_ptr */)
{
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
static
void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scaledSize, bool *doScaledRead, float screen_gamma=0.0)
@@ -295,6 +290,15 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal
png_set_swap_alpha(png_ptr);
png_read_update_info(png_ptr, info_ptr);
+ } else if (bit_depth == 8 && !png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
+ png_set_expand(png_ptr);
+ if (image.size() != QSize(width, height) || image.format() != QImage::Format_Grayscale8) {
+ image = QImage(width, height, QImage::Format_Grayscale8);
+ if (image.isNull())
+ return;
+ }
+
+ png_read_update_info(png_ptr, info_ptr);
} else {
if (bit_depth == 16)
png_set_strip_16(png_ptr);
@@ -483,17 +487,13 @@ static void read_image_scaled(QImage *outImage, png_structp png_ptr, png_infop i
}
-#if defined(Q_C_CALLBACKS)
extern "C" {
-#endif
static void CALLBACK_CALL_TYPE qt_png_warning(png_structp /*png_ptr*/, png_const_charp message)
{
qWarning("libpng warning: %s", message);
}
-#if defined(Q_C_CALLBACKS)
}
-#endif
void Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngTexts(png_info *info)
@@ -666,6 +666,8 @@ QImage::Format QPngHandlerPrivate::readImageFormat()
format = QImage::Format_Mono;
} else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
format = QImage::Format_ARGB32;
+ } else if (bit_depth == 8 && !png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
+ format = QImage::Format_Grayscale8;
} else {
format = QImage::Format_Indexed8;
}
@@ -857,6 +859,8 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, vo
else
color_type = PNG_COLOR_TYPE_PALETTE;
}
+ else if (image.format() == QImage::Format_Grayscale8)
+ color_type = PNG_COLOR_TYPE_GRAY;
else if (image.hasAlphaChannel())
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
else
@@ -938,7 +942,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, vo
// 0123456789aBC
data[0xB] = looping%0x100;
data[0xC] = looping/0x100;
- png_write_chunk(png_ptr, (png_byte*)"gIFx", data, 13);
+ png_write_chunk(png_ptr, const_cast<png_bytep>((const png_byte *)"gIFx"), data, 13);
}
if (ms_delay >= 0 || disposal!=Unspecified) {
uchar data[4];
@@ -946,7 +950,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, vo
data[1] = 0;
data[2] = (ms_delay/10)/0x100; // hundredths
data[3] = (ms_delay/10)%0x100;
- png_write_chunk(png_ptr, (png_byte*)"gIFg", data, 4);
+ png_write_chunk(png_ptr, const_cast<png_bytep>((const png_byte *)"gIFg"), data, 4);
}
int height = image.height();
@@ -955,13 +959,14 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, vo
case QImage::Format_Mono:
case QImage::Format_MonoLSB:
case QImage::Format_Indexed8:
+ case QImage::Format_Grayscale8:
case QImage::Format_RGB32:
case QImage::Format_ARGB32:
case QImage::Format_RGB888:
{
png_bytep* row_pointers = new png_bytep[height];
for (int y=0; y<height; y++)
- row_pointers[y] = (png_bytep)image.constScanLine(y);
+ row_pointers[y] = const_cast<png_bytep>(image.constScanLine(y));
png_write_image(png_ptr, row_pointers);
delete [] row_pointers;
}
@@ -973,7 +978,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, vo
png_bytep row_pointers[1];
for (int y=0; y<height; y++) {
row = image.copy(0, y, width, 1).convertToFormat(fmt);
- row_pointers[0] = png_bytep(row.constScanLine(0));
+ row_pointers[0] = const_cast<png_bytep>(row.constScanLine(0));
png_write_rows(png_ptr, row_pointers, 1);
}
}
diff --git a/src/gui/image/qpnghandler_p.h b/src/gui/image/qpnghandler_p.h
index 83e37eecaf..4261387f4b 100644
--- a/src/gui/image/qpnghandler_p.h
+++ b/src/gui/image/qpnghandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index 314abca9f0..0f4256b740 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -122,7 +122,7 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
case '2': // ascii PGM
case '5': // raw PGM
nbits = 8;
- format = QImage::Format_Indexed8;
+ format = QImage::Format_Grayscale8;
break;
case '3': // ascii PPM
case '6': // raw PPM
@@ -200,13 +200,13 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
*p++ = b;
}
} else if (nbits == 8) {
- if (mcc == maxc) {
+ if (mcc == 255) {
while (n--) {
*p++ = read_pbm_int(device);
}
} else {
while (n--) {
- *p++ = read_pbm_int(device) * maxc / mcc;
+ *p++ = read_pbm_int(device) * 255 / mcc;
}
}
} else { // 32 bits
@@ -233,14 +233,10 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
}
}
- if (nbits == 1) { // bitmap
+ if (format == QImage::Format_Mono) {
outImage->setColorCount(2);
- outImage->setColor(0, qRgb(255,255,255)); // white
- outImage->setColor(1, qRgb(0,0,0)); // black
- } else if (nbits == 8) { // graymap
- outImage->setColorCount(maxc+1);
- for (int i=0; i<=maxc; i++)
- outImage->setColor(i, qRgb(i*255/maxc,i*255/maxc,i*255/maxc));
+ outImage->setColor(0, qRgb(255,255,255)); // white
+ outImage->setColor(1, qRgb(0,0,0)); // black
}
return true;
@@ -257,6 +253,8 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
if (format == "pbm") {
image = image.convertToFormat(QImage::Format_Mono);
+ } else if (gray) {
+ image = image.convertToFormat(QImage::Format_Grayscale8);
} else {
switch (image.format()) {
case QImage::Format_Mono:
@@ -317,63 +315,77 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
str.append("255\n");
if (out->write(str, str.length()) != str.length())
return false;
- QVector<QRgb> color = image.colorTable();
- uint bpl = w*(gray ? 1 : 3);
- uchar *buf = new uchar[bpl];
- for (uint y=0; y<h; y++) {
- uchar *b = image.scanLine(y);
- uchar *p = buf;
- uchar *end = buf+bpl;
- if (gray) {
- while (p < end) {
- uchar g = (uchar)qGray(color[*b++]);
- *p++ = g;
+ uint bpl = w * (gray ? 1 : 3);
+ uchar *buf = new uchar[bpl];
+ if (image.format() == QImage::Format_Indexed8) {
+ QVector<QRgb> color = image.colorTable();
+ for (uint y=0; y<h; y++) {
+ uchar *b = image.scanLine(y);
+ uchar *p = buf;
+ uchar *end = buf+bpl;
+ if (gray) {
+ while (p < end) {
+ uchar g = (uchar)qGray(color[*b++]);
+ *p++ = g;
+ }
+ } else {
+ while (p < end) {
+ QRgb rgb = color[*b++];
+ *p++ = qRed(rgb);
+ *p++ = qGreen(rgb);
+ *p++ = qBlue(rgb);
+ }
}
- } else {
- while (p < end) {
- QRgb rgb = color[*b++];
- *p++ = qRed(rgb);
- *p++ = qGreen(rgb);
- *p++ = qBlue(rgb);
+ if (bpl != (uint)out->write((char*)buf, bpl))
+ return false;
+ }
+ } else {
+ for (uint y=0; y<h; y++) {
+ uchar *b = image.scanLine(y);
+ uchar *p = buf;
+ uchar *end = buf + bpl;
+ if (gray) {
+ while (p < end)
+ *p++ = *b++;
+ } else {
+ while (p < end) {
+ uchar color = *b++;
+ *p++ = color;
+ *p++ = color;
+ *p++ = color;
+ }
}
+ if (bpl != (uint)out->write((char*)buf, bpl))
+ return false;
}
- if (bpl != (uint)out->write((char*)buf, bpl))
- return false;
}
delete [] buf;
- }
break;
+ }
case 32: {
- str.insert(1, gray ? '5' : '6');
+ str.insert(1, '6');
str.append("255\n");
if (out->write(str, str.length()) != str.length())
return false;
- uint bpl = w*(gray ? 1 : 3);
+ uint bpl = w * 3;
uchar *buf = new uchar[bpl];
for (uint y=0; y<h; y++) {
QRgb *b = (QRgb*)image.scanLine(y);
uchar *p = buf;
uchar *end = buf+bpl;
- if (gray) {
- while (p < end) {
- uchar g = (uchar)qGray(*b++);
- *p++ = g;
- }
- } else {
- while (p < end) {
- QRgb rgb = *b++;
- *p++ = qRed(rgb);
- *p++ = qGreen(rgb);
- *p++ = qBlue(rgb);
- }
+ while (p < end) {
+ QRgb rgb = *b++;
+ *p++ = qRed(rgb);
+ *p++ = qGreen(rgb);
+ *p++ = qBlue(rgb);
}
if (bpl != (uint)out->write((char*)buf, bpl))
return false;
}
delete [] buf;
- }
break;
+ }
default:
return false;
@@ -488,11 +500,11 @@ QVariant QPpmHandler::option(ImageOption option) const
switch (type) {
case '1': // ascii PBM
case '4': // raw PBM
- format = QImage::Format_Mono;
- break;
+ format = QImage::Format_Mono;
+ break;
case '2': // ascii PGM
case '5': // raw PGM
- format = QImage::Format_Indexed8;
+ format = QImage::Format_Grayscale8;
break;
case '3': // ascii PPM
case '6': // raw PPM
diff --git a/src/gui/image/qppmhandler_p.h b/src/gui/image/qppmhandler_p.h
index 08a7a9d0be..31ca0a80d3 100644
--- a/src/gui/image/qppmhandler_p.h
+++ b/src/gui/image/qppmhandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 33e554d438..81525d9dd6 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qxbmhandler_p.h b/src/gui/image/qxbmhandler_p.h
index a8db926415..ba3222c406 100644
--- a/src/gui/image/qxbmhandler_p.h
+++ b/src/gui/image/qxbmhandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index d9adcb5901..e9ac4a9cc2 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1129,14 +1129,14 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
while (c != colorMap.end()) {
QRgb color = c.key();
if (image.format() != QImage::Format_RGB32 && !qAlpha(color))
- line.sprintf("\"%s c None\"",
- xpm_color_name(cpp, *c));
+ line = QString::asprintf("\"%s c None\"",
+ xpm_color_name(cpp, *c));
else
- line.sprintf("\"%s c #%02x%02x%02x\"",
- xpm_color_name(cpp, *c),
- qRed(color),
- qGreen(color),
- qBlue(color));
+ line = QString::asprintf("\"%s c #%02x%02x%02x\"",
+ xpm_color_name(cpp, *c),
+ qRed(color),
+ qGreen(color),
+ qBlue(color));
++c;
s << ',' << endl << line;
}
diff --git a/src/gui/image/qxpmhandler_p.h b/src/gui/image/qxpmhandler_p.h
index 2ba6922ff9..b58ae60fd0 100644
--- a/src/gui/image/qxpmhandler_p.h
+++ b/src/gui/image/qxpmhandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index eae2b419e3..ed2479302e 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -2909,12 +2909,6 @@ void QStandardItemModel::sort(int column, Qt::SortOrder order)
}
/*!
- \fn QObject *QStandardItemModel::parent() const
- \internal
-*/
-
-
-/*!
\reimp
*/
QStringList QStandardItemModel::mimeTypes() const
diff --git a/src/gui/itemmodels/qstandarditemmodel.h b/src/gui/itemmodels/qstandarditemmodel.h
index 8a71182bd6..3dd613f907 100644
--- a/src/gui/itemmodels/qstandarditemmodel.h
+++ b/src/gui/itemmodels/qstandarditemmodel.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -316,43 +316,39 @@ public:
void setItemRoleNames(const QHash<int,QByteArray> &roleNames);
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
- QModelIndex parent(const QModelIndex &child) const;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
- bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ bool hasChildren(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
// Qt 6: Remove
- QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const Q_DECL_OVERRIDE;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation,
- int role = Qt::DisplayRole) const;
+ int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value,
- int role = Qt::EditRole);
+ int role = Qt::EditRole) Q_DECL_OVERRIDE;
- bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
- bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex());
- bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
- bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex());
+ bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
+ bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const;
- Qt::DropActions supportedDropActions() const;
+ Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
- QMap<int, QVariant> itemData(const QModelIndex &index) const;
- bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
+ QMap<int, QVariant> itemData(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) Q_DECL_OVERRIDE;
void clear();
-#ifdef Q_NO_USING_KEYWORD
- inline QObject *parent() const { return QObject::parent(); }
-#else
using QObject::parent;
-#endif
- void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) Q_DECL_OVERRIDE;
QStandardItem *itemFromIndex(const QModelIndex &index) const;
QModelIndex indexFromItem(const QStandardItem *item) const;
@@ -401,9 +397,9 @@ public:
int sortRole() const;
void setSortRole(int role);
- QStringList mimeTypes() const;
- QMimeData *mimeData(const QModelIndexList &indexes) const;
- bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
+ QStringList mimeTypes() const Q_DECL_OVERRIDE;
+ QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
+ bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
Q_SIGNALS:
void itemChanged(QStandardItem *item);
diff --git a/src/gui/itemmodels/qstandarditemmodel_p.h b/src/gui/itemmodels/qstandarditemmodel_p.h
index d95b6d1064..491a49f9c2 100644
--- a/src/gui/itemmodels/qstandarditemmodel_p.h
+++ b/src/gui/itemmodels/qstandarditemmodel_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 1169985ea8..af6a417608 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -71,7 +71,11 @@ HEADERS += \
kernel/qpixelformat.h \
kernel/qpaintdevicewindow.h \
kernel/qpaintdevicewindow_p.h \
- kernel/qrasterwindow.h
+ kernel/qrasterwindow.h \
+ kernel/qplatformgraphicsbuffer.h \
+ kernel/qplatformgraphicsbufferhelper.h \
+ kernel/qinputdevicemanager_p.h \
+ kernel/qinputdevicemanager_p_p.h
SOURCES += \
kernel/qgenericpluginfactory.cpp \
@@ -124,7 +128,10 @@ SOURCES += \
kernel/qplatformmenu.cpp \
kernel/qpixelformat.cpp \
kernel/qpaintdevicewindow.cpp \
- kernel/qrasterwindow.cpp
+ kernel/qrasterwindow.cpp \
+ kernel/qplatformgraphicsbuffer.cpp \
+ kernel/qplatformgraphicsbufferhelper.cpp \
+ kernel/qinputdevicemanager.cpp
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
HEADERS += \
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 5be9f19b3e..35e74946ee 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qclipboard.h b/src/gui/kernel/qclipboard.h
index 3a5700518d..a285e188a6 100644
--- a/src/gui/kernel/qclipboard.h
+++ b/src/gui/kernel/qclipboard.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index 235d2b3053..6ed750eda1 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -33,8 +33,6 @@
#include "qcursor.h"
-#ifndef QT_NO_CURSOR
-
#include <qcoreapplication.h>
#include <qbitmap.h>
#include <qimage.h>
@@ -149,6 +147,16 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QCursor::QCursor(QCursor &&other)
+ \since 5.5
+
+ Move-constructs a cursor from \a other. After being moved from,
+ the only valid operations on \a other are destruction and
+ (move and copy) assignment. The effects of calling any other
+ member function on a moved-from instance are undefined.
+*/
+
+/*!
\fn QCursor &QCursor::operator=(QCursor &&other)
Move-assigns \a other to this QCursor instance.
@@ -249,6 +257,8 @@ void QCursor::setPos(int x, int y)
QCursor::setPos(QGuiApplication::primaryScreen(), x, y);
}
+#ifndef QT_NO_CURSOR
+
/*!
\fn void QCursor::setPos (const QPoint &p)
@@ -591,8 +601,9 @@ QCursor::operator QVariant() const
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QCursor &c)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QCursor(Qt::CursorShape(" << c.shape() << "))";
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 72c6a6504f..5f32192b8d 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -80,6 +80,7 @@ public:
~QCursor();
QCursor &operator=(const QCursor &cursor);
#ifdef Q_COMPILER_RVALUE_REFS
+ QCursor(QCursor &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Q_NULLPTR; }
inline QCursor &operator=(QCursor &&other)
{ qSwap(d, other.d); return *this; }
#endif
diff --git a/src/gui/kernel/qcursor_p.h b/src/gui/kernel/qcursor_p.h
index fe4c26b081..0aaa62b891 100644
--- a/src/gui/kernel/qcursor_p.h
+++ b/src/gui/kernel/qcursor_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp
index 2a6cc4fc99..3ce8ab95ec 100644
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index 573035ce24..537984f9df 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -70,8 +70,8 @@ public:
QInternalMimeData();
~QInternalMimeData();
- bool hasFormat(const QString &mimeType) const;
- QStringList formats() const;
+ bool hasFormat(const QString &mimeType) const Q_DECL_OVERRIDE;
+ QStringList formats() const Q_DECL_OVERRIDE;
static bool canReadData(const QString &mimeType);
@@ -80,7 +80,7 @@ public:
static QByteArray renderDataHelper(const QString &mimeType, const QMimeData *data);
protected:
- QVariant retrieveData(const QString &mimeType, QVariant::Type type) const;
+ QVariant retrieveData(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
virtual bool hasFormat_sys(const QString &mimeType) const = 0;
virtual QStringList formats_sys() const = 0;
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp
index 97913e0ddd..723b83d338 100644
--- a/src/gui/kernel/qdrag.cpp
+++ b/src/gui/kernel/qdrag.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qdrag.h b/src/gui/kernel/qdrag.h
index 57d2519464..0672cb00f9 100644
--- a/src/gui/kernel/qdrag.h
+++ b/src/gui/kernel/qdrag.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 60e7b97f12..ccd7c37486 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -575,7 +575,8 @@ QHoverEvent::~QHoverEvent()
wheel event delta: angleDelta() returns the delta in wheel
degrees. This value is always provided. pixelDelta() returns
the delta in screen pixels and is available on platforms that
- have high-resolution trackpads, such as Mac OS X.
+ have high-resolution trackpads, such as Mac OS X. If that is the
+ case, source() will return Qt::MouseEventSynthesizedBySystem.
The functions pos() and globalPos() return the mouse cursor's
location at the time of the event.
@@ -600,6 +601,22 @@ QHoverEvent::~QHoverEvent()
*/
/*!
+ \fn Qt::MouseEventSource QWheelEvent::source() const
+ \since 5.5
+
+ Returns information about the wheel event source.
+
+ The source can be used to distinguish between events that come from a mouse
+ with a physical wheel and events that are generated by some other means,
+ such as a flick gesture on a touchpad.
+
+ \note Many platforms provide no such information. On such platforms
+ \l Qt::MouseEventNotSynthesized is returned always.
+
+ \sa Qt::MouseEventSource
+*/
+
+/*!
\fn Qt::Orientation QWheelEvent::orientation() const
\obsolete
@@ -731,7 +748,44 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation,
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase)
: QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta),
- angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(phase)
+ angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(phase),
+ src(Qt::MouseEventNotSynthesized)
+{}
+
+/*!
+ Constructs a wheel event object.
+
+ The \a pos provides the location of the mouse cursor
+ within the window. The position in global coordinates is specified
+ by \a globalPos.
+
+ \a pixelDelta contains the scrolling distance in pixels on screen, while
+ \a angleDelta contains the wheel rotation distance. \a pixelDelta is
+ optional and can be null.
+
+ The mouse and keyboard states at the time of the event are specified by
+ \a buttons and \a modifiers.
+
+ For backwards compatibility, the event can also hold monodirectional wheel
+ event data: \a qt4Delta specifies the rotation, and \a qt4Orientation the
+ direction.
+
+ The scrolling phase of the event is specified by \a phase.
+
+ If the wheel event comes from a physical mouse wheel, \a source is set to
+ Qt::MouseEventNotSynthesized. If it comes from a gesture detected by the
+ operating system, or from a non-mouse hardware device, such that \a pixelDelta is
+ directly related to finger movement, \a source is set to Qt::MouseEventSynthesizedBySystem.
+ If it comes from Qt, source would be set to Qt::MouseEventSynthesizedByQt.
+
+ \sa posF(), globalPosF(), angleDelta(), pixelDelta(), phase()
+*/
+
+QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
+ QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation,
+ Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source)
+ : QInputEvent(Wheel, modifiers), p(pos), g(globalPos), pixelD(pixelDelta),
+ angleD(angleDelta), qt4D(qt4Delta), qt4O(qt4Orientation), mouseState(buttons), ph(phase), src(source)
{}
#endif // QT_NO_WHEELEVENT
@@ -1324,6 +1378,55 @@ QExposeEvent::~QExposeEvent()
}
/*!
+ \class QPlatformSurfaceEvent
+ \since 5.5
+ \brief The QPlatformSurfaceEvent class is used to notify about native platform surface events.
+ \inmodule QtGui
+
+ \ingroup events
+
+ Platform window events are synchronously sent to windows and offscreen surfaces when their
+ underlying native surfaces are created or are about to be destroyed.
+
+ Applications can respond to these events to know when the underlying platform
+ surface exists.
+*/
+
+/*!
+ \enum QPlatformSurfaceEvent::SurfaceEventType
+
+ This enum describes the type of platform surface event. The possible types are:
+
+ \value SurfaceCreated The underlying native surface has been created
+ \value SurfaceAboutToBeDestroyed The underlying native surface will be destroyed immediately after this event
+
+ The \c SurfaceAboutToBeDestroyed event type is useful as a means of stopping rendering to
+ a platform window before it is destroyed.
+*/
+
+/*!
+ \fn QPlatformSurfaceEvent::SurfaceEventType QPlatformSurfaceEvent::surfaceEventType() const
+
+ Returns the specific type of platform surface event.
+*/
+
+/*!
+ Constructs a platform surface event for the given \a surfaceEventType.
+*/
+QPlatformSurfaceEvent::QPlatformSurfaceEvent(SurfaceEventType surfaceEventType)
+ : QEvent(PlatformSurface)
+ , m_surfaceEventType(surfaceEventType)
+{
+}
+
+/*!
+ \internal
+*/
+QPlatformSurfaceEvent::~QPlatformSurfaceEvent()
+{
+}
+
+/*!
\fn const QRegion &QExposeEvent::region() const
Returns the window area that has been exposed. The region is given in local coordinates.
@@ -3358,29 +3461,9 @@ QShortcutEvent::~QShortcutEvent()
#ifndef QT_NO_DEBUG_STREAM
-static inline void formatTouchPoint(QDebug d, const QTouchEvent::TouchPoint &tp)
-{
- d << "TouchPoint(" << tp.id() << ' ' << tp.rect();
- switch (tp.state()) {
- case Qt::TouchPointPressed:
- d << " pressed";
- break;
- case Qt::TouchPointReleased:
- d << " released";
- break;
- case Qt::TouchPointMoved:
- d << " moved";
- break;
- case Qt::TouchPointStationary:
- d << " stationary";
- break;
- }
- d << ')';
-}
-
-static inline void formatTouchEvent(QDebug d, const char *name, const QTouchEvent &t)
+static inline void formatTouchEvent(QDebug d, const QTouchEvent &t)
{
- d << "QTouchEvent(" << name << " states: " << t.touchPointStates();
+ d << "QTouchEvent(" << t.type() << " states: " << t.touchPointStates();
d << ", " << t.touchPoints().size() << " points: " << t.touchPoints() << ')';
}
@@ -3439,14 +3522,6 @@ static inline void formatInputMethodQueryEvent(QDebug d, const QInputMethodQuery
d << "})";
}
-static const char *eventTypeName(QEvent::Type t)
-{
- static const int enumIdx = QEvent::staticMetaObject.indexOfEnumerator("Type");
- return t <= QEvent::User
- ? QEvent::staticMetaObject.enumerator(enumIdx).valueToKey(t)
- : "User";
-}
-
static const char *eventClassName(QEvent::Type t)
{
switch (t) {
@@ -3556,60 +3631,14 @@ static const char *eventClassName(QEvent::Type t)
return "QGraphicsSceneEvent";
case QEvent::Timer:
return "QTimerEvent";
+ case QEvent::PlatformSurface:
+ return "QPlatformSurfaceEvent";
default:
break;
}
return "QEvent";
}
-namespace {
-// Make protected QObject::staticQtMetaObject accessible for formatting enums.
-class DebugHelper : public QObject {
-public:
- static const char *mouseButtonToString(Qt::MouseButton button)
- {
- static const int enumIdx = QObject::staticQtMetaObject.indexOfEnumerator("MouseButtons");
- return QObject::staticQtMetaObject.enumerator(enumIdx).valueToKey(button);
- }
-
- static QByteArray mouseButtonsToString(Qt::MouseButtons buttons)
- {
- QByteArray result;
- for (int i = 0; (uint)(1 << i) <= Qt::MaxMouseButton; ++i) {
- const Qt::MouseButton button = static_cast<Qt::MouseButton>(1 << i);
- if (buttons.testFlag(button)) {
- if (!result.isEmpty())
- result.append('|');
- result.append(mouseButtonToString(button));
- }
- }
- if (result.isEmpty())
- result.append("NoButton");
- return result;
- }
-
- static const char *mouseEventSourceToString(Qt::MouseEventSource source)
- {
- static const int enumIdx = QObject::staticQtMetaObject.indexOfEnumerator("MouseEventSource");
- return QObject::staticQtMetaObject.enumerator(enumIdx).valueToKey(source);
- }
-
- static const char *focusReasonToString(Qt::FocusReason reason)
- {
- static const int enumIdx = QObject::staticQtMetaObject.indexOfEnumerator("FocusReason");
- return QObject::staticQtMetaObject.enumerator(enumIdx).valueToKey(reason);
- }
-
-# ifndef QT_NO_GESTURES
- static const char *nativeGestureTypeToString(Qt::NativeGestureType type)
- {
- static const int enumIdx = QObject::staticQtMetaObject.indexOfEnumerator("NativeGestureType");
- return QObject::staticQtMetaObject.enumerator(enumIdx).valueToKey(type);
- }
-# endif // !QT_NO_GESTURES
-};
-} // namespace
-
# ifndef QT_NO_DRAGANDDROP
static void formatDropEvent(QDebug d, const QDropEvent *e)
@@ -3623,7 +3652,7 @@ static void formatDropEvent(QDebug d, const QDropEvent *e)
d << ", formats=" << e->mimeData()->formats();
if (const Qt::KeyboardModifiers mods = e->keyboardModifiers())
d << ", keyboardModifiers=" << mods;
- d << ", " << DebugHelper::mouseButtonsToString(e->mouseButtons()).constData();
+ d << ", " << e->mouseButtons();
}
# endif // !QT_NO_DRAGANDDROP
@@ -3634,20 +3663,15 @@ static void formatTabletEvent(QDebug d, const QTabletEvent *e)
{
const QEvent::Type type = e->type();
- static const int deviceEnumIdx = QTabletEvent::staticMetaObject.indexOfEnumerator("TabletDevice");
- static const int pointerTypeEnumIdx = QTabletEvent::staticMetaObject.indexOfEnumerator("PointerType");
- const char* device = QTabletEvent::staticMetaObject.enumerator(deviceEnumIdx).valueToKey(e->device());
- const char* pointerType = QTabletEvent::staticMetaObject.enumerator(pointerTypeEnumIdx).valueToKey(e->pointerType());
-
- d << eventClassName(type) << '(' << eventTypeName(type)
- << ", device=" << device
- << ", pointerType=" << pointerType
+ d << eventClassName(type) << '(' << type
+ << ", device=" << e->device()
+ << ", pointerType=" << e->pointerType()
<< ", uniqueId=" << e->uniqueId()
<< ", pos=" << e->posF()
<< ", z=" << e->z()
<< ", xTilt=" << e->xTilt()
<< ", yTilt=" << e->yTilt()
- << ", " << DebugHelper::mouseButtonsToString(e->buttons()).constData();
+ << ", " << e->buttons();
if (type == QEvent::TabletPress || type == QEvent::TabletMove)
d << ", pressure=" << e->pressure();
if (e->device() == QTabletEvent::RotationStylus || e->device() == QTabletEvent::FourDMouse)
@@ -3661,8 +3685,8 @@ static void formatTabletEvent(QDebug d, const QTabletEvent *e)
QDebug operator<<(QDebug dbg, const QTouchEvent::TouchPoint &tp)
{
QDebugStateSaver saver(dbg);
- dbg.nospace();
- formatTouchPoint(dbg, tp);
+ dbg.nospace() << "TouchPoint(" << tp.id() << ' ' << tp.rect() << ' ' << tp.state() << " press " << tp.pressure()
+ << " vel " << tp.velocity() << " start " << tp.startPos() << " last " << tp.lastPos() << " delta " << tp.pos() - tp.lastPos() << ')';
return dbg;
}
@@ -3692,16 +3716,16 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
const QMouseEvent *me = static_cast<const QMouseEvent*>(e);
const Qt::MouseButton button = me->button();
const Qt::MouseButtons buttons = me->buttons();
- dbg << "QMouseEvent(" << eventTypeName(type);
+ dbg << "QMouseEvent(" << type;
if (type != QEvent::MouseMove && type != QEvent::NonClientAreaMouseMove)
- dbg << ", " << DebugHelper::mouseButtonToString(button);
+ dbg << ", " << button;
if (buttons && button != buttons)
- dbg << ", buttons=" << DebugHelper::mouseButtonsToString(buttons).constData();
- if (const int mods = int(me->modifiers()))
- dbg << ", modifiers=0x" << hex << mods << dec;
+ dbg << ", buttons=" << buttons;
+ if (me->modifiers())
+ dbg << ", " << me->modifiers();
dbg << ", localPos=" << me->localPos() << ", screenPos=" << me->screenPos();
if (me->source())
- dbg << ", " << DebugHelper::mouseEventSourceToString(me->source());
+ dbg << ", " << me->source();
if (const Qt::MouseEventFlags flags = me->flags())
dbg << ", flags = " << hex << int(flags) << dec;
dbg << ')';
@@ -3719,10 +3743,10 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
case QEvent::ShortcutOverride:
{
const QKeyEvent *ke = static_cast<const QKeyEvent *>(e);
- dbg << "QKeyEvent(" << eventTypeName(type)
- << ", key=0x" << hex << ke->key() << dec;
- if (const int mods = ke->modifiers())
- dbg << ", modifiers=0x" << hex << mods << dec;
+ dbg << "QKeyEvent(" << type
+ << ", " << static_cast<Qt::Key>(ke->key());
+ if (ke->modifiers())
+ dbg << ", " << ke->modifiers();
if (!ke->text().isEmpty())
dbg << ", text=" << ke->text();
if (ke->isAutoRepeat())
@@ -3741,9 +3765,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
case QEvent::FocusAboutToChange:
case QEvent::FocusIn:
case QEvent::FocusOut:
- dbg << "QFocusEvent(" << eventTypeName(type) << ", "
- << DebugHelper::focusReasonToString(static_cast<const QFocusEvent *>(e)->reason())
- << ')';
+ dbg << "QFocusEvent(" << type << ", " << static_cast<const QFocusEvent *>(e)->reason() << ')';
break;
case QEvent::Move: {
const QMoveEvent *me = static_cast<const QMoveEvent *>(e);
@@ -3777,17 +3799,17 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
- formatTouchEvent(dbg, eventTypeName(type), *static_cast<const QTouchEvent*>(e));
+ formatTouchEvent(dbg, *static_cast<const QTouchEvent*>(e));
break;
case QEvent::ChildAdded:
case QEvent::ChildPolished:
case QEvent::ChildRemoved:
- dbg << "QChildEvent(" << eventTypeName(type) << ", " << (static_cast<const QChildEvent*>(e))->child() << ')';
+ dbg << "QChildEvent(" << type << ", " << (static_cast<const QChildEvent*>(e))->child() << ')';
break;
# ifndef QT_NO_GESTURES
case QEvent::NativeGesture: {
const QNativeGestureEvent *ne = static_cast<const QNativeGestureEvent *>(e);
- dbg << "QNativeGestureEvent(" << DebugHelper::nativeGestureTypeToString(ne->gestureType())
+ dbg << "QNativeGestureEvent(" << ne->gestureType()
<< "localPos=" << ne->localPos() << ", value=" << ne->value() << ')';
}
break;
@@ -3814,8 +3836,20 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
case QEvent::Timer:
dbg << "QTimerEvent(id=" << static_cast<const QTimerEvent *>(e)->timerId() << ')';
break;
+ case QEvent::PlatformSurface:
+ dbg << "QPlatformSurfaceEvent(surfaceEventType=";
+ switch (static_cast<const QPlatformSurfaceEvent *>(e)->surfaceEventType()) {
+ case QPlatformSurfaceEvent::SurfaceCreated:
+ dbg << "SurfaceCreated";
+ break;
+ case QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed:
+ dbg << "SurfaceAboutToBeDestroyed";
+ break;
+ }
+ dbg << ')';
+ break;
default:
- dbg << eventClassName(type) << '(' << eventTypeName(type) << ", "
+ dbg << eventClassName(type) << '(' << type << ", "
<< (const void *)e << ", type = " << e->type() << ')';
break;
}
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 6fca54e2b6..e931e28a2e 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -162,6 +162,8 @@ protected:
class Q_GUI_EXPORT QWheelEvent : public QInputEvent
{
public:
+ enum { DefaultDeltasPerStep = 120 };
+
QWheelEvent(const QPointF &pos, int delta,
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers,
Qt::Orientation orient = Qt::Vertical);
@@ -174,7 +176,9 @@ public:
QWheelEvent(const QPointF &pos, const QPointF& globalPos,
QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation,
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase);
-
+ QWheelEvent(const QPointF &pos, const QPointF &globalPos, QPoint pixelDelta, QPoint angleDelta,
+ int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons,
+ Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source);
~QWheelEvent();
@@ -199,6 +203,8 @@ public:
inline Qt::ScrollPhase phase() const { return Qt::ScrollPhase(ph); }
+ Qt::MouseEventSource source() const { return Qt::MouseEventSource(src); }
+
protected:
QPointF p;
QPointF g;
@@ -208,7 +214,8 @@ protected:
Qt::Orientation qt4O;
Qt::MouseButtons mouseState;
uint ph : 2;
- int reserved : 30;
+ uint src: 2;
+ int reserved : 28;
};
#endif
@@ -216,12 +223,12 @@ protected:
class Q_GUI_EXPORT QTabletEvent : public QInputEvent
{
Q_GADGET
- Q_ENUMS(TabletDevice)
- Q_ENUMS(PointerType)
public:
enum TabletDevice { NoDevice, Puck, Stylus, Airbrush, FourDMouse,
XFreeEraser /*internal*/, RotationStylus };
+ Q_ENUM(TabletDevice)
enum PointerType { UnknownPointer, Pen, Cursor, Eraser };
+ Q_ENUM(PointerType)
QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
int device, int pointerType, qreal pressure, int xTilt, int yTilt,
qreal tangentialPressure, qreal rotation, int z,
@@ -408,6 +415,23 @@ protected:
QRegion rgn;
};
+class Q_GUI_EXPORT QPlatformSurfaceEvent : public QEvent
+{
+public:
+ enum SurfaceEventType {
+ SurfaceCreated,
+ SurfaceAboutToBeDestroyed
+ };
+
+ explicit QPlatformSurfaceEvent(SurfaceEventType surfaceEventType);
+ ~QPlatformSurfaceEvent();
+
+ inline SurfaceEventType surfaceEventType() const { return m_surfaceEventType; }
+
+protected:
+ SurfaceEventType m_surfaceEventType;
+};
+
class Q_GUI_EXPORT QResizeEvent : public QEvent
{
public:
diff --git a/src/gui/kernel/qevent_p.h b/src/gui/kernel/qevent_p.h
index 01c5be3b82..685b948e12 100644
--- a/src/gui/kernel/qevent_p.h
+++ b/src/gui/kernel/qevent_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qgenericplugin.cpp b/src/gui/kernel/qgenericplugin.cpp
index db1984c3a2..47f3ea5811 100644
--- a/src/gui/kernel/qgenericplugin.cpp
+++ b/src/gui/kernel/qgenericplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qgenericplugin.h b/src/gui/kernel/qgenericplugin.h
index bcf6943a90..cfab34d081 100644
--- a/src/gui/kernel/qgenericplugin.h
+++ b/src/gui/kernel/qgenericplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qgenericpluginfactory.cpp b/src/gui/kernel/qgenericpluginfactory.cpp
index 599f7f345a..7e4727df8c 100644
--- a/src/gui/kernel/qgenericpluginfactory.cpp
+++ b/src/gui/kernel/qgenericpluginfactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qgenericpluginfactory.h b/src/gui/kernel/qgenericpluginfactory.h
index c2faa881f7..f5bfe22042 100644
--- a/src/gui/kernel/qgenericpluginfactory.h
+++ b/src/gui/kernel/qgenericpluginfactory.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index a3ac0ff189..9f73f019a3 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -75,6 +75,7 @@
#include "private/qwindow_p.h"
#include "private/qcursor_p.h"
#include "private/qopenglcontext_p.h"
+#include "private/qinputdevicemanager_p.h"
#include "private/qdnd_p.h"
#include <qpa/qplatformthemefactory_p.h>
@@ -104,6 +105,14 @@
QT_BEGIN_NAMESPACE
+// Helper macro for static functions to check on the existence of the application class.
+#define CHECK_QAPP_INSTANCE(...) \
+ if (Q_LIKELY(QCoreApplication::instance())) { \
+ } else { \
+ qWarning("Must construct a QGuiApplication first."); \
+ return __VA_ARGS__; \
+ }
+
Q_GUI_EXPORT bool qt_is_gui_used = true;
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
@@ -138,12 +147,15 @@ QString *QGuiApplicationPrivate::displayName = 0;
QPalette *QGuiApplicationPrivate::app_pal = 0; // default application palette
Qt::MouseButtons QGuiApplicationPrivate::buttons = Qt::NoButton;
+
ulong QGuiApplicationPrivate::mousePressTime = 0;
Qt::MouseButton QGuiApplicationPrivate::mousePressButton = Qt::NoButton;
int QGuiApplicationPrivate::mousePressX = 0;
int QGuiApplicationPrivate::mousePressY = 0;
int QGuiApplicationPrivate::mouse_double_click_distance = -1;
+QWindow *QGuiApplicationPrivate::currentMousePressWindow = 0;
+
static Qt::LayoutDirection layout_direction = Qt::LeftToRight;
static bool force_reverse = false;
@@ -162,8 +174,11 @@ QWindow *QGuiApplicationPrivate::focus_window = 0;
static QBasicMutex applicationFontMutex;
QFont *QGuiApplicationPrivate::app_font = 0;
+QStyleHints *QGuiApplicationPrivate::styleHints = Q_NULLPTR;
bool QGuiApplicationPrivate::obey_desktop_settings = true;
+QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0;
+
static qreal fontSmoothingGamma = 1.7;
extern void qRegisterGuiVariant();
@@ -176,7 +191,7 @@ extern void qInitImageConversions();
static bool qt_detectRTLLanguage()
{
return force_reverse ^
- (QCoreApplication::tr("QT_LAYOUT_DIRECTION",
+ (QGuiApplication::tr("QT_LAYOUT_DIRECTION",
"Translate this string to the string 'LTR' in left-to-right"
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
@@ -215,11 +230,6 @@ static inline void clearFontUnlocked()
QGuiApplicationPrivate::app_font = 0;
}
-static inline bool isPopupWindow(const QWindow *w)
-{
- return (w->flags() & Qt::WindowType_Mask) == Qt::Popup;
-}
-
// Geometry specification for top level windows following the convention of the
// -geometry command line arguments in X11 (see XParseGeometry).
struct QWindowGeometrySpecification
@@ -597,7 +607,6 @@ QGuiApplication::~QGuiApplication()
QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags)
: QCoreApplicationPrivate(argc, argv, flags),
- styleHints(0),
inputMethod(0),
lastTouchType(QEvent::TouchEnd),
ownGlobalShareContext(false)
@@ -650,6 +659,7 @@ QString QGuiApplication::applicationDisplayName()
*/
QWindow *QGuiApplication::modalWindow()
{
+ CHECK_QAPP_INSTANCE(Q_NULLPTR)
if (QGuiApplicationPrivate::self->modalWindowList.isEmpty())
return 0;
return QGuiApplicationPrivate::self->modalWindowList.first();
@@ -671,7 +681,7 @@ static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
void QGuiApplicationPrivate::updateBlockedStatus(QWindow *window)
{
bool shouldBeBlocked = false;
- if (!isPopupWindow(window) && !self->modalWindowList.isEmpty())
+ if (!QWindowPrivate::get(window)->isPopup() && !self->modalWindowList.isEmpty())
shouldBeBlocked = self->isWindowBlocked(window);
updateBlockedStatusRecursion(window, shouldBeBlocked);
}
@@ -681,7 +691,7 @@ void QGuiApplicationPrivate::showModalWindow(QWindow *modal)
self->modalWindowList.prepend(modal);
// Send leave for currently entered window if it should be blocked
- if (currentMouseWindow && !isPopupWindow(currentMouseWindow)) {
+ if (currentMouseWindow && !QWindowPrivate::get(currentMouseWindow)->isPopup()) {
bool shouldBeBlocked = self->isWindowBlocked(currentMouseWindow);
if (shouldBeBlocked) {
// Remove the new window from modalWindowList temporarily so leave can go through
@@ -790,12 +800,6 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
return false;
}
-bool QGuiApplicationPrivate::synthesizeMouseFromTouchEventsEnabled()
-{
- return QCoreApplication::testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)
- && QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::SynthesizeMouseFromTouchEvents).toBool();
-}
-
/*!
Returns the QWindow that receives events tied to focus,
such as key events.
@@ -872,9 +876,14 @@ QWindowList QGuiApplication::topLevelWindows()
}
/*!
- Returns the primary (or default) screen of the application.
+ Returns the primary (or default) screen of the application, or null if there is none
This will be the screen where QWindows are initially shown, unless otherwise specified.
+
+ On some platforms, it may be null when there are actually no screens connected.
+ It is not possible to start a new QGuiApplication while there are no screens.
+ Applications which were running at the time the primary screen was removed
+ will stop rendering graphics until one or more screens are restored.
*/
QScreen *QGuiApplication::primaryScreen()
{
@@ -1094,6 +1103,8 @@ static void init_plugins(const QList<QByteArray> &pluginList)
QLatin1String(pluginSpec.mid(colonPos+1)));
if (plugin)
QGuiApplicationPrivate::generic_plugin_list.append(plugin);
+ else
+ qWarning() << "No such plugin for spec " << pluginSpec;
}
}
@@ -1259,8 +1270,11 @@ void QGuiApplicationPrivate::init()
}
// Load environment exported generic plugins
- foreach (const QByteArray &plugin, qgetenv("QT_QPA_GENERIC_PLUGINS").split(','))
- pluginList << plugin;
+ QByteArray envPlugins = qgetenv("QT_QPA_GENERIC_PLUGINS");
+ if (!envPlugins.isEmpty()) {
+ foreach (const QByteArray &plugin, envPlugins.split(','))
+ pluginList << plugin;
+ }
if (platform_integration == 0)
createPlatformIntegration();
@@ -1352,7 +1366,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
cleanupThreadData();
- delete styleHints;
+ delete QGuiApplicationPrivate::styleHints;
+ QGuiApplicationPrivate::styleHints = Q_NULLPTR;
delete inputMethod;
qt_cleanupFontDatabase();
@@ -1366,6 +1381,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
}
#endif
+ platform_integration->destroy();
+
delete platform_theme;
platform_theme = 0;
delete platform_integration;
@@ -1430,6 +1447,7 @@ Qt::KeyboardModifiers QGuiApplication::keyboardModifiers()
*/
Qt::KeyboardModifiers QGuiApplication::queryKeyboardModifiers()
{
+ CHECK_QAPP_INSTANCE(Qt::KeyboardModifiers(0))
QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration();
return pi->queryKeyboardModifiers();
}
@@ -1511,18 +1529,6 @@ int QGuiApplication::exec()
*/
bool QGuiApplication::notify(QObject *object, QEvent *event)
{
-#ifndef QT_NO_SHORTCUT
- if (event->type() == QEvent::KeyPress) {
- // Try looking for a Shortcut before sending key events
- QWindow *w = qobject_cast<QWindow *>(object);
- QObject *focus = w ? w->focusObject() : 0;
- if (!focus)
- focus = object;
- if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, static_cast<QKeyEvent *>(event)))
- return true;
- }
-#endif
-
if (object->isWindowType())
QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(static_cast<QWindow *>(object), event);
return QCoreApplication::notify(object, event);
@@ -1685,7 +1691,8 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
// with the current event, we split it in two.
QWindowSystemInterfacePrivate::MouseEvent *mouseButtonEvent = new QWindowSystemInterfacePrivate::MouseEvent(
e->window.data(), e->timestamp, e->type, e->localPos, e->globalPos, e->buttons, e->modifiers);
- mouseButtonEvent->synthetic = e->synthetic;
+ if (e->flags & QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic)
+ mouseButtonEvent->flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
QWindowSystemInterfacePrivate::windowSystemEventQueue.prepend(mouseButtonEvent);
stateChange = Qt::NoButton;
}
@@ -1696,9 +1703,20 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
QPointF localPoint = e->localPos;
QPointF globalPoint = e->globalPos;
- if (e->nullWindow) {
+ if (e->nullWindow()) {
window = QGuiApplication::topLevelAt(globalPoint.toPoint());
if (window) {
+ // Moves and the release following a press must go to the same
+ // window, even if the cursor has moved on over another window.
+ if (e->buttons != Qt::NoButton) {
+ if (!currentMousePressWindow)
+ currentMousePressWindow = window;
+ else
+ window = currentMousePressWindow;
+ } else if (currentMousePressWindow) {
+ window = currentMousePressWindow;
+ currentMousePressWindow = 0;
+ }
QPointF delta = globalPoint - globalPoint.toPoint();
localPoint = window->mapFromGlobal(globalPoint.toPoint()) + delta;
}
@@ -1729,7 +1747,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
}
mouse_buttons = buttons = e->buttons;
if (button & e->buttons) {
- ulong doubleClickInterval = static_cast<ulong>(qApp->styleHints()->mouseDoubleClickInterval());
+ ulong doubleClickInterval = static_cast<ulong>(QGuiApplication::styleHints()->mouseDoubleClickInterval());
doubleClick = e->timestamp - mousePressTime < doubleClickInterval && button == mousePressButton;
type = frameStrut ? QEvent::NonClientAreaMouseButtonPress : QEvent::MouseButtonPress;
mousePressTime = e->timestamp;
@@ -1749,7 +1767,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
ev.setTimestamp(e->timestamp);
setMouseEventSource(&ev, e->source);
#ifndef QT_NO_CURSOR
- if (!e->synthetic) {
+ if (!e->synthetic()) {
if (const QScreen *screen = window->screen())
if (QPlatformCursor *cursor = screen->handle()->cursor())
cursor->pointerEvent(ev);
@@ -1767,7 +1785,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
}
QGuiApplication::sendSpontaneousEvent(window, &ev);
- if (!e->synthetic && !ev.isAccepted()
+ if (!e->synthetic() && !ev.isAccepted()
&& !frameStrut
&& qApp->testAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents)) {
if (!m_fakeTouchDevice) {
@@ -1798,12 +1816,12 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::convertTouchPoints(points, &type);
QWindowSystemInterfacePrivate::TouchEvent fake(window, e->timestamp, type, m_fakeTouchDevice, touchPoints, e->modifiers);
- fake.synthetic = true;
+ fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
processTouchEvent(&fake);
}
if (doubleClick) {
mousePressButton = Qt::NoButton;
- if (!e->window.isNull() || e->nullWindow) { // QTBUG-36364, check if window closed in response to press
+ if (!e->window.isNull() || e->nullWindow()) { // QTBUG-36364, check if window closed in response to press
const QEvent::Type doubleClickType = frameStrut ? QEvent::NonClientAreaMouseButtonDblClick : QEvent::MouseButtonDblClick;
QMouseEvent dblClickEvent(doubleClickType, localPoint, localPoint, globalPoint,
button, buttons, e->modifiers);
@@ -1821,7 +1839,7 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
QPointF globalPoint = e->globalPos;
QPointF localPoint = e->localPos;
- if (e->nullWindow) {
+ if (e->nullWindow()) {
window = QGuiApplication::topLevelAt(globalPoint.toPoint());
if (window) {
QPointF delta = globalPoint - globalPoint.toPoint();
@@ -1840,7 +1858,7 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
return;
}
- QWheelEvent ev(localPoint, globalPoint, e->pixelDelta, e->angleDelta, e->qt4Delta, e->qt4Orientation, buttons, e->modifiers, e->phase);
+ QWheelEvent ev(localPoint, globalPoint, e->pixelDelta, e->angleDelta, e->qt4Delta, e->qt4Orientation, buttons, e->modifiers, e->phase, e->source);
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(window, &ev);
#endif /* ifndef QT_NO_WHEELEVENT */
@@ -1852,7 +1870,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
{
QWindow *window = e->window.data();
modifier_buttons = e->modifiers;
- if (e->nullWindow
+ if (e->nullWindow()
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
|| e->key == Qt::Key_Back || e->key == Qt::Key_Menu
#endif
@@ -1860,6 +1878,13 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
window = QGuiApplication::focusWindow();
}
+#if !defined(Q_OS_OSX)
+ // On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
+ const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0;
+ if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode))
+ return;
+#endif // Q_OS_OSX
+
QKeyEvent ev(e->keyType, e->key, e->modifiers,
e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers,
e->unicode, e->repeat, e->repeatCount);
@@ -2093,7 +2118,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
// subsequent events up to the release are delivered to that same window.
// If window is given, just send to that.
if (type == QEvent::TabletPress) {
- if (e->nullWindow) {
+ if (e->nullWindow()) {
window = QGuiApplication::topLevelAt(e->global.toPoint());
localValid = false;
}
@@ -2101,7 +2126,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
return;
tabletPressTarget = window;
} else {
- if (e->nullWindow) {
+ if (e->nullWindow()) {
window = tabletPressTarget;
localValid = false;
}
@@ -2238,7 +2263,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
touchEvent.setWindow(*winIt);
QGuiApplication::sendSpontaneousEvent(*winIt, &touchEvent);
}
- if (!self->synthesizedMousePoints.isEmpty() && !e->synthetic) {
+ if (!self->synthesizedMousePoints.isEmpty() && !e->synthetic()) {
for (QHash<QWindow *, SynthesizedMouseData>::const_iterator synthIt = self->synthesizedMousePoints.constBegin(),
synthItEnd = self->synthesizedMousePoints.constEnd(); synthIt != synthItEnd; ++synthIt) {
if (!synthIt->window)
@@ -2250,7 +2275,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
buttons & ~Qt::LeftButton,
e->modifiers,
Qt::MouseEventSynthesizedByQt);
- fake.synthetic = true;
+ fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
processMouseEvent(&fake);
}
self->synthesizedMousePoints.clear();
@@ -2429,9 +2454,9 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
}
QGuiApplication::sendSpontaneousEvent(w, &touchEvent);
- if (!e->synthetic && !touchEvent.isAccepted() && synthesizeMouseFromTouchEventsEnabled()) {
- // exclude touchpads as those generate their own mouse events
- if (touchEvent.device()->type() != QTouchDevice::TouchPad) {
+ if (!e->synthetic() && !touchEvent.isAccepted() && qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)) {
+ // exclude devices which generate their own mouse events
+ if (!(touchEvent.device()->capabilities() & QTouchDevice::MouseEmulation)) {
Qt::MouseButtons b = eventType == QEvent::TouchEnd ? Qt::NoButton : Qt::LeftButton;
if (b == Qt::NoButton)
self->synthesizedMousePoints.clear();
@@ -2452,7 +2477,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
b | (buttons & ~Qt::LeftButton),
e->modifiers,
Qt::MouseEventSynthesizedByQt);
- fake.synthetic = true;
+ fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
processMouseEvent(&fake);
break;
}
@@ -2543,7 +2568,7 @@ void QGuiApplicationPrivate::reportGeometryChange(QWindowSystemInterfacePrivate:
}
if (availableGeometryChanged)
- emit s->availableGeometryChanged(s->geometry());
+ emit s->availableGeometryChanged(s->availableGeometry());
if (geometryChanged || availableGeometryChanged) {
foreach (QScreen* sibling, s->virtualSiblings())
@@ -2592,6 +2617,8 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
return;
QWindow *window = e->exposed.data();
+ if (!window)
+ return;
QWindowPrivate *p = qt_window_private(window);
if (!p->receivedExpose) {
@@ -2607,7 +2634,7 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
p->receivedExpose = true;
}
- p->exposed = e->isExposed;
+ p->exposed = e->isExposed && window->screen();
QExposeEvent exposeEvent(e->region);
QCoreApplication::sendSpontaneousEvent(window, &exposeEvent);
@@ -3176,6 +3203,7 @@ Qt::LayoutDirection QGuiApplication::layoutDirection()
#ifndef QT_NO_CURSOR
QCursor *QGuiApplication::overrideCursor()
{
+ CHECK_QAPP_INSTANCE(Q_NULLPTR)
return qGuiApp->d_func()->cursor_list.isEmpty() ? 0 : &qGuiApp->d_func()->cursor_list.first();
}
@@ -3189,6 +3217,7 @@ QCursor *QGuiApplication::overrideCursor()
*/
void QGuiApplication::changeOverrideCursor(const QCursor &cursor)
{
+ CHECK_QAPP_INSTANCE()
if (qGuiApp->d_func()->cursor_list.isEmpty())
return;
qGuiApp->d_func()->cursor_list.removeFirst();
@@ -3263,6 +3292,7 @@ static inline void applyWindowCursor(const QList<QWindow *> &l)
*/
void QGuiApplication::setOverrideCursor(const QCursor &cursor)
{
+ CHECK_QAPP_INSTANCE()
qGuiApp->d_func()->cursor_list.prepend(cursor);
applyCursor(QGuiApplicationPrivate::window_list, cursor);
}
@@ -3280,6 +3310,7 @@ void QGuiApplication::setOverrideCursor(const QCursor &cursor)
*/
void QGuiApplication::restoreOverrideCursor()
{
+ CHECK_QAPP_INSTANCE()
if (qGuiApp->d_func()->cursor_list.isEmpty())
return;
qGuiApp->d_func()->cursor_list.removeFirst();
@@ -3304,9 +3335,9 @@ void QGuiApplication::restoreOverrideCursor()
*/
QStyleHints *QGuiApplication::styleHints()
{
- if (!qGuiApp->d_func()->styleHints)
- qGuiApp->d_func()->styleHints = new QStyleHints();
- return qGuiApp->d_func()->styleHints;
+ if (!QGuiApplicationPrivate::styleHints)
+ QGuiApplicationPrivate::styleHints = new QStyleHints();
+ return QGuiApplicationPrivate::styleHints;
}
/*!
@@ -3347,6 +3378,7 @@ bool QGuiApplication::desktopSettingsAware()
*/
QInputMethod *QGuiApplication::inputMethod()
{
+ CHECK_QAPP_INSTANCE(Q_NULLPTR)
if (!qGuiApp->d_func()->inputMethod)
qGuiApp->d_func()->inputMethod = new QInputMethod();
return qGuiApp->d_func()->inputMethod;
@@ -3482,6 +3514,16 @@ void QGuiApplicationPrivate::setMouseEventFlags(QMouseEvent *event, Qt::MouseEve
event->caps |= (value & Qt::MouseEventFlagMask) << MouseFlagsShift;
}
+QInputDeviceManager *QGuiApplicationPrivate::inputDeviceManager()
+{
+ Q_ASSERT(QGuiApplication::instance());
+
+ if (!m_inputDeviceManager)
+ m_inputDeviceManager = new QInputDeviceManager(QGuiApplication::instance());
+
+ return m_inputDeviceManager;
+}
+
#include "moc_qguiapplication.cpp"
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 713f2f2669..c89268d8d4 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -143,7 +143,7 @@ public:
static Qt::ApplicationState applicationState();
static int exec();
- bool notify(QObject *, QEvent *);
+ bool notify(QObject *, QEvent *) Q_DECL_OVERRIDE;
#ifndef QT_NO_SESSIONMANAGER
// session management
@@ -170,8 +170,8 @@ Q_SIGNALS:
void paletteChanged(const QPalette &pal);
protected:
- bool event(QEvent *);
- bool compressEvent(QEvent *, QObject *receiver, QPostEventList *);
+ bool event(QEvent *) Q_DECL_OVERRIDE;
+ bool compressEvent(QEvent *, QObject *receiver, QPostEventList *) Q_DECL_OVERRIDE;
QGuiApplication(QGuiApplicationPrivate &p);
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index c57d1d8080..0559442049 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -66,6 +66,7 @@ struct QDrawHelperGammaTables;
#ifndef QT_NO_DRAGANDDROP
class QDrag;
#endif // QT_NO_DRAGANDDROP
+class QInputDeviceManager;
class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate
{
@@ -81,7 +82,7 @@ public:
virtual void notifyLayoutDirectionChange();
virtual void notifyActiveWindowChange(QWindow *previous);
- virtual bool shouldQuit();
+ virtual bool shouldQuit() Q_DECL_OVERRIDE;
bool shouldQuitInternal(const QWindowList &processedWindows);
virtual bool tryCloseAllWindows();
@@ -189,8 +190,6 @@ public:
static void updateBlockedStatus(QWindow *window);
virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const;
- static bool synthesizeMouseFromTouchEventsEnabled();
-
static Qt::MouseButtons buttons;
static ulong mousePressTime;
static Qt::MouseButton mousePressButton;
@@ -201,6 +200,7 @@ public:
static Qt::MouseButtons tabletState;
static QWindow *tabletPressTarget;
static QWindow *currentMouseWindow;
+ static QWindow *currentMousePressWindow;
static Qt::ApplicationState applicationState;
#ifndef QT_NO_CLIPBOARD
@@ -219,7 +219,7 @@ public:
static QFont *app_font;
- QStyleHints *styleHints;
+ static QStyleHints *styleHints;
static bool obey_desktop_settings;
QInputMethod *inputMethod;
@@ -270,6 +270,8 @@ public:
static Qt::MouseEventFlags mouseEventFlags(const QMouseEvent *event);
static void setMouseEventFlags(QMouseEvent *event, Qt::MouseEventFlags flags);
+ static QInputDeviceManager *inputDeviceManager();
+
const QDrawHelperGammaTables *gammaTables();
// hook reimplemented in QApplication to apply the QStyle function on the QIcon
@@ -299,6 +301,8 @@ private:
QAtomicPointer<QDrawHelperGammaTables> m_gammaTables;
bool ownGlobalShareContext;
+
+ static QInputDeviceManager *m_inputDeviceManager;
};
Q_GUI_EXPORT uint qHash(const QGuiApplicationPrivate::ActiveTouchPointsKey &k);
diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp
index 07d72ac499..ce4a0ec09e 100644
--- a/src/gui/kernel/qguivariant.cpp
+++ b/src/gui/kernel/qguivariant.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qinputdevicemanager.cpp b/src/gui/kernel/qinputdevicemanager.cpp
new file mode 100644
index 0000000000..d0dd8a4e7c
--- /dev/null
+++ b/src/gui/kernel/qinputdevicemanager.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qinputdevicemanager_p.h"
+#include "qinputdevicemanager_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QInputDeviceManager
+ \internal
+
+ \brief QInputDeviceManager acts as a communication hub between QtGui and the input handlers.
+
+ On embedded platforms the input handling code is either compiled into the platform
+ plugin or is loaded dynamically as a generic plugin without any interface. The input
+ handler in use may also change between each run (e.g. evdevmouse/keyboard/touch
+ vs. libinput). QWindowSystemInterface is too limiting when Qt (the platform plugin) is
+ acting as a windowing system, and is one way only.
+
+ QInputDeviceManager solves this by providing a global object that is used to communicate
+ from the input handlers to the rest of Qt (e.g. the number of connected mice, which may
+ be important information for the cursor drawing code), and vice-versa (e.g. to indicate
+ to the input handler that a manual cursor position change was requested by the
+ application via QCursor::setPos and thus any internal state has to be updated accordingly).
+*/
+
+QInputDeviceManager::QInputDeviceManager(QObject *parent)
+ : QObject(*new QInputDeviceManagerPrivate, parent)
+{
+}
+
+int QInputDeviceManager::deviceCount(DeviceType type) const
+{
+ Q_D(const QInputDeviceManager);
+ return d->deviceCount(type);
+}
+
+int QInputDeviceManagerPrivate::deviceCount(QInputDeviceManager::DeviceType type) const
+{
+ return m_deviceCount.value(type);
+}
+
+void QInputDeviceManagerPrivate::setDeviceCount(QInputDeviceManager::DeviceType type, int count)
+{
+ Q_Q(QInputDeviceManager);
+ if (m_deviceCount.value(type) != count) {
+ m_deviceCount[type] = count;
+ emit q->deviceListChanged(type);
+ }
+}
+
+void QInputDeviceManager::setCursorPos(const QPoint &pos)
+{
+ emit cursorPositionChangeRequested(pos);
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qinputdevicemanager_p.h b/src/gui/kernel/qinputdevicemanager_p.h
new file mode 100644
index 0000000000..15c84d1a82
--- /dev/null
+++ b/src/gui/kernel/qinputdevicemanager_p.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QINPUTDEVICEMANAGER_P_H
+#define QINPUTDEVICEMANAGER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qobject.h>
+
+QT_BEGIN_NAMESPACE
+
+class QInputDeviceManagerPrivate;
+
+class Q_GUI_EXPORT QInputDeviceManager : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QInputDeviceManager)
+
+public:
+ enum DeviceType {
+ DeviceTypeUnknown,
+ DeviceTypePointer,
+ DeviceTypeKeyboard,
+ DeviceTypeTouch
+ };
+
+ QInputDeviceManager(QObject *parent = 0);
+
+ int deviceCount(DeviceType type) const;
+
+ void setCursorPos(const QPoint &pos);
+
+signals:
+ void deviceListChanged(DeviceType type);
+ void cursorPositionChangeRequested(const QPoint &pos);
+};
+
+QT_END_NAMESPACE
+
+#endif // QINPUTDEVICEMANAGER_P_H
diff --git a/src/gui/kernel/qinputdevicemanager_p_p.h b/src/gui/kernel/qinputdevicemanager_p_p.h
new file mode 100644
index 0000000000..d6cb817d88
--- /dev/null
+++ b/src/gui/kernel/qinputdevicemanager_p_p.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QINPUTDEVICEMANAGER_P_P_H
+#define QINPUTDEVICEMANAGER_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qmap.h>
+#include <private/qobject_p.h>
+#include "qinputdevicemanager_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QInputDeviceManagerPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QInputDeviceManager)
+
+public:
+ static QInputDeviceManagerPrivate *get(QInputDeviceManager *mgr) { return mgr->d_func(); }
+
+ int deviceCount(QInputDeviceManager::DeviceType type) const;
+ void setDeviceCount(QInputDeviceManager::DeviceType type, int count);
+
+ QMap<QInputDeviceManager::DeviceType, int> m_deviceCount;
+};
+
+QT_END_NAMESPACE
+
+#endif // QINPUTDEVICEMANAGER_P_P_H
diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp
index 77c1f65545..8d51be853a 100644
--- a/src/gui/kernel/qinputmethod.cpp
+++ b/src/gui/kernel/qinputmethod.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qinputmethod.h b/src/gui/kernel/qinputmethod.h
index 7be25c415c..3e801bff3c 100644
--- a/src/gui/kernel/qinputmethod.h
+++ b/src/gui/kernel/qinputmethod.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -55,7 +55,6 @@ class Q_GUI_EXPORT QInputMethod : public QObject
Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged)
Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged)
- Q_ENUMS(Action)
public:
QTransform inputItemTransform() const;
void setInputItemTransform(const QTransform &transform);
@@ -73,6 +72,7 @@ public:
Click,
ContextMenu
};
+ Q_ENUM(Action)
bool isVisible() const;
void setVisible(bool visible);
diff --git a/src/gui/kernel/qinputmethod_p.h b/src/gui/kernel/qinputmethod_p.h
index c6bd289dcf..0111162e84 100644
--- a/src/gui/kernel/qinputmethod_p.h
+++ b/src/gui/kernel/qinputmethod_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qkeymapper.cpp b/src/gui/kernel/qkeymapper.cpp
index b5189fb526..d5da76bdfe 100644
--- a/src/gui/kernel/qkeymapper.cpp
+++ b/src/gui/kernel/qkeymapper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h
index 24b83b7670..20dcbbc139 100644
--- a/src/gui/kernel/qkeymapper_p.h
+++ b/src/gui/kernel/qkeymapper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 209d1dd499..23d5f06aa2 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -289,6 +289,7 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni
\row \li DeleteCompleteLine \li (none) \li (none) \li Ctrl+U \li Ctrl+U
\row \li InsertParagraphSeparator \li Enter \li Enter \li Enter \li Enter
\row \li InsertLineSeparator \li Shift+Enter \li Meta+Enter, Meta+O \li Shift+Enter \li Shift+Enter
+ \row \li Backspace \li (none) \li Meta+H \li (none) \li (none)
\endtable
Note that, since the key sequences used for the standard shortcuts differ
@@ -663,6 +664,9 @@ static const struct {
{ Qt::Key_Play, QT_TRANSLATE_NOOP("QShortcut", "Play") },
{ Qt::Key_Zoom, QT_TRANSLATE_NOOP("QShortcut", "Zoom") },
{ Qt::Key_Exit, QT_TRANSLATE_NOOP("QShortcut", "Exit") },
+ { Qt::Key_TouchpadToggle, QT_TRANSLATE_NOOP("QShortcut", "Touchpad Toggle") },
+ { Qt::Key_TouchpadOn, QT_TRANSLATE_NOOP("QShortcut", "Touchpad On") },
+ { Qt::Key_TouchpadOff, QT_TRANSLATE_NOOP("QShortcut", "Touchpad Off") },
{ 0, 0 }
};
@@ -679,6 +683,7 @@ static const struct {
\value AddTab Add new tab.
\value Back Navigate back.
+ \value Backspace Delete previous character.
\value Bold Bold text.
\value Close Close document/tab.
\value Copy Copy.
@@ -1596,8 +1601,9 @@ QDataStream &operator>>(QDataStream &s, QKeySequence &keysequence)
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QKeySequence &p)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QKeySequence(" << p.toString() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 5a2ce5a8b9..cd7af5718f 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -62,7 +62,6 @@ class QKeySequencePrivate;
class Q_GUI_EXPORT QKeySequence
{
Q_GADGET
- Q_ENUMS(StandardKey)
public:
enum StandardKey {
@@ -134,8 +133,10 @@ public:
Quit,
FullScreen,
Deselect,
- DeleteCompleteLine
+ DeleteCompleteLine,
+ Backspace
};
+ Q_ENUM(StandardKey)
enum SequenceFormat {
NativeText,
diff --git a/src/gui/kernel/qkeysequence_p.h b/src/gui/kernel/qkeysequence_p.h
index 2eed275e32..97416943d0 100644
--- a/src/gui/kernel/qkeysequence_p.h
+++ b/src/gui/kernel/qkeysequence_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp
index 5cf77de5d8..1a12ea4d32 100644
--- a/src/gui/kernel/qoffscreensurface.cpp
+++ b/src/gui/kernel/qoffscreensurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
QOffscreenSurface is intended to be used with QOpenGLContext to allow rendering with OpenGL in
an arbitrary thread without the need to create a QWindow.
- Even though the surface is renderable, the surface's pixels are not accessible.
+ Even though the surface is typically renderable, the surface's pixels are not accessible.
QOffscreenSurface should only be used to create OpenGL resources such as textures
or framebuffer objects.
@@ -77,6 +77,11 @@ QT_BEGIN_NAMESPACE
created}. Passing the format returned from QWindow::requestedFormat() to setFormat()
may result in an incompatible offscreen surface since the underlying windowing system
interface may offer a different set of configurations for window and pbuffer surfaces.
+
+ \note Some platforms may utilize a surfaceless context extension (for example
+ EGL_KHR_surfaceless_context) when available. In this case there will be no underlying
+ native surface. For the use cases of QOffscreenSurface (rendering to FBOs, texture
+ upload) this is not a problem.
*/
class Q_GUI_EXPORT QOffscreenSurfacePrivate : public QObjectPrivate
{
@@ -180,6 +185,9 @@ void QOffscreenSurface::create()
d->offscreenWindow->setGeometry(0, 0, d->size.width(), d->size.height());
d->offscreenWindow->create();
}
+
+ QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated);
+ QGuiApplication::sendEvent(this, &e);
}
}
@@ -191,6 +199,10 @@ void QOffscreenSurface::create()
void QOffscreenSurface::destroy()
{
Q_D(QOffscreenSurface);
+
+ QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed);
+ QGuiApplication::sendEvent(this, &e);
+
delete d->platformOffscreenSurface;
d->platformOffscreenSurface = 0;
if (d->offscreenWindow) {
diff --git a/src/gui/kernel/qoffscreensurface.h b/src/gui/kernel/qoffscreensurface.h
index a4ba51320b..909a1ef256 100644
--- a/src/gui/kernel/qoffscreensurface.h
+++ b/src/gui/kernel/qoffscreensurface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -54,7 +54,7 @@ public:
explicit QOffscreenSurface(QScreen *screen = 0);
virtual ~QOffscreenSurface();
- SurfaceType surfaceType() const;
+ SurfaceType surfaceType() const Q_DECL_OVERRIDE;
void create();
void destroy();
@@ -62,10 +62,10 @@ public:
bool isValid() const;
void setFormat(const QSurfaceFormat &format);
- QSurfaceFormat format() const;
+ QSurfaceFormat format() const Q_DECL_OVERRIDE;
QSurfaceFormat requestedFormat() const;
- QSize size() const;
+ QSize size() const Q_DECL_OVERRIDE;
QScreen *screen() const;
void setScreen(QScreen *screen);
@@ -80,7 +80,7 @@ private Q_SLOTS:
private:
- QPlatformSurface *surfaceHandle() const;
+ QPlatformSurface *surfaceHandle() const Q_DECL_OVERRIDE;
Q_DISABLE_COPY(QOffscreenSurface)
};
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index b663afabbc..56a3729a4a 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -370,13 +370,10 @@ int QOpenGLContextPrivate::maxTextureSize()
QOpenGLFunctions_1_0 *gl1funcs = 0;
QOpenGLFunctions_3_2_Core *gl3funcs = 0;
- if (q->format().profile() == QSurfaceFormat::CoreProfile) {
+ if (q->format().profile() == QSurfaceFormat::CoreProfile)
gl3funcs = q->versionFunctions<QOpenGLFunctions_3_2_Core>();
- gl3funcs->initializeOpenGLFunctions();
- } else {
+ else
gl1funcs = q->versionFunctions<QOpenGLFunctions_1_0>();
- gl1funcs->initializeOpenGLFunctions();
- }
Q_ASSERT(gl1funcs || gl3funcs);
@@ -590,13 +587,14 @@ QVariant QOpenGLContext::nativeHandle() const
*/
bool QOpenGLContext::create()
{
- if (isValid())
+ Q_D(QOpenGLContext);
+ if (d->platformGLContext)
destroy();
- Q_D(QOpenGLContext);
d->platformGLContext = QGuiApplicationPrivate::platformIntegration()->createPlatformOpenGLContext(this);
if (!d->platformGLContext)
return false;
+ d->platformGLContext->initialize();
d->platformGLContext->setContext(this);
if (!d->platformGLContext->isSharing())
d->shareContext = 0;
@@ -638,12 +636,21 @@ void QOpenGLContext::destroy()
d->platformGLContext = 0;
delete d->functions;
d->functions = 0;
+
+ foreach (QAbstractOpenGLFunctions *func, d->externalVersionFunctions) {
+ QAbstractOpenGLFunctionsPrivate *func_d = QAbstractOpenGLFunctionsPrivate::get(func);
+ func_d->owningContext = 0;
+ func_d->initialized = false;
+ }
+ d->externalVersionFunctions.clear();
qDeleteAll(d->versionFunctions);
d->versionFunctions.clear();
qDeleteAll(d->versionFunctionsBackend);
d->versionFunctionsBackend.clear();
+
delete d->textureFunctions;
d->textureFunctions = 0;
+
d->nativeHandle = QVariant();
}
@@ -675,6 +682,15 @@ QOpenGLContext::~QOpenGLContext()
/*!
Returns if this context is valid, i.e. has been successfully created.
+ On some platforms the return value of \c false for a context that was
+ successfully created previously indicates that the OpenGL context was lost.
+
+ The typical way to handle context loss scenarios in applications is to
+ check via this function whenever makeCurrent() fails and returns \c false.
+ If this function then returns \c false, recreate the underlying native
+ OpenGL context by calling create(), call makeCurrent() again and then
+ reinitialize all OpenGL resources.
+
\sa create()
*/
bool QOpenGLContext::isValid() const
@@ -708,9 +724,12 @@ QOpenGLFunctions *QOpenGLContext::functions() const
\overload versionFunctions()
Returns a pointer to an object that provides access to all functions for
- the version and profile of this context. Before using any of the functions
- they must be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
- with this context being the current context.
+ the version and profile of this context. There is no need to call
+ QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as this context
+ is current. It is also possible to call this function when the context is not
+ current, but in that case it is the caller's responsibility to ensure proper
+ initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
+ afterwards.
Usually one would use the template version of this function to automatically
have the result cast to the correct type.
@@ -722,7 +741,6 @@ QOpenGLFunctions *QOpenGLContext::functions() const
qWarning() << "Could not obtain required OpenGL context version";
exit(1);
}
- funcs->initializeOpenGLFunctions();
\endcode
It is possible to request a functions object for a different version and profile
@@ -752,9 +770,12 @@ QOpenGLFunctions *QOpenGLContext::functions() const
/*!
Returns a pointer to an object that provides access to all functions for the
- \a versionProfile of this context. Before using any of the functions they must
- be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
- with this context being the current context.
+ \a versionProfile of this context. There is no need to call
+ QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as this context
+ is current. It is also possible to call this function when the context is not
+ current, but in that case it is the caller's responsibility to ensure proper
+ initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
+ afterwards.
Usually one would use the template version of this function to automatically
have the result cast to the correct type.
@@ -799,6 +820,9 @@ QAbstractOpenGLFunctions *QOpenGLContext::versionFunctions(const QOpenGLVersionP
funcs = d->versionFunctions.value(vp);
}
+ if (funcs && QOpenGLContext::currentContext() == this)
+ funcs->initializeOpenGLFunctions();
+
return funcs;
}
@@ -836,15 +860,26 @@ bool QOpenGLContext::hasExtension(const QByteArray &extension) const
/*!
Call this to get the default framebuffer object for the current surface.
- On some platforms the default framebuffer object depends on the surface
- being rendered to, and might be different from 0. Thus, instead of calling
- glBindFramebuffer(0), you should call
+ On some platforms (for instance, iOS) the default framebuffer object depends
+ on the surface being rendered to, and might be different from 0. Thus,
+ instead of calling glBindFramebuffer(0), you should call
glBindFramebuffer(ctx->defaultFramebufferObject()) if you want your
application to work across different Qt platforms.
If you use the glBindFramebuffer() in QOpenGLFunctions you do not have to
worry about this, as it automatically binds the current context's
defaultFramebufferObject() when 0 is passed.
+
+ \note Widgets that render via framebuffer objects, like QOpenGLWidget and
+ QQuickWidget, will override the value returned from this function when
+ painting is active, because at that time the correct "default" framebuffer
+ is the widget's associated backing framebuffer, not the platform-specific
+ one belonging to the top-level window's surface. This ensures the expected
+ behavior for this function and other classes relying on it (for example,
+ QOpenGLFramebufferObject::bindDefault() or
+ QOpenGLFramebufferObject::release()).
+
+ \sa QOpenGLFramebufferObject
*/
GLuint QOpenGLContext::defaultFramebufferObject() const
{
@@ -855,6 +890,9 @@ GLuint QOpenGLContext::defaultFramebufferObject() const
if (!d->surface || !d->surface->surfaceHandle())
return 0;
+ if (d->defaultFboRedirect)
+ return d->defaultFboRedirect;
+
return d->platformGLContext->defaultFramebufferObject(d->surface->surfaceHandle());
}
@@ -1175,6 +1213,46 @@ bool QOpenGLContext::isOpenGLES() const
}
/*!
+ Returns \c true if the platform supports OpenGL rendering outside the main (gui)
+ thread.
+
+ The value is controlled by the platform plugin in use and may also depend on the
+ graphics drivers.
+
+ \since 5.5
+ */
+bool QOpenGLContext::supportsThreadedOpenGL()
+{
+ Q_ASSERT(qGuiApp);
+ return QGuiApplicationPrivate::instance()->platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL);
+}
+
+/*!
+ \since 5.5
+
+ Returns the application-wide shared OpenGL context, if present.
+ Otherwise, returns a null pointer.
+
+ This is useful if you need to upload OpenGL objects (buffers, textures,
+ etc.) before creating or showing a QOpenGLWidget or QQuickWidget.
+
+ \note You must set the Qt::AA_ShareOpenGLContexts flag on QGuiApplication
+ before creating the QGuiApplication object, otherwise Qt may not create a
+ global shared context.
+
+ \warning Do not attempt to make the context returned by this function
+ current on any surface. Instead, you can create a new context which shares
+ with the global one, and then make the new context current.
+
+ \sa Qt::AA_ShareOpenGLContexts, setShareContext(), makeCurrent()
+*/
+QOpenGLContext *QOpenGLContext::globalShareContext()
+{
+ Q_ASSERT(qGuiApp);
+ return qt_gl_global_share_context();
+}
+
+/*!
\internal
*/
QOpenGLVersionFunctionsBackend *QOpenGLContext::functionsBackend(const QOpenGLVersionStatus &v) const
@@ -1204,6 +1282,24 @@ void QOpenGLContext::removeFunctionsBackend(const QOpenGLVersionStatus &v)
/*!
\internal
+ */
+void QOpenGLContext::insertExternalFunctions(QAbstractOpenGLFunctions *f)
+{
+ Q_D(QOpenGLContext);
+ d->externalVersionFunctions.insert(f);
+}
+
+/*!
+ \internal
+ */
+void QOpenGLContext::removeExternalFunctions(QAbstractOpenGLFunctions *f)
+{
+ Q_D(QOpenGLContext);
+ d->externalVersionFunctions.remove(f);
+}
+
+/*!
+ \internal
*/
QOpenGLTextureHelper* QOpenGLContext::textureFunctions() const
{
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index b31cc693b7..a529957ad6 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -198,6 +198,9 @@ public:
bool isOpenGLES() const;
+ static bool supportsThreadedOpenGL();
+ static QOpenGLContext *globalShareContext();
+
Q_SIGNALS:
void aboutToBeDestroyed();
@@ -226,6 +229,8 @@ private:
void insertFunctionsBackend(const QOpenGLVersionStatus &v,
QOpenGLVersionFunctionsBackend *backend);
void removeFunctionsBackend(const QOpenGLVersionStatus &v);
+ void insertExternalFunctions(QAbstractOpenGLFunctions *f);
+ void removeExternalFunctions(QAbstractOpenGLFunctions *f);
QOpenGLTextureHelper* textureFunctions() const;
void setTextureFunctions(QOpenGLTextureHelper* textureFuncs);
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 975553e7cd..f9f3ce2c5f 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -105,12 +105,12 @@ public:
GLuint id() const { return m_id; }
protected:
- void invalidateResource()
+ void invalidateResource() Q_DECL_OVERRIDE
{
m_id = 0;
}
- void freeResource(QOpenGLContext *context);
+ void freeResource(QOpenGLContext *context) Q_DECL_OVERRIDE;
private:
GLuint m_id;
@@ -204,6 +204,7 @@ public:
, workaround_missingPrecisionQualifiers(false)
, active_engine(0)
, qgl_current_fbo_invalid(false)
+ , defaultFboRedirect(0)
{
requestedFormat = QSurfaceFormat::defaultFormat();
}
@@ -216,6 +217,7 @@ public:
mutable QHash<QOpenGLVersionProfile, QAbstractOpenGLFunctions *> versionFunctions;
mutable QHash<QOpenGLVersionStatus, QOpenGLVersionFunctionsBackend *> versionFunctionsBackend;
+ mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions;
void *qGLContextHandle;
void (*qGLContextDeleteFunction)(void *handle);
@@ -241,6 +243,7 @@ public:
bool qgl_current_fbo_invalid;
QVariant nativeHandle;
+ GLuint defaultFboRedirect;
static QOpenGLContext *setCurrentContext(QOpenGLContext *context);
diff --git a/src/gui/kernel/qopenglwindow.cpp b/src/gui/kernel/qopenglwindow.cpp
index c37974c429..a7ba57e85e 100644
--- a/src/gui/kernel/qopenglwindow.cpp
+++ b/src/gui/kernel/qopenglwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -166,10 +166,13 @@ class QOpenGLWindowPrivate : public QPaintDeviceWindowPrivate
{
Q_DECLARE_PUBLIC(QOpenGLWindow)
public:
- QOpenGLWindowPrivate(QOpenGLWindow::UpdateBehavior updateBehavior)
+ QOpenGLWindowPrivate(QOpenGLContext *shareContext, QOpenGLWindow::UpdateBehavior updateBehavior)
: updateBehavior(updateBehavior)
, hasFboBlit(false)
+ , shareContext(shareContext)
{
+ if (!shareContext)
+ this->shareContext = qt_gl_global_share_context();
}
~QOpenGLWindowPrivate()
@@ -201,7 +204,7 @@ public:
if (!context) {
context.reset(new QOpenGLContext);
- context->setShareContext(qt_gl_global_share_context());
+ context->setShareContext(shareContext);
context->setFormat(q->requestedFormat());
if (!context->create())
qWarning("QOpenGLWindow::beginPaint: Failed to create context");
@@ -299,6 +302,7 @@ public:
QOpenGLWindow::UpdateBehavior updateBehavior;
bool hasFboBlit;
QScopedPointer<QOpenGLContext> context;
+ QOpenGLContext *shareContext;
QScopedPointer<QOpenGLFramebufferObject> fbo;
QScopedPointer<QOpenGLWindowPaintDevice> paintDevice;
QOpenGLTextureBlitter blitter;
@@ -317,12 +321,47 @@ void QOpenGLWindowPaintDevice::ensureActiveTarget()
\sa QOpenGLWindow::UpdateBehavior
*/
QOpenGLWindow::QOpenGLWindow(QOpenGLWindow::UpdateBehavior updateBehavior, QWindow *parent)
- : QPaintDeviceWindow(*(new QOpenGLWindowPrivate(updateBehavior)), parent)
+ : QPaintDeviceWindow(*(new QOpenGLWindowPrivate(Q_NULLPTR, updateBehavior)), parent)
{
setSurfaceType(QSurface::OpenGLSurface);
}
/*!
+ Constructs a new QOpenGLWindow with the given \a parent and \a updateBehavior. The QOpenGLWindow's context will share with \a shareContext.
+
+ \sa QOpenGLWindow::UpdateBehavior shareContext
+*/
+QOpenGLWindow::QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior, QWindow *parent)
+ : QPaintDeviceWindow(*(new QOpenGLWindowPrivate(shareContext, updateBehavior)), parent)
+{
+ setSurfaceType(QSurface::OpenGLSurface);
+}
+
+/*!
+ Destroys the QOpenGLWindow instance, freeing its resources.
+
+ The OpenGLWindow's context is made current in the destructor, allowing for
+ safe destruction of any child object that may need to release OpenGL
+ resources belonging to the context provided by this window.
+
+ \warning if you have objects wrapping OpenGL resources (such as
+ QOpenGLBuffer, QOpenGLShaderProgram, etc.) as members of a QOpenGLWindow
+ subclass, you may need to add a call to makeCurrent() in that subclass'
+ destructor as well. Due to the rules of C++ object destruction, those objects
+ will be destroyed \e{before} calling this function (but after that the
+ destructor of the subclass has run), therefore making the OpenGL context
+ current in this function happens too late for their safe disposal.
+
+ \sa makeCurrent
+
+ \since 5.5
+*/
+QOpenGLWindow::~QOpenGLWindow()
+{
+ makeCurrent();
+}
+
+/*!
\return the update behavior for this QOpenGLWindow.
*/
QOpenGLWindow::UpdateBehavior QOpenGLWindow::updateBehavior() const
@@ -414,6 +453,15 @@ QOpenGLContext *QOpenGLWindow::context() const
}
/*!
+ \return The QOpenGLContext requested to be shared with this window's QOpenGLContext.
+*/
+QOpenGLContext *QOpenGLWindow::shareContext() const
+{
+ Q_D(const QOpenGLWindow);
+ return d->shareContext;
+}
+
+/*!
The framebuffer object handle used by this window.
When the update behavior is set to \c NoPartialUpdate, there is no separate
diff --git a/src/gui/kernel/qopenglwindow.h b/src/gui/kernel/qopenglwindow.h
index 3b0b399b0a..f274275c3f 100644
--- a/src/gui/kernel/qopenglwindow.h
+++ b/src/gui/kernel/qopenglwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -59,6 +59,8 @@ public:
};
explicit QOpenGLWindow(UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = 0);
+ explicit QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent = 0);
+ ~QOpenGLWindow();
UpdateBehavior updateBehavior() const;
bool isValid() const;
@@ -67,6 +69,7 @@ public:
void doneCurrent();
QOpenGLContext *context() const;
+ QOpenGLContext *shareContext() const;
GLuint defaultFramebufferObject() const;
diff --git a/src/gui/kernel/qpaintdevicewindow.cpp b/src/gui/kernel/qpaintdevicewindow.cpp
index cf8653426f..b32ab3b34d 100644
--- a/src/gui/kernel/qpaintdevicewindow.cpp
+++ b/src/gui/kernel/qpaintdevicewindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -76,7 +76,7 @@ void QPaintDeviceWindow::update(const QRect &rect)
{
Q_D(QPaintDeviceWindow);
d->dirtyRegion += rect;
- d->triggerUpdate();
+ requestUpdate();
}
/*!
@@ -89,7 +89,7 @@ void QPaintDeviceWindow::update(const QRegion &region)
{
Q_D(QPaintDeviceWindow);
d->dirtyRegion += region;
- d->triggerUpdate();
+ requestUpdate();
}
/*!
@@ -179,7 +179,6 @@ bool QPaintDeviceWindow::event(QEvent *event)
Q_D(QPaintDeviceWindow);
if (event->type() == QEvent::UpdateRequest) {
- d->paintEventSent = false;
if (handle()) // platform window may be gone when the window is closed during app exit
d->handleUpdateEvent();
return true;
diff --git a/src/gui/kernel/qpaintdevicewindow.h b/src/gui/kernel/qpaintdevicewindow.h
index 79047e47f4..4d7e5dd518 100644
--- a/src/gui/kernel/qpaintdevicewindow.h
+++ b/src/gui/kernel/qpaintdevicewindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qpaintdevicewindow_p.h b/src/gui/kernel/qpaintdevicewindow_p.h
index 1935bb6db5..e234906fe0 100644
--- a/src/gui/kernel/qpaintdevicewindow_p.h
+++ b/src/gui/kernel/qpaintdevicewindow_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -46,8 +46,6 @@ class Q_GUI_EXPORT QPaintDeviceWindowPrivate : public QWindowPrivate
Q_DECLARE_PUBLIC(QPaintDeviceWindow)
public:
- QPaintDeviceWindowPrivate() : paintEventSent(false) { }
-
virtual void beginPaint(const QRegion &region)
{
Q_UNUSED(region);
@@ -82,15 +80,6 @@ public:
return true;
}
- void triggerUpdate()
- {
- Q_Q(QPaintDeviceWindow);
- if (!paintEventSent) {
- QCoreApplication::postEvent(q, new QEvent(QEvent::UpdateRequest));
- paintEventSent = true;
- }
- }
-
void doFlush(const QRegion &region)
{
QRegion toFlush = region;
@@ -113,7 +102,6 @@ public:
private:
QRegion dirtyRegion;
- bool paintEventSent;
};
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index e3862c1865..cf17e1b5aa 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1152,6 +1152,7 @@ QDebug operator<<(QDebug dbg, const QPalette &p)
"BrightText", "ButtonText", "Base", "Window", "Shadow", "Highlight",
"HighlightedText", "Link", "LinkVisited", "AlternateBase", "NoRole",
"ToolTipBase","ToolTipText" };
+ QDebugStateSaver saver(dbg);
QDebug nospace = dbg.nospace();
const uint mask = p.resolve();
nospace << "QPalette(resolve=" << hex << showbase << mask << ',';
@@ -1171,7 +1172,7 @@ QDebug operator<<(QDebug dbg, const QPalette &p)
}
}
nospace << ')' << noshowbase << dec;
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index c877084c09..e8b35aa82a 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -47,7 +47,6 @@ class QVariant;
class Q_GUI_EXPORT QPalette
{
Q_GADGET
- Q_ENUMS(ColorGroup ColorRole)
public:
QPalette();
QPalette(const QColor &button);
@@ -80,6 +79,7 @@ public:
// Do not change the order, the serialization format depends on it
enum ColorGroup { Active, Disabled, Inactive, NColorGroups, Current, All, Normal = Active };
+ Q_ENUM(ColorGroup)
enum ColorRole { WindowText, Button, Light, Midlight, Dark, Mid,
Text, BrightText, ButtonText, Base, Window, Shadow,
Highlight, HighlightedText,
@@ -90,6 +90,7 @@ public:
NColorRoles = ToolTipText + 1,
Foreground = WindowText, Background = Window
};
+ Q_ENUM(ColorRole)
inline ColorGroup currentColorGroup() const { return static_cast<ColorGroup>(data.current_group); }
inline void setCurrentColorGroup(ColorGroup cg) { data.current_group = cg; }
diff --git a/src/gui/kernel/qpixelformat.cpp b/src/gui/kernel/qpixelformat.cpp
index cfa8a96d69..d0fed88dbb 100644
--- a/src/gui/kernel/qpixelformat.cpp
+++ b/src/gui/kernel/qpixelformat.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -69,6 +69,7 @@ QT_BEGIN_NAMESPACE
\enum QPixelFormat::ColorModel
This enum type is used to describe the color model of the pixelformat.
+ Alpha was added in 5.5.
\value RGB The color model is RGB.
@@ -86,6 +87,8 @@ QT_BEGIN_NAMESPACE
\value HSV The color model is HSV.
\value YUV The color model is YUV.
+
+ \value Alpha There is no color model, only alpha is used.
*/
/*!
@@ -282,6 +285,21 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QPixelFormat qPixelFormatAlpha(uchar channelSize,
+ QPixelFormat::TypeInterpretation typeInterpretation = QPixelFormat::UnsignedInteger)
+ \relates QPixelFormat
+ \since 5.5
+
+ Constructor function for creating an Alpha format. A mask format can be
+ described by passing 1 to \a channelSize. Its also possible to define very
+ accurate alpha formats using doubles to describe each pixel by passing 8
+ as \a channelSize and FloatingPoint as \a typeInterpretation.
+
+ \sa QPixelFormat::TypeInterpretation
+*/
+
+
+/*!
\fn QPixelFormat qPixelFormatCmyk(uchar channelSize,
uchar alphaSize = 0,
QPixelFormat::AlphaUsage alphaUsage = QPixelFormat::IgnoresAlpha,
diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h
index f55c97c7c0..9ccfa39e95 100644
--- a/src/gui/kernel/qpixelformat.h
+++ b/src/gui/kernel/qpixelformat.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -103,7 +103,8 @@ public:
CMYK,
HSL,
HSV,
- YUV
+ YUV,
+ Alpha
};
enum AlphaUsage {
@@ -304,6 +305,22 @@ Q_DECL_CONSTEXPR inline QPixelFormat qPixelFormatGrayscale(uchar channelSize,
typeInt);
}
+Q_DECL_CONSTEXPR inline QPixelFormat qPixelFormatAlpha(uchar channelSize,
+ QPixelFormat::TypeInterpretation typeInt=QPixelFormat::UnsignedInteger) Q_DECL_NOTHROW
+{
+ return QPixelFormat(QPixelFormat::Alpha,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ channelSize,
+ QPixelFormat::UsesAlpha,
+ QPixelFormat::AtBeginning,
+ QPixelFormat::NotPremultiplied,
+ typeInt);
+}
+
Q_DECL_CONSTEXPR inline QPixelFormat qPixelFormatCmyk(uchar channelSize,
uchar alfa=0,
QPixelFormat::AlphaUsage usage=QPixelFormat::IgnoresAlpha,
diff --git a/src/gui/kernel/qplatformclipboard.cpp b/src/gui/kernel/qplatformclipboard.cpp
index 3774a6be11..1cb223fef6 100644
--- a/src/gui/kernel/qplatformclipboard.cpp
+++ b/src/gui/kernel/qplatformclipboard.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformclipboard.h b/src/gui/kernel/qplatformclipboard.h
index f70ece8a13..f52e3e2fa2 100644
--- a/src/gui/kernel/qplatformclipboard.h
+++ b/src/gui/kernel/qplatformclipboard.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformcursor.cpp b/src/gui/kernel/qplatformcursor.cpp
index 2426cc5872..7239ac7ba4 100644
--- a/src/gui/kernel/qplatformcursor.cpp
+++ b/src/gui/kernel/qplatformcursor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtOpenVG module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformcursor.h b/src/gui/kernel/qplatformcursor.h
index 6e9983ecc6..4f4f9cc6ae 100644
--- a/src/gui/kernel/qplatformcursor.h
+++ b/src/gui/kernel/qplatformcursor.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtOpenVG module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 5172801e78..3d37088182 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index e0730cd3fa..8b2b9881b7 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformdrag.cpp b/src/gui/kernel/qplatformdrag.cpp
index 326f092ead..d789c75d1d 100644
--- a/src/gui/kernel/qplatformdrag.cpp
+++ b/src/gui/kernel/qplatformdrag.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -42,57 +42,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_DRAGANDDROP
#ifdef QDND_DEBUG
-QString dragActionsToString(Qt::DropActions actions)
-{
- QString str;
- if (actions == Qt::IgnoreAction) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("IgnoreAction");
- }
- if (actions & Qt::LinkAction) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("LinkAction");
- }
- if (actions & Qt::CopyAction) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("CopyAction");
- }
- if (actions & Qt::MoveAction) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("MoveAction");
- }
- if ((actions & Qt::TargetMoveAction) == Qt::TargetMoveAction ) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("TargetMoveAction");
- }
- return str;
-}
-
-QString KeyboardModifiersToString(Qt::KeyboardModifiers modifiers)
-{
- QString str;
- if (modifiers & Qt::ControlModifier) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("ControlModifier");
- }
- if (modifiers & Qt::AltModifier) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("AltModifier");
- }
- if (modifiers & Qt::ShiftModifier) {
- if (!str.isEmpty())
- str += QLatin1String(" | ");
- str += QLatin1String("ShiftModifier");
- }
- return str;
-}
+# include <QtCore/QDebug>
#endif
QPlatformDropQtResponse::QPlatformDropQtResponse(bool accepted, Qt::DropAction acceptedAction)
@@ -156,8 +106,7 @@ Qt::DropAction QPlatformDrag::defaultAction(Qt::DropActions possibleActions,
Qt::KeyboardModifiers modifiers) const
{
#ifdef QDND_DEBUG
- qDebug("QDragManager::defaultAction(Qt::DropActions possibleActions)");
- qDebug("keyboard modifiers : %s", qPrintable(KeyboardModifiersToString(modifiers)));
+ qDebug() << "QDragManager::defaultAction(Qt::DropActions possibleActions)\nkeyboard modifiers : " << modifiers;
#endif
Qt::DropAction default_action = Qt::IgnoreAction;
@@ -183,7 +132,7 @@ Qt::DropAction QPlatformDrag::defaultAction(Qt::DropActions possibleActions,
default_action = Qt::LinkAction;
#ifdef QDND_DEBUG
- qDebug("possible actions : %s", qPrintable(dragActionsToString(possibleActions)));
+ qDebug() << "possible actions : " << possibleActions;
#endif
// Check if the action determined is allowed
@@ -199,7 +148,7 @@ Qt::DropAction QPlatformDrag::defaultAction(Qt::DropActions possibleActions,
}
#ifdef QDND_DEBUG
- qDebug("default action : %s", qPrintable(dragActionsToString(default_action)));
+ qDebug() << "default action : " << default_action;
#endif
return default_action;
diff --git a/src/gui/kernel/qplatformdrag.h b/src/gui/kernel/qplatformdrag.h
index ce7a9aa1f2..10ee88477f 100644
--- a/src/gui/kernel/qplatformdrag.h
+++ b/src/gui/kernel/qplatformdrag.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformgraphicsbuffer.cpp b/src/gui/kernel/qplatformgraphicsbuffer.cpp
new file mode 100644
index 0000000000..84fe673bcf
--- /dev/null
+++ b/src/gui/kernel/qplatformgraphicsbuffer.cpp
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformgraphicsbuffer.h"
+#include <QtGui/QOpenGLContext>
+#include <QtGui/QOpenGLFunctions>
+#include <QtGui/qopengl.h>
+#include <QtCore/QDebug>
+
+QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformGraphicsBuffer
+ \inmodule QtGui
+ \since 5.5
+ \brief The QPlatformGraphicsBuffer is a windowsystem abstraction for native graphics buffers
+
+ Different platforms have different ways of representing graphics buffers. On
+ some platforms, it is possible to create one graphics buffer that you can bind
+ to a texture and also get main memory access to the image bits. On the
+ other hand, on some platforms all graphics buffer abstraction is completely
+ hidden.
+
+ QPlatformGraphicsBuffer is an abstraction of a single Graphics Buffer.
+
+ There is no public constructor nor any public factory function.
+
+ QPlatformGraphicsBuffer is intended to be created by using platform specific
+ APIs available from QtPlatformHeaders, or there might be accessor functions
+ similar to the accessor function that QPlatformBackingstore has.
+*/
+
+/*!
+ \enum QPlatformGraphicsBuffer::AccessType
+
+ This enum describes the access that is desired or granted for the graphics
+ buffer.
+
+ \value None
+ \value SWReadAccess
+ \value SWWriteAccess
+ \value TextureAccess
+ \value HWCompositor
+*/
+
+/*!
+ \enum QPlatformGraphicsBuffer::Origin
+
+ This enum describes the origin of the content of the buffer.
+
+ \value OriginTopLeft
+ \value OriginBottomLeft
+*/
+
+/*!
+ Protected constructor to initialize the private members.
+
+ \a size is the size of the buffer.
+ \a format is the format of the buffer.
+
+ \sa size() format()
+*/
+QPlatformGraphicsBuffer::QPlatformGraphicsBuffer(const QSize &size, const QPixelFormat &format)
+ : m_size(size)
+ , m_format(format)
+{
+}
+
+
+/*!
+ Virtual destructor.
+*/
+QPlatformGraphicsBuffer::~QPlatformGraphicsBuffer()
+{
+}
+
+/*!
+ Binds the content of this graphics buffer into the currently bound texture.
+
+ This function should fail for buffers not capable of locking to TextureAccess.
+
+ \a rect is the subrect which is desired to be bounded to the texture. This
+ argument has a no less than semantic, meaning more (if not all) of the buffer
+ can be bounded to the texture. An empty QRect is interpreted as entire buffer
+ should be bound.
+
+ This function only supports binding buffers to the GL_TEXTURE_2D texture
+ target.
+
+ Returns true on success, otherwise false.
+*/
+bool QPlatformGraphicsBuffer::bindToTexture(const QRect &rect) const
+{
+ Q_UNUSED(rect);
+ return false;
+}
+
+/*!
+ \fn QPlatformGraphicsBuffer::AccessTypes QPlatformGraphicsBuffer::isLocked() const
+ Function to check if the buffer is locked.
+
+ \sa lock()
+*/
+
+/*!
+ Before the data can be retrieved or before a buffer can be bound to a
+ texture it needs to be locked. This is a separate function call since this
+ operation might be time consuming, and it would not be satisfactory to do
+ it per function call.
+
+ \a access is the access type wanted.
+
+ \a rect is the subrect which is desired to be locked. This
+ argument has a no less than semantic, meaning more (if not all) of the buffer
+ can be locked. An empty QRect is interpreted as entire buffer should be locked.
+
+ Return true on successfully locking all AccessTypes specified \a access
+ otherwise returns false and no locks have been granted.
+*/
+bool QPlatformGraphicsBuffer::lock(AccessTypes access, const QRect &rect)
+{
+ bool locked = doLock(access, rect);
+ if (locked)
+ m_lock_access |= access;
+
+ return locked;
+}
+
+/*!
+ Unlocks the current buffer lock.
+
+ This function calls doUnlock, and then emits the unlocked signal with the
+ AccessTypes from before doUnlock was called.
+*/
+void QPlatformGraphicsBuffer::unlock()
+{
+ if (m_lock_access == None)
+ return;
+ AccessTypes previous = m_lock_access;
+ doUnlock();
+ m_lock_access = None;
+ emit unlocked(previous);
+}
+
+
+/*!
+ \fn QPlatformGraphicsBuffer::doLock(AccessTypes access, const QRect &rect = QRect())
+
+ This function should be reimplemented by subclasses. If one of the \a
+ access types specified can not be locked, then all should fail and this
+ function should return false.
+
+ \a rect is the subrect which is desired to be locked. This
+ argument has a no less than semantic, meaning more (if not all) of the
+ buffer can be locked. An empty QRect should be interpreted as the entire buffer
+ should be locked.
+
+ It is safe to call isLocked() to verify the current lock state.
+*/
+
+/*!
+ \fn QPlatformGraphicsBuffer::doUnlock()
+
+ This function should remove all locks set on the buffer.
+
+ It is safe to call isLocked() to verify the current lock state.
+*/
+
+/*!
+ \fn QPlatformGraphicsBuffer::unlocked(AccessTypes previousAccessTypes)
+
+ Signal that is emitted after unlocked has been called.
+
+ \a previousAccessTypes is the access types locked before unlock was called.
+*/
+
+/*!
+ Accessor for the bytes of the buffer. This function needs to be called on a
+ buffer with SWReadAccess access lock. Behavior is undefined for modifying
+ the memory returned when not having a SWWriteAccess.
+*/
+const uchar *QPlatformGraphicsBuffer::data() const
+{ return Q_NULLPTR; }
+
+/*!
+ Accessor for the bytes of the buffer. This function needs to be called on a
+ buffer with SWReadAccess access lock. Behavior is undefined for modifying
+ the memory returned when not having a SWWriteAccess.
+*/
+uchar *QPlatformGraphicsBuffer::data()
+{
+ return Q_NULLPTR;
+}
+
+/*!
+ Accessor for the length of the data buffer. This function is a convenience
+ function multiplying height of buffer with bytesPerLine().
+
+ \sa data() bytesPerLine() size()
+*/
+int QPlatformGraphicsBuffer::byteCount() const
+{
+ Q_ASSERT(isLocked() & SWReadAccess);
+ return size().height() * bytesPerLine();
+}
+
+/*!
+ Accessor for bytes per line in the graphics buffer.
+*/
+int QPlatformGraphicsBuffer::bytesPerLine() const
+{
+ return 0;
+}
+
+
+/*!
+ In origin of the content of the graphics buffer.
+
+ Default implementation is OriginTopLeft, as this is the coordinate
+ system default for Qt. However, for most regular OpenGL textures
+ this will be OriginBottomLeft.
+*/
+QPlatformGraphicsBuffer::Origin QPlatformGraphicsBuffer::origin() const
+{
+ return OriginTopLeft;
+}
+
+/*!
+ \fn QPlatformGraphicsBuffer::size() const
+
+ Accessor for content size.
+*/
+
+/*!
+ \fn QPlatformGraphicsBuffer::format() const
+
+ Accessor for the pixel format of the buffer.
+*/
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformgraphicsbuffer.h b/src/gui/kernel/qplatformgraphicsbuffer.h
new file mode 100644
index 0000000000..e13ab783c2
--- /dev/null
+++ b/src/gui/kernel/qplatformgraphicsbuffer.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMGRAPHICSBUFFER_H
+#define QPLATFORMGRAPHICSBUFFER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is part of the QPA API and is not meant to be used
+// in applications. Usage of this API may make your code
+// source and binary incompatible with future versions of Qt.
+//
+
+
+#include <QtCore/QSize>
+#include <QtCore/QRect>
+#include <QtGui/QPixelFormat>
+#include <QtCore/qflags.h>
+#include <QtCore/QObject>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QPlatformGraphicsBuffer : public QObject
+{
+Q_OBJECT
+public:
+ enum AccessType
+ {
+ None = 0x00,
+ SWReadAccess = 0x01,
+ SWWriteAccess = 0x02,
+ TextureAccess = 0x04,
+ HWCompositor = 0x08
+ };
+ Q_DECLARE_FLAGS(AccessTypes, AccessType);
+
+ enum Origin {
+ OriginBottomLeft,
+ OriginTopLeft
+ };
+
+ virtual ~QPlatformGraphicsBuffer();
+
+ AccessTypes isLocked() const { return m_lock_access; }
+ bool lock(AccessTypes access, const QRect &rect = QRect());
+ void unlock();
+
+ virtual bool bindToTexture(const QRect &rect = QRect()) const;
+
+ virtual const uchar *data() const;
+ virtual uchar *data();
+ virtual int bytesPerLine() const;
+ int byteCount() const;
+
+ virtual Origin origin() const;
+
+ QSize size() const { return m_size; }
+ QPixelFormat format() const { return m_format; }
+
+Q_SIGNALS:
+ void unlocked(AccessTypes previousAccessTypes);
+
+protected:
+ QPlatformGraphicsBuffer(const QSize &size, const QPixelFormat &format);
+
+ virtual bool doLock(AccessTypes access, const QRect &rect = QRect()) = 0;
+ virtual void doUnlock() = 0;
+
+private:
+ QSize m_size;
+ QPixelFormat m_format;
+ AccessTypes m_lock_access;
+};
+
+QT_END_NAMESPACE
+
+#endif //QPLATFORMGRAPHICSBUFFER_H
diff --git a/src/gui/kernel/qplatformgraphicsbufferhelper.cpp b/src/gui/kernel/qplatformgraphicsbufferhelper.cpp
new file mode 100644
index 0000000000..2749b05691
--- /dev/null
+++ b/src/gui/kernel/qplatformgraphicsbufferhelper.cpp
@@ -0,0 +1,184 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtPlatformSupport module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qpa/qplatformgraphicsbuffer.h>
+
+#include "qplatformgraphicsbufferhelper.h"
+#include <QtCore/QDebug>
+#include <QtGui/qopengl.h>
+#include <QtGui/QImage>
+#include <QtGui/QOpenGLContext>
+#include <QtGui/QOpenGLFunctions>
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ Convenience function to both lock and bind the buffer to a texture. This
+ function will first try and lock with texture read and texture write
+ access. If this succeeds it will use the bindToTexture function to bind the
+ content to the currently bound texture. If this fail it will try and lock
+ with SWReadAccess and then use the bindSWToTexture convenience function.
+
+ \a swizzle is suppose to be used by the caller to figure out if the Red and
+ Blue color channels need to be swizzled when rendering.
+
+ \a rect is the subrect which is desired to be bounded to the texture. This
+ argument has a no less than semantic, meaning more (if not all) of the buffer
+ can be bounded to the texture. An empty QRect is interpreted as entire buffer
+ should be bound.
+
+ The user should use the AccessTypes returned by isLocked to figure out what
+ lock has been obtained.
+
+ returns true if the buffer has successfully been bound to the currently
+ bound texture, otherwise returns false.
+*/
+bool QPlatformGraphicsBufferHelper::lockAndBindToTexture(QPlatformGraphicsBuffer *graphicsBuffer,
+ bool *swizzle,
+ const QRect &rect)
+{
+ if (graphicsBuffer->lock(QPlatformGraphicsBuffer::TextureAccess)) {
+ if (!graphicsBuffer->bindToTexture(rect)) {
+ qWarning() << Q_FUNC_INFO << "Failed to bind graphicsbuffer to texture";
+ return false;
+ }
+ if (swizzle)
+ *swizzle = false;
+ } else if (graphicsBuffer->lock(QPlatformGraphicsBuffer::SWReadAccess)) {
+ if (!bindSWToTexture(graphicsBuffer, swizzle, rect)) {
+ qWarning() << Q_FUNC_INFO << "Failed to bind SW graphcisbuffer to texture";
+ return false;
+ }
+ } else {
+ qWarning() << Q_FUNC_INFO << "Failed to lock";
+ return false;
+ }
+ return true;
+}
+
+/*!
+ Convenience function that uploads the current raster content to the currently bound texture.
+
+ \a swizzleRandB is suppose to be used by the caller to figure out if the Red and
+ Blue color channels need to be swizzled when rendering. This is an
+ optimization. Qt often renders to software buffers interpreting pixels as
+ unsigned ints. When these buffers are uploaded to textures and each color
+ channel per pixel is interpreted as a byte (read sequentially), then the
+ Red and Blue channels are swapped. Conveniently the Alpha buffer will be
+ correct since Qt historically has had the alpha channel as the first
+ channel, while OpenGL typically expects the alpha channel to be the last
+ channel.
+
+ \a subRect is the subrect which is desired to be bounded to the texture. This
+ argument has a no less than semantic, meaning more (if not all) of the buffer
+ can be bounded to the texture. An empty QRect is interpreted as entire buffer
+ should be bound.
+
+ This function fails for buffers not capable of locking to SWAccess.
+
+ Returns true on success, otherwise false.
+*/
+bool QPlatformGraphicsBufferHelper::bindSWToTexture(const QPlatformGraphicsBuffer *graphicsBuffer,
+ bool *swizzleRandB,
+ const QRect &subRect)
+{
+#ifndef QT_NO_OPENGL
+ if (!QOpenGLContext::currentContext())
+ return false;
+
+ if (!(graphicsBuffer->isLocked() & QPlatformGraphicsBuffer::SWReadAccess))
+ return false;
+
+ QSize size = graphicsBuffer->size();
+
+ Q_ASSERT(subRect.isEmpty() || QRect(QPoint(0,0), size).contains(subRect));
+
+ bool swizzle = false;
+ QImage::Format imageformat = QImage::toImageFormat(graphicsBuffer->format());
+ QImage image(graphicsBuffer->data(), size.width(), size.height(), graphicsBuffer->bytesPerLine(), imageformat);
+ if (graphicsBuffer->bytesPerLine() != (size.width() * 4)) {
+ image = image.convertToFormat(QImage::Format_RGBA8888);
+ } else if (imageformat == QImage::Format_RGB32) {
+ swizzle = true;
+ } else if (imageformat != QImage::Format_RGBA8888) {
+ image = image.convertToFormat(QImage::Format_RGBA8888);
+ }
+
+ QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
+
+ QRect rect = subRect;
+ if (rect.isNull() || rect == QRect(QPoint(0,0),size)) {
+ funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size.width(), size.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, image.constBits());
+ } else {
+#ifndef QT_OPENGL_ES_2
+ if (!QOpenGLContext::currentContext()->isOpenGLES()) {
+ funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width());
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
+ image.constScanLine(rect.y()) + rect.x() * 4);
+ funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+ } else
+#endif
+ {
+ // if the rect is wide enough it's cheaper to just
+ // extend it instead of doing an image copy
+ if (rect.width() >= size.width() / 2) {
+ rect.setX(0);
+ rect.setWidth(size.width());
+ }
+
+ // if the sub-rect is full-width we can pass the image data directly to
+ // OpenGL instead of copying, since there's no gap between scanlines
+
+ if (rect.width() == size.width()) {
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, 0, rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
+ image.constScanLine(rect.y()));
+ } else {
+ funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE,
+ image.copy(rect).constBits());
+ }
+ }
+ }
+ if (swizzleRandB)
+ *swizzleRandB = swizzle;
+
+ return true;
+
+#else
+ Q_UNUSED(graphicsBuffer)
+ Q_UNUSED(swizzleRandB)
+ Q_UNUSED(subRect)
+ return false;
+#endif // QT_NO_OPENGL
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformgraphicsbufferhelper.h b/src/gui/kernel/qplatformgraphicsbufferhelper.h
new file mode 100644
index 0000000000..ded7810608
--- /dev/null
+++ b/src/gui/kernel/qplatformgraphicsbufferhelper.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtPlatformSupport module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMGRAPHICSBUFFERHELPER_H
+#define QPLATFORMGRAPHICSBUFFERHELPER_H
+
+#include <QtGui/qpa/qplatformgraphicsbuffer.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QPlatformGraphicsBufferHelper {
+ bool lockAndBindToTexture(QPlatformGraphicsBuffer *graphicsBuffer, bool *swizzleRandB, const QRect &rect = QRect());
+ bool bindSWToTexture(const QPlatformGraphicsBuffer *graphicsBuffer, bool *swizzleRandB = Q_NULLPTR, const QRect &rect = QRect());
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/kernel/qplatforminputcontext.cpp b/src/gui/kernel/qplatforminputcontext.cpp
index 5937c65cc7..f9ff1d36d9 100644
--- a/src/gui/kernel/qplatforminputcontext.cpp
+++ b/src/gui/kernel/qplatforminputcontext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -163,7 +163,7 @@ QRectF QPlatformInputContext::keyboardRect() const
*/
void QPlatformInputContext::emitKeyboardRectChanged()
{
- emit qApp->inputMethod()->keyboardRectangleChanged();
+ emit QGuiApplication::inputMethod()->keyboardRectangleChanged();
}
/*!
@@ -182,7 +182,7 @@ bool QPlatformInputContext::isAnimating() const
*/
void QPlatformInputContext::emitAnimatingChanged()
{
- emit qApp->inputMethod()->animatingChanged();
+ emit QGuiApplication::inputMethod()->animatingChanged();
}
/*!
@@ -214,7 +214,7 @@ bool QPlatformInputContext::isInputPanelVisible() const
*/
void QPlatformInputContext::emitInputPanelVisibleChanged()
{
- emit qApp->inputMethod()->visibleChanged();
+ emit QGuiApplication::inputMethod()->visibleChanged();
}
QLocale QPlatformInputContext::locale() const
@@ -224,7 +224,7 @@ QLocale QPlatformInputContext::locale() const
void QPlatformInputContext::emitLocaleChanged()
{
- emit qApp->inputMethod()->localeChanged();
+ emit QGuiApplication::inputMethod()->localeChanged();
}
Qt::LayoutDirection QPlatformInputContext::inputDirection() const
@@ -234,7 +234,7 @@ Qt::LayoutDirection QPlatformInputContext::inputDirection() const
void QPlatformInputContext::emitInputDirectionChanged(Qt::LayoutDirection newDirection)
{
- emit qApp->inputMethod()->inputDirectionChanged(newDirection);
+ emit QGuiApplication::inputMethod()->inputDirectionChanged(newDirection);
}
/*!
diff --git a/src/gui/kernel/qplatforminputcontext.h b/src/gui/kernel/qplatforminputcontext.h
index 0c8953f89c..280556e12a 100644
--- a/src/gui/kernel/qplatforminputcontext.h
+++ b/src/gui/kernel/qplatforminputcontext.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatforminputcontext_p.h b/src/gui/kernel/qplatforminputcontext_p.h
index fcf34c036d..7cb06d6625 100644
--- a/src/gui/kernel/qplatforminputcontext_p.h
+++ b/src/gui/kernel/qplatforminputcontext_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatforminputcontextfactory.cpp b/src/gui/kernel/qplatforminputcontextfactory.cpp
index 321550f427..a7660e76ae 100644
--- a/src/gui/kernel/qplatforminputcontextfactory.cpp
+++ b/src/gui/kernel/qplatforminputcontextfactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatforminputcontextfactory_p.h b/src/gui/kernel/qplatforminputcontextfactory_p.h
index 64b610a603..a74c4f5f80 100644
--- a/src/gui/kernel/qplatforminputcontextfactory_p.h
+++ b/src/gui/kernel/qplatforminputcontextfactory_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatforminputcontextplugin.cpp b/src/gui/kernel/qplatforminputcontextplugin.cpp
index 64e8c916c4..87985104d3 100644
--- a/src/gui/kernel/qplatforminputcontextplugin.cpp
+++ b/src/gui/kernel/qplatforminputcontextplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatforminputcontextplugin_p.h b/src/gui/kernel/qplatforminputcontextplugin_p.h
index df302097c3..732eba3e06 100644
--- a/src/gui/kernel/qplatforminputcontextplugin_p.h
+++ b/src/gui/kernel/qplatforminputcontextplugin_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 39b031ef6d..f2a92e10df 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -324,6 +324,16 @@ void QPlatformIntegration::initialize()
}
/*!
+ Called before the platform integration is deleted. Useful when cleanup relies on virtual
+ functions.
+
+ \since 5.5
+*/
+void QPlatformIntegration::destroy()
+{
+}
+
+/*!
Returns the platforms input context.
The default implementation returns 0, implying no input method support.
@@ -376,12 +386,14 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const
return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity);
case UseRtlExtensions:
return QVariant(false);
- case SynthesizeMouseFromTouchEvents:
- return true;
case SetFocusOnTouchRelease:
return QVariant(false);
case MousePressAndHoldInterval:
return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval);
+ case TabFocusBehavior:
+ return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior);
+ case ReplayMousePressOutsidePopup:
+ return true;
}
return 0;
@@ -429,16 +441,35 @@ QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const
This adds the screen to QGuiApplication::screens(), and emits the
QGuiApplication::screenAdded() signal.
- The screen is automatically removed when the QPlatformScreen is destroyed.
+ The screen should be deleted by calling QPlatformIntegration::destroyScreen().
*/
-void QPlatformIntegration::screenAdded(QPlatformScreen *ps)
+void QPlatformIntegration::screenAdded(QPlatformScreen *ps, bool isPrimary)
{
QScreen *screen = new QScreen(ps);
ps->d_func()->screen = screen;
- QGuiApplicationPrivate::screen_list << screen;
+ if (isPrimary) {
+ QGuiApplicationPrivate::screen_list.prepend(screen);
+ } else {
+ QGuiApplicationPrivate::screen_list.append(screen);
+ }
emit qGuiApp->screenAdded(screen);
}
+/*!
+ Should be called by the implementation whenever a screen is removed.
+
+ This removes the screen from QGuiApplication::screens(), and deletes it.
+
+ Failing to call this and manually deleting the QPlatformScreen instead may
+ lead to a crash due to a pure virtual call.
+*/
+void QPlatformIntegration::destroyScreen(QPlatformScreen *screen)
+{
+ QGuiApplicationPrivate::screen_list.removeOne(screen->d_func()->screen);
+ delete screen->d_func()->screen;
+ delete screen;
+}
+
QStringList QPlatformIntegration::themeNames() const
{
return QStringList();
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index d510240fa4..34639e6929 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -109,6 +109,7 @@ public:
// Event dispatcher:
virtual QAbstractEventDispatcher *createEventDispatcher() const = 0;
virtual void initialize();
+ virtual void destroy();
//Deeper window system integrations
virtual QPlatformFontDatabase *fontDatabase() const;
@@ -140,11 +141,12 @@ public:
FontSmoothingGamma,
StartDragVelocity,
UseRtlExtensions,
- SynthesizeMouseFromTouchEvents,
PasswordMaskCharacter,
SetFocusOnTouchRelease,
ShowIsMaximized,
- MousePressAndHoldInterval
+ MousePressAndHoldInterval,
+ TabFocusBehavior,
+ ReplayMousePressOutsidePopup
};
virtual QVariant styleHint(StyleHint hint) const;
@@ -169,7 +171,8 @@ public:
#endif
protected:
- void screenAdded(QPlatformScreen *screen);
+ void screenAdded(QPlatformScreen *screen, bool isPrimary = false);
+ void destroyScreen(QPlatformScreen *screen);
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegrationfactory.cpp b/src/gui/kernel/qplatformintegrationfactory.cpp
index 1d08faa0ab..d58ac3a33f 100644
--- a/src/gui/kernel/qplatformintegrationfactory.cpp
+++ b/src/gui/kernel/qplatformintegrationfactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformintegrationfactory_p.h b/src/gui/kernel/qplatformintegrationfactory_p.h
index fdad8bd71c..2ac0954cc1 100644
--- a/src/gui/kernel/qplatformintegrationfactory_p.h
+++ b/src/gui/kernel/qplatformintegrationfactory_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformintegrationplugin.cpp b/src/gui/kernel/qplatformintegrationplugin.cpp
index e08cc4c339..04d0c2a8e3 100644
--- a/src/gui/kernel/qplatformintegrationplugin.cpp
+++ b/src/gui/kernel/qplatformintegrationplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformintegrationplugin.h b/src/gui/kernel/qplatformintegrationplugin.h
index 915a09a701..b5e0b1874c 100644
--- a/src/gui/kernel/qplatformintegrationplugin.h
+++ b/src/gui/kernel/qplatformintegrationplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformmenu.cpp b/src/gui/kernel/qplatformmenu.cpp
index 7bfd211f4b..cb311b8d13 100644
--- a/src/gui/kernel/qplatformmenu.cpp
+++ b/src/gui/kernel/qplatformmenu.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2014 Martin Graesslin <mgraesslin@kde.org>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformmenu.h b/src/gui/kernel/qplatformmenu.h
index 0093ef1538..baa1e460d7 100644
--- a/src/gui/kernel/qplatformmenu.h
+++ b/src/gui/kernel/qplatformmenu.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author James Turner <james.turner@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -103,6 +103,7 @@ public:
virtual void setText(const QString &text) = 0;
virtual void setIcon(const QIcon &icon) = 0;
virtual void setEnabled(bool enabled) = 0;
+ virtual bool isEnabled() const { return true; }
virtual void setVisible(bool visible) = 0;
virtual void setMinimumWidth(int width) { Q_UNUSED(width); }
virtual void setFont(const QFont &font) { Q_UNUSED(font); }
diff --git a/src/gui/kernel/qplatformnativeinterface.cpp b/src/gui/kernel/qplatformnativeinterface.cpp
index f412b3c420..8fa8debcb9 100644
--- a/src/gui/kernel/qplatformnativeinterface.cpp
+++ b/src/gui/kernel/qplatformnativeinterface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformnativeinterface.h b/src/gui/kernel/qplatformnativeinterface.h
index 53b046913d..71a4e9c768 100644
--- a/src/gui/kernel/qplatformnativeinterface.h
+++ b/src/gui/kernel/qplatformnativeinterface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformoffscreensurface.cpp b/src/gui/kernel/qplatformoffscreensurface.cpp
index 7d1b031b21..bfde0a0ffc 100644
--- a/src/gui/kernel/qplatformoffscreensurface.cpp
+++ b/src/gui/kernel/qplatformoffscreensurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformoffscreensurface.h b/src/gui/kernel/qplatformoffscreensurface.h
index 07bb710eb8..87513f882c 100644
--- a/src/gui/kernel/qplatformoffscreensurface.h
+++ b/src/gui/kernel/qplatformoffscreensurface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -63,7 +63,7 @@ public:
QPlatformScreen *screen() const;
- virtual QSurfaceFormat format() const;
+ virtual QSurfaceFormat format() const Q_DECL_OVERRIDE;
virtual bool isValid() const;
protected:
diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp
index 527bfdd983..b9cf81b30e 100644
--- a/src/gui/kernel/qplatformopenglcontext.cpp
+++ b/src/gui/kernel/qplatformopenglcontext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -89,6 +89,16 @@ QPlatformOpenGLContext::~QPlatformOpenGLContext()
}
/*!
+ Called after a new instance is constructed. The default implementation does nothing.
+
+ Subclasses can use this function to perform additional initialization that relies on
+ virtual functions.
+ */
+void QPlatformOpenGLContext::initialize()
+{
+}
+
+/*!
Reimplement in subclass if your platform uses framebuffer objects for surfaces.
The default implementation returns 0.
diff --git a/src/gui/kernel/qplatformopenglcontext.h b/src/gui/kernel/qplatformopenglcontext.h
index 261b6921a4..a1b781f4e0 100644
--- a/src/gui/kernel/qplatformopenglcontext.h
+++ b/src/gui/kernel/qplatformopenglcontext.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -63,6 +63,8 @@ public:
QPlatformOpenGLContext();
virtual ~QPlatformOpenGLContext();
+ virtual void initialize();
+
virtual QSurfaceFormat format() const = 0;
virtual void swapBuffers(QPlatformSurface *surface) = 0;
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp
index 71710d1cb1..edf546799f 100644
--- a/src/gui/kernel/qplatformscreen.cpp
+++ b/src/gui/kernel/qplatformscreen.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -32,6 +32,7 @@
****************************************************************************/
#include "qplatformscreen.h"
+#include <QtCore/qdebug.h>
#include <QtGui/qguiapplication.h>
#include <qpa/qplatformcursor.h>
#include <QtGui/private/qguiapplication_p.h>
@@ -52,9 +53,11 @@ QPlatformScreen::QPlatformScreen()
QPlatformScreen::~QPlatformScreen()
{
Q_D(QPlatformScreen);
-
- QGuiApplicationPrivate::screen_list.removeOne(d->screen);
- delete d->screen;
+ if (d->screen) {
+ qWarning("Manually deleting a QPlatformScreen. Call QPlatformIntegration::destroyScreen instead.");
+ QGuiApplicationPrivate::screen_list.removeOne(d->screen);
+ delete d->screen;
+ }
}
/*!
@@ -304,4 +307,117 @@ void QPlatformScreen::resizeMaximizedWindows()
}
}
+// i must be power of two
+static int log2(uint i)
+{
+ if (i == 0)
+ return -1;
+
+ int result = 0;
+ while (!(i & 1)) {
+ ++result;
+ i >>= 1;
+ }
+ return result;
+}
+
+int QPlatformScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b)
+{
+ if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
+ qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
+ return 0;
+ }
+
+ if (a == b)
+ return 0;
+
+ int ia = log2(uint(a));
+ int ib = log2(uint(b));
+
+ int delta = ia - ib;
+
+ if (delta < 0)
+ delta = delta + 4;
+
+ int angles[] = { 0, 90, 180, 270 };
+ return angles[delta];
+}
+
+QTransform QPlatformScreen::transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
+{
+ if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
+ qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
+ return QTransform();
+ }
+
+ if (a == b)
+ return QTransform();
+
+ int angle = angleBetween(a, b);
+
+ QTransform result;
+ switch (angle) {
+ case 90:
+ result.translate(target.width(), 0);
+ break;
+ case 180:
+ result.translate(target.width(), target.height());
+ break;
+ case 270:
+ result.translate(0, target.height());
+ break;
+ default:
+ Q_ASSERT(false);
+ }
+ result.rotate(angle);
+
+ return result;
+}
+
+QRect QPlatformScreen::mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
+{
+ if (a == Qt::PrimaryOrientation || b == Qt::PrimaryOrientation) {
+ qWarning() << "Use QScreen version of" << __FUNCTION__ << "when passing Qt::PrimaryOrientation";
+ return rect;
+ }
+
+ if (a == b)
+ return rect;
+
+ if ((a == Qt::PortraitOrientation || a == Qt::InvertedPortraitOrientation)
+ != (b == Qt::PortraitOrientation || b == Qt::InvertedPortraitOrientation))
+ {
+ return QRect(rect.y(), rect.x(), rect.height(), rect.width());
+ }
+
+ return rect;
+}
+
+/*!
+ Returns a hint about this screen's subpixel layout structure.
+
+ The default implementation queries the \b{QT_SUBPIXEL_AA_TYPE} env variable.
+ This is just a hint because most platforms don't have a way to retrieve the correct value from hardware
+ and instead rely on font configurations.
+*/
+QPlatformScreen::SubpixelAntialiasingType QPlatformScreen::subpixelAntialiasingTypeHint() const
+{
+ static int type = -1;
+ if (type == -1) {
+ QByteArray env = qgetenv("QT_SUBPIXEL_AA_TYPE");
+ if (env == "RGB")
+ type = QPlatformScreen::Subpixel_RGB;
+ else if (env == "BGR")
+ type = QPlatformScreen::Subpixel_BGR;
+ else if (env == "VRGB")
+ type = QPlatformScreen::Subpixel_VRGB;
+ else if (env == "VBGR")
+ type = QPlatformScreen::Subpixel_VBGR;
+ else
+ type = QPlatformScreen::Subpixel_None;
+ }
+
+ return static_cast<QPlatformScreen::SubpixelAntialiasingType>(type);
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformscreen.h b/src/gui/kernel/qplatformscreen.h
index 2ca12616b4..551cb788c9 100644
--- a/src/gui/kernel/qplatformscreen.h
+++ b/src/gui/kernel/qplatformscreen.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -74,6 +74,14 @@ class Q_GUI_EXPORT QPlatformScreen
Q_DECLARE_PRIVATE(QPlatformScreen)
public:
+ enum SubpixelAntialiasingType { // copied from qfontengine_p.h since we can't include private headers
+ Subpixel_None,
+ Subpixel_RGB,
+ Subpixel_BGR,
+ Subpixel_VRGB,
+ Subpixel_VBGR
+ };
+
QPlatformScreen();
virtual ~QPlatformScreen();
@@ -107,6 +115,11 @@ public:
virtual QString name() const { return QString(); }
virtual QPlatformCursor *cursor() const;
+ virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint() const;
+
+ static int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b);
+ static QTransform transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target);
+ static QRect mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect);
protected:
void resizeMaximizedWindows();
diff --git a/src/gui/kernel/qplatformscreen_p.h b/src/gui/kernel/qplatformscreen_p.h
index 42a5503461..04c7e4d67f 100644
--- a/src/gui/kernel/qplatformscreen_p.h
+++ b/src/gui/kernel/qplatformscreen_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -52,7 +52,7 @@ class QScreen;
class QPlatformScreenPrivate
{
public:
- QScreen *screen;
+ QPointer<QScreen> screen;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformservices.cpp b/src/gui/kernel/qplatformservices.cpp
index 2188920c86..a37f9d056c 100644
--- a/src/gui/kernel/qplatformservices.cpp
+++ b/src/gui/kernel/qplatformservices.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformservices.h b/src/gui/kernel/qplatformservices.h
index 005748d18c..c4e3797593 100644
--- a/src/gui/kernel/qplatformservices.h
+++ b/src/gui/kernel/qplatformservices.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsessionmanager.cpp b/src/gui/kernel/qplatformsessionmanager.cpp
index 123073d167..b48819bab9 100644
--- a/src/gui/kernel/qplatformsessionmanager.cpp
+++ b/src/gui/kernel/qplatformsessionmanager.cpp
@@ -2,8 +2,8 @@
**
** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
** Copyright (C) 2013 Teo Mrnjavac <teo@kde.org>
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -12,9 +12,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -25,8 +25,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsessionmanager.h b/src/gui/kernel/qplatformsessionmanager.h
index 6fdc681ce4..70e2c065eb 100644
--- a/src/gui/kernel/qplatformsessionmanager.h
+++ b/src/gui/kernel/qplatformsessionmanager.h
@@ -2,8 +2,8 @@
**
** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
** Copyright (C) 2013 Teo Mrnjavac <teo@kde.org>
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -12,9 +12,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -25,8 +25,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsharedgraphicscache.cpp b/src/gui/kernel/qplatformsharedgraphicscache.cpp
index 932775e93d..c364b6207d 100644
--- a/src/gui/kernel/qplatformsharedgraphicscache.cpp
+++ b/src/gui/kernel/qplatformsharedgraphicscache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsharedgraphicscache.h b/src/gui/kernel/qplatformsharedgraphicscache.h
index 258054fbd5..93650fdf8c 100644
--- a/src/gui/kernel/qplatformsharedgraphicscache.h
+++ b/src/gui/kernel/qplatformsharedgraphicscache.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsurface.cpp b/src/gui/kernel/qplatformsurface.cpp
index fa2f3505ba..5a733afb6d 100644
--- a/src/gui/kernel/qplatformsurface.cpp
+++ b/src/gui/kernel/qplatformsurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsurface.h b/src/gui/kernel/qplatformsurface.h
index 915e91bbf1..5e83179bc6 100644
--- a/src/gui/kernel/qplatformsurface.h
+++ b/src/gui/kernel/qplatformsurface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformsystemtrayicon.cpp b/src/gui/kernel/qplatformsystemtrayicon.cpp
index ba1ccc379d..fe2cef1231 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.cpp
+++ b/src/gui/kernel/qplatformsystemtrayicon.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2012 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -118,7 +118,7 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon()
*/
/*!
- \fn void QPlatformSystemTrayIcon::showMessage(const QString &msg, const QString &title,
+ \fn void QPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg,
const QIcon &icon, MessageIcon iconType, int msecs)
Shows a balloon message for the entry with the given \a title, message \a msg and \a icon for
the time specified in \a msecs. \a iconType is used as a hint for the implementing platform.
diff --git a/src/gui/kernel/qplatformsystemtrayicon.h b/src/gui/kernel/qplatformsystemtrayicon.h
index 1317708cd1..437f5e02b1 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.h
+++ b/src/gui/kernel/qplatformsystemtrayicon.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2012 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -69,7 +69,7 @@ public:
virtual void updateToolTip(const QString &tooltip) = 0;
virtual void updateMenu(QPlatformMenu *menu) = 0;
virtual QRect geometry() const = 0;
- virtual void showMessage(const QString &msg, const QString &title,
+ virtual void showMessage(const QString &title, const QString &msg,
const QIcon &icon, MessageIcon iconType, int msecs) = 0;
virtual bool isSystemTrayAvailable() const = 0;
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index 646bd90e56..aa49d64309 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,6 +45,7 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformdialoghelper.h>
+#include <algorithm>
QT_BEGIN_NAMESPACE
@@ -132,8 +133,9 @@ QT_BEGIN_NAMESPACE
\value SpellCheckUnderlineStyle (int) A QTextCharFormat::UnderlineStyle specifying
the underline style used misspelled words when spell checking.
- \value TabAllWidgets (bool) Whether tab navigation should go through all the widgets or components,
- or just through text boxes and list views. This is mostly a Mac feature.
+ \value TabFocusBehavior (int) A Qt::TabFocusBehavior specifying
+ the behavior of focus change when tab key was pressed.
+ This enum value was added in Qt 5.5.
\value DialogSnapToDefaultButton (bool) Whether the mouse should snap to the default button when a dialog
becomes visible.
@@ -313,14 +315,15 @@ const QKeyBinding QPlatformThemePrivate::keyBindings[] = {
{QKeySequence::InsertLineSeparator, 0, Qt::META | Qt::Key_O, KB_Mac},
{QKeySequence::SaveAs, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_S, KB_Gnome | KB_Mac},
{QKeySequence::Preferences, 0, Qt::CTRL | Qt::Key_Comma, KB_Mac},
- {QKeySequence::Quit, 0, Qt::CTRL | Qt::Key_Q, KB_Gnome | KB_KDE | KB_Mac},
+ {QKeySequence::Quit, 0, Qt::CTRL | Qt::Key_Q, KB_X11 | KB_Gnome | KB_KDE | KB_Mac},
{QKeySequence::FullScreen, 1, Qt::META | Qt::CTRL | Qt::Key_F, KB_Mac},
{QKeySequence::FullScreen, 0, Qt::ALT | Qt::Key_Enter, KB_Win},
{QKeySequence::FullScreen, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_F, KB_KDE},
{QKeySequence::FullScreen, 1, Qt::CTRL | Qt::Key_F11, KB_Gnome},
{QKeySequence::FullScreen, 1, Qt::Key_F11, KB_Win | KB_KDE},
{QKeySequence::Deselect, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_A, KB_X11},
- {QKeySequence::DeleteCompleteLine, 0, Qt::CTRL | Qt::Key_U, KB_X11}
+ {QKeySequence::DeleteCompleteLine, 0, Qt::CTRL | Qt::Key_U, KB_X11},
+ {QKeySequence::Backspace, 0, Qt::META | Qt::Key_H, KB_Mac}
};
const uint QPlatformThemePrivate::numberOfKeyBindings = sizeof(QPlatformThemePrivate::keyBindings)/(sizeof(QKeyBinding));
@@ -490,8 +493,8 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
return QVariant(int(0));
case SpellCheckUnderlineStyle:
return QVariant(int(QTextCharFormat::SpellCheckUnderline));
- case TabAllWidgets:
- return QVariant(true);
+ case TabFocusBehavior:
+ return QVariant(int(Qt::TabFocusAllControls));
case IconPixmapSizes:
return QVariant::fromValue(QList<int>());
case DialogSnapToDefaultButton:
@@ -502,9 +505,11 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
case MouseDoubleClickDistance:
{
bool ok = false;
- int dist = qgetenv("QT_DBL_CLICK_DIST").toInt(&ok);
+ const int dist = qEnvironmentVariableIntValue("QT_DBL_CLICK_DIST", &ok);
return QVariant(ok ? dist : 5);
}
+ case WheelScrollLines:
+ return QVariant(3);
}
return QVariant();
}
@@ -565,6 +570,23 @@ static inline int maybeSwapShortcut(int shortcut)
}
#endif
+// mixed-mode predicate: all of these overloads are actually needed (but not all for every compiler)
+struct ByStandardKey {
+ typedef bool result_type;
+
+ bool operator()(QKeySequence::StandardKey lhs, QKeySequence::StandardKey rhs) const
+ { return lhs < rhs; }
+
+ bool operator()(const QKeyBinding& lhs, const QKeyBinding& rhs) const
+ { return operator()(lhs.standardKey, rhs.standardKey); }
+
+ bool operator()(QKeySequence::StandardKey lhs, const QKeyBinding& rhs) const
+ { return operator()(lhs, rhs.standardKey); }
+
+ bool operator()(const QKeyBinding& lhs, QKeySequence::StandardKey rhs) const
+ { return operator()(lhs.standardKey, rhs); }
+};
+
/*!
Returns the key sequence that should be used for a standard action.
@@ -575,62 +597,27 @@ QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) c
const uint platform = QPlatformThemePrivate::currentKeyPlatforms();
QList <QKeySequence> list;
- uint N = QPlatformThemePrivate::numberOfKeyBindings;
- int first = 0;
- int last = N - 1;
+ std::pair<const QKeyBinding *, const QKeyBinding *> range =
+ std::equal_range(QPlatformThemePrivate::keyBindings,
+ QPlatformThemePrivate::keyBindings + QPlatformThemePrivate::numberOfKeyBindings,
+ key, ByStandardKey());
- while (first <= last) {
- int mid = (first + last) / 2;
- const QKeyBinding &midVal = QPlatformThemePrivate::keyBindings[mid];
+ for (const QKeyBinding *it = range.first; it < range.second; ++it) {
+ if (!(it->platform & platform))
+ continue;
- if (key > midVal.standardKey){
- first = mid + 1; // Search in top half
- }
- else if (key < midVal.standardKey){
- last = mid - 1; // Search in bottom half
- }
- else {
- //We may have several equal values for different platforms, so we must search in both directions
- //search forward including current location
- for (unsigned int i = mid; i < N ; ++i) {
- QKeyBinding current = QPlatformThemePrivate::keyBindings[i];
- if (current.standardKey != key)
- break;
- else if (current.platform & platform && current.standardKey == key) {
- uint shortcut =
-#if defined(Q_OS_MACX)
- maybeSwapShortcut(current.shortcut);
-#else
- current.shortcut;
-#endif
- if (current.priority > 0)
- list.prepend(QKeySequence(shortcut));
- else
- list.append(QKeySequence(shortcut));
- }
- }
-
- //search back
- for (int i = mid - 1 ; i >= 0 ; --i) {
- QKeyBinding current = QPlatformThemePrivate::keyBindings[i];
- if (current.standardKey != key)
- break;
- else if (current.platform & platform && current.standardKey == key) {
- uint shortcut =
+ uint shortcut =
#if defined(Q_OS_MACX)
- maybeSwapShortcut(current.shortcut);
+ maybeSwapShortcut(it->shortcut);
#else
- current.shortcut;
+ it->shortcut;
#endif
- if (current.priority > 0)
- list.prepend(QKeySequence(shortcut));
- else
- list.append(QKeySequence(shortcut));
- }
- }
- break;
- }
+ if (it->priority > 0)
+ list.prepend(QKeySequence(shortcut));
+ else
+ list.append(QKeySequence(shortcut));
}
+
return list;
}
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index a41dd8f257..69cc2f90af 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -95,13 +95,19 @@ public:
KeyboardScheme,
UiEffects,
SpellCheckUnderlineStyle,
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ TabFocusBehavior,
+#else
TabAllWidgets,
+ TabFocusBehavior = TabAllWidgets,
+#endif
IconPixmapSizes,
PasswordMaskCharacter,
DialogSnapToDefaultButton,
ContextMenuOnMouseRelease,
MousePressAndHoldInterval,
- MouseDoubleClickDistance
+ MouseDoubleClickDistance,
+ WheelScrollLines
};
enum DialogType {
diff --git a/src/gui/kernel/qplatformtheme_p.h b/src/gui/kernel/qplatformtheme_p.h
index e8b118d7b3..3ca17a63f7 100644
--- a/src/gui/kernel/qplatformtheme_p.h
+++ b/src/gui/kernel/qplatformtheme_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformthemefactory.cpp b/src/gui/kernel/qplatformthemefactory.cpp
index 4ac73394b5..d4902ac163 100644
--- a/src/gui/kernel/qplatformthemefactory.cpp
+++ b/src/gui/kernel/qplatformthemefactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformthemefactory_p.h b/src/gui/kernel/qplatformthemefactory_p.h
index fc07080307..1df4fd0d27 100644
--- a/src/gui/kernel/qplatformthemefactory_p.h
+++ b/src/gui/kernel/qplatformthemefactory_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformthemeplugin.cpp b/src/gui/kernel/qplatformthemeplugin.cpp
index 37406cebdc..4bc325b04f 100644
--- a/src/gui/kernel/qplatformthemeplugin.cpp
+++ b/src/gui/kernel/qplatformthemeplugin.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformthemeplugin.h b/src/gui/kernel/qplatformthemeplugin.h
index 2b444f5ff6..48e1d9b50e 100644
--- a/src/gui/kernel/qplatformthemeplugin.h
+++ b/src/gui/kernel/qplatformthemeplugin.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 754395592c..114fcf8062 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -79,11 +79,13 @@ QPlatformWindow *QPlatformWindow::parent() const
}
/*!
- Returns the platform screen handle corresponding to this platform window.
+ Returns the platform screen handle corresponding to this platform window,
+ or null if the window is not associated with a screen.
*/
QPlatformScreen *QPlatformWindow::screen() const
{
- return window()->screen()->handle();
+ QScreen *scr = window()->screen();
+ return scr ? scr->handle() : Q_NULLPTR;
}
/*!
@@ -453,7 +455,7 @@ bool QPlatformWindow::frameStrutEventsEnabled() const
QString QPlatformWindow::formatWindowTitle(const QString &title, const QString &separator)
{
QString fullTitle = title;
- if (QGuiApplicationPrivate::displayName) {
+ if (QGuiApplicationPrivate::displayName && !title.endsWith(*QGuiApplicationPrivate::displayName)) {
// Append display name, if set.
if (!fullTitle.isEmpty())
fullTitle += separator;
@@ -479,7 +481,7 @@ QString QPlatformWindow::formatWindowTitle(const QString &title, const QString &
QPlatformScreen *QPlatformWindow::screenForGeometry(const QRect &newGeometry) const
{
QPlatformScreen *currentScreen = screen();
- if (!parent() && !currentScreen->geometry().intersects(newGeometry)) {
+ if (!parent() && currentScreen && !currentScreen->geometry().intersects(newGeometry)) {
Q_FOREACH (QPlatformScreen* screen, currentScreen->virtualSiblings()) {
if (screen->geometry().intersects(newGeometry))
return screen;
@@ -595,6 +597,36 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w,
}
/*!
+ Requests an QEvent::UpdateRequest event. The event will be
+ delivered to the QWindow.
+
+ QPlatformWindow subclasses can re-implement this function to
+ provide display refresh synchronized updates. The event
+ should be delivered using QWindowPrivate::deliverUpdateRequest()
+ to not get out of sync with the the internal state of QWindow.
+
+ The default implementation posts an UpdateRequest event to the
+ window after 5 ms. The additional time is there to give the event
+ loop a bit of idle time to gather system events.
+
+*/
+void QPlatformWindow::requestUpdate()
+{
+ static int timeout = -1;
+ if (timeout == -1) {
+ bool ok = false;
+ timeout = qEnvironmentVariableIntValue("QT_QPA_UPDATE_IDLE_TIME", &ok);
+ if (!ok)
+ timeout = 5;
+ }
+
+ QWindow *w = window();
+ QWindowPrivate *wp = (QWindowPrivate *) QObjectPrivate::get(w);
+ Q_ASSERT(wp->updateTimer == 0);
+ wp->updateTimer = w->startTimer(timeout, Qt::PreciseTimer);
+}
+
+/*!
\class QPlatformWindow
\since 4.8
\internal
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 5c351a69d2..c7c1efdc58 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -72,7 +72,7 @@ public:
QPlatformScreen *screen() const;
- virtual QSurfaceFormat format() const;
+ virtual QSurfaceFormat format() const Q_DECL_OVERRIDE;
virtual void setGeometry(const QRect &rect);
virtual QRect geometry() const;
@@ -129,6 +129,7 @@ public:
static QRect initialGeometry(const QWindow *w,
const QRect &initialGeometry, int defaultWidth, int defaultHeight);
+ virtual void requestUpdate();
protected:
static QString formatWindowTitle(const QString &title, const QString &separator);
QPlatformScreen *screenForGeometry(const QRect &newGeometry) const;
diff --git a/src/gui/kernel/qplatformwindow_p.h b/src/gui/kernel/qplatformwindow_p.h
index 32c09c24ca..2205085cf4 100644
--- a/src/gui/kernel/qplatformwindow_p.h
+++ b/src/gui/kernel/qplatformwindow_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qrasterwindow.cpp b/src/gui/kernel/qrasterwindow.cpp
index f89f38a32d..c04eb71420 100644
--- a/src/gui/kernel/qrasterwindow.cpp
+++ b/src/gui/kernel/qrasterwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
- ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
- ** Contact: http://www.qt-project.org/legal
+ ** Copyright (C) 2015 The Qt Company Ltd.
+ ** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
+ ** a written agreement between you and The Qt Company. For licensing terms
+ ** and conditions see http://www.qt.io/terms-conditions. For further
+ ** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
+ ** As a special exception, The Qt Company gives you certain additional
+ ** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qrasterwindow.h b/src/gui/kernel/qrasterwindow.h
index aa86d991a9..4912efad37 100644
--- a/src/gui/kernel/qrasterwindow.h
+++ b/src/gui/kernel/qrasterwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index ed6e8ddccc..038be09dc7 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -72,8 +72,35 @@ QScreen::QScreen(QPlatformScreen *screen)
*/
QScreen::~QScreen()
{
- if (qApp)
- Q_EMIT qApp->screenRemoved(this);
+ if (!qApp)
+ return;
+
+ // Allow clients to manage windows that are affected by the screen going
+ // away, before we fall back to moving them to the primary screen.
+ emit qApp->screenRemoved(this);
+
+ if (QGuiApplication::closingDown())
+ return;
+
+ QScreen *primaryScreen = QGuiApplication::primaryScreen();
+ if (this == primaryScreen)
+ return;
+
+ bool movingFromVirtualSibling = primaryScreen && primaryScreen->handle()->virtualSiblings().contains(handle());
+
+ // Move any leftover windows to the primary screen
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
+ if (window->screen() != this)
+ continue;
+
+ const bool wasVisible = window->isVisible();
+ window->setScreen(primaryScreen);
+
+ // Re-show window if moved from a virtual sibling screen. Otherwise
+ // leave it up to the application developer to show the window.
+ if (movingFromVirtualSibling)
+ window->setVisible(wasVisible);
+ }
}
/*!
@@ -217,9 +244,14 @@ qreal QScreen::logicalDotsPerInch() const
}
/*!
+ \property QScreen::devicePixelRatio
+ \brief the screen's ratio between physical pixels and device-independent pixels
+ \since 5.5
+
Returns the ratio between physical pixels and device-independent pixels for the screen.
- Common values are 1.0 on normal displays and 2.0 on Apple "retina" displays.
+ Common values are 1.0 on normal displays and 2.0 on "retina" displays.
+ Higher values are also possible.
\sa QWindow::devicePixelRatio(), QGuiApplication::devicePixelRatio()
*/
@@ -467,20 +499,6 @@ Qt::ScreenOrientation QScreen::nativeOrientation() const
return d->platformScreen->nativeOrientation();
}
-// i must be power of two
-static int log2(uint i)
-{
- if (i == 0)
- return -1;
-
- int result = 0;
- while (!(i & 1)) {
- ++result;
- i >>= 1;
- }
- return result;
-}
-
/*!
Convenience function to compute the angle of rotation to get from
rotation \a a to rotation \a b.
@@ -497,19 +515,7 @@ int QScreen::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) cons
if (b == Qt::PrimaryOrientation)
b = primaryOrientation();
- if (a == b)
- return 0;
-
- int ia = log2(uint(a));
- int ib = log2(uint(b));
-
- int delta = ia - ib;
-
- if (delta < 0)
- delta = delta + 4;
-
- int angles[] = { 0, 90, 180, 270 };
- return angles[delta];
+ return QPlatformScreen::angleBetween(a, b);
}
/*!
@@ -532,28 +538,7 @@ QTransform QScreen::transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientat
if (b == Qt::PrimaryOrientation)
b = primaryOrientation();
- if (a == b)
- return QTransform();
-
- int angle = angleBetween(a, b);
-
- QTransform result;
- switch (angle) {
- case 90:
- result.translate(target.width(), 0);
- break;
- case 180:
- result.translate(target.width(), target.height());
- break;
- case 270:
- result.translate(0, target.height());
- break;
- default:
- Q_ASSERT(false);
- }
- result.rotate(angle);
-
- return result;
+ return QPlatformScreen::transformBetween(a, b, target);
}
/*!
@@ -573,16 +558,7 @@ QRect QScreen::mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, cons
if (b == Qt::PrimaryOrientation)
b = primaryOrientation();
- if (a == b)
- return rect;
-
- if ((a == Qt::PortraitOrientation || a == Qt::InvertedPortraitOrientation)
- != (b == Qt::PortraitOrientation || b == Qt::InvertedPortraitOrientation))
- {
- return QRect(rect.y(), rect.x(), rect.height(), rect.width());
- }
-
- return rect;
+ return QPlatformScreen::mapBetween(a, b, rect);
}
/*!
diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h
index 766b3d8f6b..255e735baf 100644
--- a/src/gui/kernel/qscreen.h
+++ b/src/gui/kernel/qscreen.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -75,6 +75,7 @@ class Q_GUI_EXPORT QScreen : public QObject
Q_PROPERTY(qreal logicalDotsPerInchX READ logicalDotsPerInchX NOTIFY logicalDotsPerInchChanged)
Q_PROPERTY(qreal logicalDotsPerInchY READ logicalDotsPerInchY NOTIFY logicalDotsPerInchChanged)
Q_PROPERTY(qreal logicalDotsPerInch READ logicalDotsPerInch NOTIFY logicalDotsPerInchChanged)
+ Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY physicalDotsPerInchChanged)
Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged)
Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged)
Q_PROPERTY(Qt::ScreenOrientation nativeOrientation READ nativeOrientation)
diff --git a/src/gui/kernel/qscreen_p.h b/src/gui/kernel/qscreen_p.h
index 53d4f3404a..d341b71932 100644
--- a/src/gui/kernel/qscreen_p.h
+++ b/src/gui/kernel/qscreen_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp
index b67ba4a5a6..b54b7b468c 100644
--- a/src/gui/kernel/qsessionmanager.cpp
+++ b/src/gui/kernel/qsessionmanager.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qsessionmanager.h b/src/gui/kernel/qsessionmanager.h
index 5df7d80948..36aa391252 100644
--- a/src/gui/kernel/qsessionmanager.h
+++ b/src/gui/kernel/qsessionmanager.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qsessionmanager_p.h b/src/gui/kernel/qsessionmanager_p.h
index 9038325dba..894996242b 100644
--- a/src/gui/kernel/qsessionmanager_p.h
+++ b/src/gui/kernel/qsessionmanager_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qshapedpixmapdndwindow.cpp b/src/gui/kernel/qshapedpixmapdndwindow.cpp
index c8e9c2544d..253a09e407 100644
--- a/src/gui/kernel/qshapedpixmapdndwindow.cpp
+++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h
index 04198c83cb..ec56573195 100644
--- a/src/gui/kernel/qshapedpixmapdndwindow_p.h
+++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -66,7 +66,7 @@ public:
void updateGeometry();
protected:
- void exposeEvent(QExposeEvent *);
+ void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE;
private:
QBackingStore *m_backingStore;
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index cad707ab70..0ff5c36119 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -88,14 +88,16 @@ struct QShortcutEntry
/*! \internal
QDebug operator<< for easy debug output of the shortcut entries.
*/
-static QDebug &operator<<(QDebug &dbg, const QShortcutEntry *se) {
+static QDebug &operator<<(QDebug &dbg, const QShortcutEntry *se)
+{
+ QDebugStateSaver saver(dbg);
if (!se)
return dbg << "QShortcutEntry(0x0)";
dbg.nospace()
<< "QShortcutEntry(" << se->keyseq
<< "), id(" << se->id << "), enabled(" << se->enabled << "), autorepeat(" << se->autorepeat
<< "), owner(" << se->owner << ')';
- return dbg.space();
+ return dbg;
}
#endif // QT_NO_DEBUGSTREAM
@@ -310,6 +312,10 @@ QKeySequence::SequenceMatch QShortcutMap::state()
Uses ShortcutOverride event to see if any widgets want to override
the event. If not, uses nextState(QKeyEvent) to check for a grabbed
Shortcut, and dispatchEvent() is found and identical.
+
+ \note that this function should only be called from QWindowSystemInterface,
+ otherwise it will result in duplicate events.
+
\sa nextState, dispatchEvent
*/
bool QShortcutMap::tryShortcutEvent(QObject *o, QKeyEvent *e)
diff --git a/src/gui/kernel/qshortcutmap_p.h b/src/gui/kernel/qshortcutmap_p.h
index b2e0945d4b..242c021ca4 100644
--- a/src/gui/kernel/qshortcutmap_p.h
+++ b/src/gui/kernel/qshortcutmap_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
index a2412008f8..090e88c118 100644
--- a/src/gui/kernel/qsimpledrag.cpp
+++ b/src/gui/kernel/qsimpledrag.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -255,18 +255,18 @@ void QBasicDrag::updateCursor(Qt::DropAction action)
}
}
- QCursor *cursor = qApp->overrideCursor();
+ QCursor *cursor = QGuiApplication::overrideCursor();
QPixmap pixmap = m_drag->dragCursor(action);
if (!cursor) {
- qApp->changeOverrideCursor((pixmap.isNull()) ? QCursor(cursorShape) : QCursor(pixmap));
+ QGuiApplication::changeOverrideCursor((pixmap.isNull()) ? QCursor(cursorShape) : QCursor(pixmap));
} else {
if (!pixmap.isNull()) {
if ((cursor->pixmap().cacheKey() != pixmap.cacheKey())) {
- qApp->changeOverrideCursor(QCursor(pixmap));
+ QGuiApplication::changeOverrideCursor(QCursor(pixmap));
}
} else {
if (cursorShape != cursor->shape()) {
- qApp->changeOverrideCursor(QCursor(cursorShape));
+ QGuiApplication::changeOverrideCursor(QCursor(cursorShape));
}
}
}
diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h
index 8ef8f99616..7812f8b863 100644
--- a/src/gui/kernel/qsimpledrag_p.h
+++ b/src/gui/kernel/qsimpledrag_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -64,9 +64,9 @@ class Q_GUI_EXPORT QBasicDrag : public QPlatformDrag, public QObject
public:
virtual ~QBasicDrag();
- virtual Qt::DropAction drag(QDrag *drag);
+ virtual Qt::DropAction drag(QDrag *drag) Q_DECL_OVERRIDE;
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE;
protected:
QBasicDrag();
@@ -106,13 +106,13 @@ class Q_GUI_EXPORT QSimpleDrag : public QBasicDrag
{
public:
QSimpleDrag();
- virtual QMimeData *platformDropData();
+ virtual QMimeData *platformDropData() Q_DECL_OVERRIDE;
protected:
- virtual void startDrag();
- virtual void cancel();
- virtual void move(const QMouseEvent *me);
- virtual void drop(const QMouseEvent *me);
+ virtual void startDrag() Q_DECL_OVERRIDE;
+ virtual void cancel() Q_DECL_OVERRIDE;
+ virtual void move(const QMouseEvent *me) Q_DECL_OVERRIDE;
+ virtual void drop(const QMouseEvent *me) Q_DECL_OVERRIDE;
private:
QWindow *m_current_window;
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 125e59aa5f..b7af2e759f 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -35,6 +35,7 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformtheme.h>
#include <private/qguiapplication_p.h>
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -46,6 +47,10 @@ static inline QVariant hint(QPlatformIntegration::StyleHint h)
static inline QVariant themeableHint(QPlatformTheme::ThemeHint th,
QPlatformIntegration::StyleHint ih)
{
+ if (!QCoreApplication::instance()) {
+ qWarning() << "Must construct a QGuiApplication before accessing a platform theme hint.";
+ return QVariant();
+ }
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
const QVariant themeHint = theme->themeHint(th);
if (themeHint.isValid())
@@ -104,11 +109,15 @@ QStyleHints::QStyleHints()
void QStyleHints::setMouseDoubleClickInterval(int mouseDoubleClickInterval)
{
Q_D(QStyleHints);
+ if (d->m_mouseDoubleClickInterval == mouseDoubleClickInterval)
+ return;
d->m_mouseDoubleClickInterval = mouseDoubleClickInterval;
+ emit mouseDoubleClickIntervalChanged(mouseDoubleClickInterval);
}
/*!
- Returns the time limit in milliseconds that distinguishes a double click
+ \property QStyleHints::mouseDoubleClickInterval
+ \brief the time limit in milliseconds that distinguishes a double click
from two consecutive mouse clicks.
*/
int QStyleHints::mouseDoubleClickInterval() const
@@ -120,7 +129,8 @@ int QStyleHints::mouseDoubleClickInterval() const
}
/*!
- Returns the time limit in milliseconds that activates
+ \property QStyleHints::mousePressAndHoldInterval
+ \brief the time limit in milliseconds that activates
a press and hold.
\since 5.3
@@ -139,11 +149,15 @@ int QStyleHints::mousePressAndHoldInterval() const
void QStyleHints::setStartDragDistance(int startDragDistance)
{
Q_D(QStyleHints);
+ if (d->m_startDragDistance == startDragDistance)
+ return;
d->m_startDragDistance = startDragDistance;
+ emit startDragDistanceChanged(startDragDistance);
}
/*!
- Returns the distance, in pixels, that the mouse must be moved with a button
+ \property QStyleHints::startDragDistance
+ \brief the distance, in pixels, that the mouse must be moved with a button
held down before a drag and drop operation will begin.
If you support drag and drop in your application, and want to start a drag
@@ -157,7 +171,7 @@ void QStyleHints::setStartDragDistance(int startDragDistance)
\snippet code/src_gui_kernel_qapplication.cpp 6
- \sa startDragTime(), QPoint::manhattanLength(), {Drag and Drop}
+ \sa startDragTime, QPoint::manhattanLength(), {Drag and Drop}
*/
int QStyleHints::startDragDistance() const
{
@@ -176,18 +190,22 @@ int QStyleHints::startDragDistance() const
void QStyleHints::setStartDragTime(int startDragTime)
{
Q_D(QStyleHints);
+ if (d->m_startDragTime == startDragTime)
+ return;
d->m_startDragTime = startDragTime;
+ emit startDragTimeChanged(startDragTime);
}
/*!
- Returns the time, in milliseconds, that a mouse button must be held down
+ \property QStyleHints::startDragTime
+ \brief the time, in milliseconds, that a mouse button must be held down
before a drag and drop operation will begin.
If you support drag and drop in your application, and want to start a drag
and drop operation after the user has held down a mouse button for a
certain amount of time, you should use this property's value as the delay.
- \sa startDragDistance(), {Drag and Drop}
+ \sa startDragDistance, {Drag and Drop}
*/
int QStyleHints::startDragTime() const
{
@@ -198,11 +216,12 @@ int QStyleHints::startDragTime() const
}
/*!
- Returns the limit for the velocity, in pixels per second, that the mouse may
+ \property QStyleHints::startDragVelocity
+ \brief the limit for the velocity, in pixels per second, that the mouse may
be moved, with a button held down, for a drag and drop operation to begin.
A value of 0 means there is no such limit.
- \sa startDragDistance(), {Drag and Drop}
+ \sa startDragDistance, {Drag and Drop}
*/
int QStyleHints::startDragVelocity() const
{
@@ -218,11 +237,15 @@ int QStyleHints::startDragVelocity() const
void QStyleHints::setKeyboardInputInterval(int keyboardInputInterval)
{
Q_D(QStyleHints);
+ if (d->m_keyboardInputInterval == keyboardInputInterval)
+ return;
d->m_keyboardInputInterval = keyboardInputInterval;
+ emit keyboardInputIntervalChanged(keyboardInputInterval);
}
/*!
- Returns the time limit, in milliseconds, that distinguishes a key press
+ \property QStyleHints::keyboardInputInterval
+ \brief the time limit, in milliseconds, that distinguishes a key press
from two consecutive key presses.
*/
int QStyleHints::keyboardInputInterval() const
@@ -234,7 +257,8 @@ int QStyleHints::keyboardInputInterval() const
}
/*!
- Returns the rate, in events per second, in which additional repeated key
+ \property QStyleHints::keyboardAutoRepeatRate
+ \brief the rate, in events per second, in which additional repeated key
presses will automatically be generated if a key is being held down.
*/
int QStyleHints::keyboardAutoRepeatRate() const
@@ -251,11 +275,15 @@ int QStyleHints::keyboardAutoRepeatRate() const
void QStyleHints::setCursorFlashTime(int cursorFlashTime)
{
Q_D(QStyleHints);
+ if (d->m_cursorFlashTime == cursorFlashTime)
+ return;
d->m_cursorFlashTime = cursorFlashTime;
+ emit cursorFlashTimeChanged(cursorFlashTime);
}
/*!
- Returns the text cursor's flash (blink) time in milliseconds.
+ \property QStyleHints::cursorFlashTime
+ \brief the text cursor's flash (blink) time in milliseconds.
The flash time is the time used to display, invert and restore the
caret display. Usually the text cursor is displayed for half the cursor
@@ -270,11 +298,12 @@ int QStyleHints::cursorFlashTime() const
}
/*!
- Returns \c true if the platform defaults to windows being fullscreen,
+ \property QStyleHints::showIsFullScreen
+ \brief \c true if the platform defaults to windows being fullscreen,
otherwise \c false.
\note The platform may still choose to show certain windows non-fullscreen,
- such as popups or dialogs. This method only returns the default behavior.
+ such as popups or dialogs. This property only reports the default behavior.
\sa QWindow::show()
*/
@@ -284,7 +313,8 @@ bool QStyleHints::showIsFullScreen() const
}
/*!
- Returns the time, in milliseconds, a typed letter is displayed unshrouded
+ \property QStyleHints::passwordMaskDelay
+ \brief the time, in milliseconds, a typed letter is displayed unshrouded
in a text input field in password mode.
*/
int QStyleHints::passwordMaskDelay() const
@@ -293,7 +323,8 @@ int QStyleHints::passwordMaskDelay() const
}
/*!
- Returns the character used to mask the characters typed into text input
+ \property QStyleHints::passwordMaskCharacter
+ \brief the character used to mask the characters typed into text input
fields in password mode.
*/
QChar QStyleHints::passwordMaskCharacter() const
@@ -302,7 +333,8 @@ QChar QStyleHints::passwordMaskCharacter() const
}
/*!
- Returns the gamma value used in font smoothing.
+ \property QStyleHints::fontSmoothingGamma
+ \brief the gamma value used in font smoothing.
*/
qreal QStyleHints::fontSmoothingGamma() const
{
@@ -310,7 +342,8 @@ qreal QStyleHints::fontSmoothingGamma() const
}
/*!
- Returns \c true if right-to-left writing direction is enabled,
+ \property QStyleHints::useRtlExtensions
+ \brief \c true if right-to-left writing direction is enabled,
otherwise \c false.
*/
bool QStyleHints::useRtlExtensions() const
@@ -319,7 +352,8 @@ bool QStyleHints::useRtlExtensions() const
}
/*!
- Returns \c true if focus objects (line edits etc) should receive
+ \property QStyleHints::setFocusOnTouchRelease
+ \brief \c true if focus objects (line edits etc) should receive
input focus after a touch/mouse release. This is normal behavior on
touch platforms. On desktop platforms, the standard is to set
focus already on touch/mouse press.
@@ -329,4 +363,18 @@ bool QStyleHints::setFocusOnTouchRelease() const
return hint(QPlatformIntegration::SetFocusOnTouchRelease).toBool();
}
+/*!
+ \property QStyleHints::tabFocusBehavior
+ \since 5.5
+ \brief The focus behavior on press of the tab key.
+
+ \note Do not bind this value in QML because the change notifier
+ signal is not implemented yet.
+*/
+
+Qt::TabFocusBehavior QStyleHints::tabFocusBehavior() const
+{
+ return Qt::TabFocusBehavior(themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt());
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h
index 09807ecb24..5fbc851ee9 100644
--- a/src/gui/kernel/qstylehints.h
+++ b/src/gui/kernel/qstylehints.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -46,6 +46,22 @@ class Q_GUI_EXPORT QStyleHints : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QStyleHints)
+ Q_PROPERTY(int cursorFlashTime READ cursorFlashTime NOTIFY cursorFlashTimeChanged FINAL)
+ Q_PROPERTY(qreal fontSmoothingGamma READ fontSmoothingGamma STORED false CONSTANT FINAL)
+ Q_PROPERTY(int keyboardAutoRepeatRate READ keyboardAutoRepeatRate STORED false CONSTANT FINAL)
+ Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval NOTIFY keyboardInputIntervalChanged FINAL)
+ Q_PROPERTY(int mouseDoubleClickInterval READ mouseDoubleClickInterval NOTIFY mouseDoubleClickIntervalChanged FINAL)
+ Q_PROPERTY(int mousePressAndHoldInterval READ mousePressAndHoldInterval STORED false CONSTANT FINAL)
+ Q_PROPERTY(QChar passwordMaskCharacter READ passwordMaskCharacter STORED false CONSTANT FINAL)
+ Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay STORED false CONSTANT FINAL)
+ Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL)
+ Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL)
+ Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL)
+ Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL)
+ Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL)
+ Q_PROPERTY(bool useRtlExtensions READ useRtlExtensions STORED false CONSTANT FINAL)
+ Q_PROPERTY(Qt::TabFocusBehavior tabFocusBehavior READ tabFocusBehavior STORED false CONSTANT FINAL)
+
public:
void setMouseDoubleClickInterval(int mouseDoubleClickInterval);
int mouseDoubleClickInterval() const;
@@ -66,6 +82,14 @@ public:
qreal fontSmoothingGamma() const;
bool useRtlExtensions() const;
bool setFocusOnTouchRelease() const;
+ Qt::TabFocusBehavior tabFocusBehavior() const;
+
+Q_SIGNALS:
+ void cursorFlashTimeChanged(int cursorFlashTime);
+ void keyboardInputIntervalChanged(int keyboardInputInterval);
+ void mouseDoubleClickIntervalChanged(int mouseDoubleClickInterval);
+ void startDragDistanceChanged(int startDragDistance);
+ void startDragTimeChanged(int startDragTime);
private:
friend class QGuiApplication;
diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp
index b16191e65a..70cefd2cde 100644
--- a/src/gui/kernel/qsurface.cpp
+++ b/src/gui/kernel/qsurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qsurface.h b/src/gui/kernel/qsurface.h
index 58b7ce018e..53ede202a2 100644
--- a/src/gui/kernel/qsurface.h
+++ b/src/gui/kernel/qsurface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -36,7 +36,7 @@
#include <QtCore/qnamespace.h>
#include <QtGui/qsurfaceformat.h>
-
+#include <QtCore/qmetatype.h>
#include <QtCore/qsize.h>
QT_BEGIN_NAMESPACE
@@ -82,4 +82,6 @@ protected:
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QSurface*)
+
#endif //QSURFACE_H
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index b7f8e375a4..d078336d73 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -128,6 +128,10 @@ public:
\value DeprecatedFunctions Used to request that deprecated functions be included
in the OpenGL context profile. If not specified, you should get a forward compatible context
without support functionality marked as deprecated. This requires OpenGL version 3.0 or higher.
+ \value ResetNotification Enables notifications about resets of the OpenGL context. The status is then
+ queryable via the context's \l{QOpenGLContext::isValid()}{isValid()} function. Note that not setting
+ this flag does not guarantee that context state loss never occurs. Additionally, some implementations
+ may choose to report context loss regardless of this flag.
*/
/*!
@@ -181,7 +185,7 @@ public:
in the set OpenGL version you can use the QSurfaceFormat format option
QSurfaceFormat::DeprecatedFunctions.
- \value NoProfile OpenGL version is lower than 3.2.
+ \value NoProfile OpenGL version is lower than 3.2. For 3.2 and newer this is same as CoreProfile.
\value CoreProfile Functionality deprecated in OpenGL version 3.0 is not available.
\value CompatibilityProfile Functionality from earlier OpenGL versions is available.
*/
@@ -743,6 +747,12 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format)
and surfaces, even the ones created internally by Qt, will use the same
format.
+ \note When setting Qt::AA_ShareOpenGLContexts, it is strongly recommended to
+ place the call to this function before the construction of the
+ QGuiApplication or QApplication. Otherwise \a format will not be applied to
+ the global share context and therefore issues may arise with context sharing
+ afterwards.
+
\since 5.4
\sa defaultFormat()
*/
@@ -802,6 +812,7 @@ bool operator!=(const QSurfaceFormat& a, const QSurfaceFormat& b)
QDebug operator<<(QDebug dbg, const QSurfaceFormat &f)
{
const QSurfaceFormatPrivate * const d = f.d;
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QSurfaceFormat("
<< "version " << d->major << '.' << d->minor
@@ -818,7 +829,7 @@ QDebug operator<<(QDebug dbg, const QSurfaceFormat &f)
<< ", profile " << d->profile
<< ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h
index b33f4d1f6b..c68e585371 100644
--- a/src/gui/kernel/qsurfaceformat.h
+++ b/src/gui/kernel/qsurfaceformat.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -48,7 +48,8 @@ public:
enum FormatOption {
StereoBuffers = 0x0001,
DebugContext = 0x0002,
- DeprecatedFunctions = 0x0004
+ DeprecatedFunctions = 0x0004,
+ ResetNotification = 0x0008
};
Q_DECLARE_FLAGS(FormatOptions, FormatOption)
diff --git a/src/gui/kernel/qt_gui_pch.h b/src/gui/kernel/qt_gui_pch.h
index 38ded60818..02a9649b9a 100644
--- a/src/gui/kernel/qt_gui_pch.h
+++ b/src/gui/kernel/qt_gui_pch.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qtouchdevice.cpp b/src/gui/kernel/qtouchdevice.cpp
index 8641af149e..8737825de0 100644
--- a/src/gui/kernel/qtouchdevice.cpp
+++ b/src/gui/kernel/qtouchdevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -96,6 +96,9 @@ QT_BEGIN_NAMESPACE
\value NormalizedPosition Indicates that the normalized position is available, meaning that normalizedPos()
returns a valid value.
+
+ \value MouseEmulation Indicates that the device synthesizes mouse events.
+ This enum value has been introduced in Qt 5.5.
*/
/*!
diff --git a/src/gui/kernel/qtouchdevice.h b/src/gui/kernel/qtouchdevice.h
index f6ab12d65b..f2157ce2d6 100644
--- a/src/gui/kernel/qtouchdevice.h
+++ b/src/gui/kernel/qtouchdevice.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -55,7 +55,8 @@ public:
Pressure = 0x0004,
Velocity = 0x0008,
RawPositions = 0x0010,
- NormalizedPosition = 0x0020
+ NormalizedPosition = 0x0020,
+ MouseEmulation = 0x0040
};
Q_DECLARE_FLAGS(Capabilities, CapabilityFlag)
diff --git a/src/gui/kernel/qtouchdevice_p.h b/src/gui/kernel/qtouchdevice_p.h
index 18a2291147..9c0bcf3414 100644
--- a/src/gui/kernel/qtouchdevice_p.h
+++ b/src/gui/kernel/qtouchdevice_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 6561e0f502..c0f953bcef 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -338,26 +338,20 @@ inline bool QWindowPrivate::windowRecreationRequired(QScreen *newScreen) const
{
Q_Q(const QWindow);
const QScreen *oldScreen = q->screen();
- return oldScreen != newScreen && platformWindow
+ return oldScreen != newScreen && (platformWindow || !oldScreen)
&& !(oldScreen && oldScreen->virtualSiblings().contains(newScreen));
}
inline void QWindowPrivate::disconnectFromScreen()
{
- if (topLevelScreen) {
- Q_Q(QWindow);
- QObject::disconnect(topLevelScreen, &QObject::destroyed, q, &QWindow::screenDestroyed);
+ if (topLevelScreen)
topLevelScreen = 0;
- }
}
void QWindowPrivate::connectToScreen(QScreen *screen)
{
- Q_Q(QWindow);
disconnectFromScreen();
topLevelScreen = screen;
- if (topLevelScreen)
- QObject::connect(topLevelScreen, &QObject::destroyed, q, &QWindow::screenDestroyed);
}
void QWindowPrivate::emitScreenChangedRecursion(QScreen *newScreen)
@@ -379,10 +373,13 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate)
}
if (newScreen != topLevelScreen) {
const bool shouldRecreate = recreate && windowRecreationRequired(newScreen);
- if (shouldRecreate)
+ const bool shouldShow = visibilityOnDestroy && !topLevelScreen;
+ if (shouldRecreate && platformWindow)
q->destroy();
connectToScreen(newScreen);
- if (newScreen && shouldRecreate)
+ if (shouldShow)
+ q->setVisible(true);
+ else if (newScreen && shouldRecreate)
create(true);
emitScreenChangedRecursion(newScreen);
}
@@ -404,6 +401,11 @@ void QWindowPrivate::create(bool recursive)
window->d_func()->platformWindow->setParent(platformWindow);
}
}
+
+ if (platformWindow) {
+ QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated);
+ QGuiApplication::sendEvent(q, &e);
+ }
}
}
@@ -1604,12 +1606,19 @@ void QWindow::destroy()
QGuiApplicationPrivate::focus_window = parent();
if (QGuiApplicationPrivate::currentMouseWindow == this)
QGuiApplicationPrivate::currentMouseWindow = parent();
+ if (QGuiApplicationPrivate::currentMousePressWindow == this)
+ QGuiApplicationPrivate::currentMousePressWindow = parent();
if (QGuiApplicationPrivate::tabletPressTarget == this)
QGuiApplicationPrivate::tabletPressTarget = parent();
bool wasVisible = isVisible();
+ d->visibilityOnDestroy = wasVisible && d->platformWindow;
setVisible(false);
+
+ QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed);
+ QGuiApplication::sendEvent(this, &e);
+
delete d->platformWindow;
d->resizeEventPending = true;
d->receivedExpose = false;
@@ -1678,7 +1687,7 @@ bool QWindow::setMouseGrabEnabled(bool grab)
}
/*!
- Returns the screen on which the window is shown.
+ Returns the screen on which the window is shown, or null if there is none.
For child windows, this returns the screen of the corresponding top level window.
@@ -1687,7 +1696,7 @@ bool QWindow::setMouseGrabEnabled(bool grab)
QScreen *QWindow::screen() const
{
Q_D(const QWindow);
- return d->parentWindow ? d->parentWindow->screen() : d->topLevelScreen;
+ return d->parentWindow ? d->parentWindow->screen() : d->topLevelScreen.data();
}
/*!
@@ -1707,24 +1716,7 @@ void QWindow::setScreen(QScreen *newScreen)
Q_D(QWindow);
if (!newScreen)
newScreen = QGuiApplication::primaryScreen();
- d->setTopLevelScreen(newScreen, true /* recreate */);
-}
-
-void QWindow::screenDestroyed(QObject *object)
-{
- Q_D(QWindow);
- if (d->parentWindow || QGuiApplication::closingDown())
- return;
- if (object == static_cast<QObject *>(d->topLevelScreen)) {
- const bool wasVisible = isVisible();
- setScreen(0);
- // destroy() might have hidden our window, show it again.
- // This might not be the best behavior if the new screen isn't a virtual sibling
- // of the old one. This can be removed once platform plugins have the power to
- // update the QScreen of its QWindows itself.
- if (wasVisible && d->platformWindow)
- setVisible(true);
- }
+ d->setTopLevelScreen(newScreen, newScreen != 0);
}
/*!
@@ -2059,12 +2051,61 @@ bool QWindow::event(QEvent *ev)
break;
#endif
+ case QEvent::Timer: {
+ Q_D(QWindow);
+ if (static_cast<QTimerEvent *>(ev)->timerId() == d->updateTimer) {
+ killTimer(d->updateTimer);
+ d->updateTimer = 0;
+ d->deliverUpdateRequest();
+ } else {
+ QObject::event(ev);
+ }
+ break;
+ }
+
default:
return QObject::event(ev);
}
return true;
}
+void QWindowPrivate::deliverUpdateRequest()
+{
+ Q_Q(QWindow);
+ updateRequestPending = false;
+ QEvent request(QEvent::UpdateRequest);
+ QCoreApplication::sendEvent(q, &request);
+}
+
+/*!
+ Schedules a QEvent::UpdateRequest event to be delivered to this window.
+
+ The event is delivered in sync with the display vsync on platforms
+ where this is possible. When driving animations, this function should
+ be called once after drawing has completed.
+
+ Calling this function multiple times will result in a single event
+ being delivered to the window.
+
+ Subclasses of QWindow should reimplement event(), intercept the event and
+ call the application's rendering code, then call the base class
+ implementation.
+
+ \note The subclass' reimplementation of event() must invoke the base class
+ implementation, unless it is absolutely sure that the event does not need to
+ be handled by the base class. For example, the default implementation of
+ this function relies on QEvent::Timer events. Filtering them away would
+ therefore break the delivery of the update events.
+*/
+void QWindow::requestUpdate()
+{
+ Q_D(QWindow);
+ if (d->updateRequestPending || !d->platformWindow)
+ return;
+ d->updateRequestPending = true;
+ d->platformWindow->requestUpdate();
+}
+
/*!
Override this to handle key press events (\a ev).
@@ -2206,10 +2247,12 @@ bool QWindow::nativeEvent(const QByteArray &eventType, void *message, long *resu
QPoint QWindow::mapToGlobal(const QPoint &pos) const
{
Q_D(const QWindow);
- if (d->platformWindow && d->platformWindow->isEmbedded(0))
+ // QTBUG-43252, prefer platform implementation for foreign windows.
+ if (d->platformWindow
+ && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) {
return d->platformWindow->mapToGlobal(pos);
- else
- return pos + d_func()->globalPosition();
+ }
+ return pos + d_func()->globalPosition();
}
@@ -2224,10 +2267,12 @@ QPoint QWindow::mapToGlobal(const QPoint &pos) const
QPoint QWindow::mapFromGlobal(const QPoint &pos) const
{
Q_D(const QWindow);
- if (d->platformWindow && d->platformWindow->isEmbedded(0))
+ // QTBUG-43252, prefer platform implementation for foreign windows.
+ if (d->platformWindow
+ && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) {
return d->platformWindow->mapFromGlobal(pos);
- else
- return pos - d_func()->globalPosition();
+ }
+ return pos - d_func()->globalPosition();
}
@@ -2244,24 +2289,22 @@ void QWindowPrivate::maybeQuitOnLastWindowClosed()
Q_Q(QWindow);
// Attempt to close the application only if this has WA_QuitOnClose set and a non-visible parent
bool quitOnClose = QGuiApplication::quitOnLastWindowClosed() && !q->parent();
-
- if (quitOnClose) {
- QWindowList list = QGuiApplication::topLevelWindows();
- bool lastWindowClosed = true;
- for (int i = 0; i < list.size(); ++i) {
- QWindow *w = list.at(i);
- if (!w->isVisible() || w->transientParent())
- continue;
- lastWindowClosed = false;
- break;
- }
- if (lastWindowClosed) {
- QGuiApplicationPrivate::emitLastWindowClosed();
+ QWindowList list = QGuiApplication::topLevelWindows();
+ bool lastWindowClosed = true;
+ for (int i = 0; i < list.size(); ++i) {
+ QWindow *w = list.at(i);
+ if (!w->isVisible() || w->transientParent())
+ continue;
+ lastWindowClosed = false;
+ break;
+ }
+ if (lastWindowClosed) {
+ QGuiApplicationPrivate::emitLastWindowClosed();
+ if (quitOnClose) {
QCoreApplicationPrivate *applicationPrivate = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(QCoreApplication::instance()));
applicationPrivate->maybeQuit();
}
}
-
}
QWindow *QWindowPrivate::topLevelWindow() const
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 473d275b56..f9fe37718c 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -84,8 +84,6 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
Q_OBJECT
Q_DECLARE_PRIVATE(QWindow)
- Q_ENUMS(Visibility)
-
// All properties which are declared here are inherited by QQuickWindow and therefore available in QML.
// So please think carefully about what it does to the QML namespace if you add any new ones,
// particularly the possible meanings these names might have in any specializations of Window.
@@ -122,13 +120,14 @@ public:
Maximized,
FullScreen
};
+ Q_ENUM(Visibility)
explicit QWindow(QScreen *screen = 0);
explicit QWindow(QWindow *parent);
virtual ~QWindow();
void setSurfaceType(SurfaceType surfaceType);
- SurfaceType surfaceType() const;
+ SurfaceType surfaceType() const Q_DECL_OVERRIDE;
bool isVisible() const;
@@ -149,7 +148,7 @@ public:
void setModality(Qt::WindowModality modality);
void setFormat(const QSurfaceFormat &format);
- QSurfaceFormat format() const;
+ QSurfaceFormat format() const Q_DECL_OVERRIDE;
QSurfaceFormat requestedFormat() const;
void setFlags(Qt::WindowFlags flags);
@@ -216,7 +215,7 @@ public:
inline int x() const { return geometry().x(); }
inline int y() const { return geometry().y(); }
- inline QSize size() const { return geometry().size(); }
+ QSize size() const Q_DECL_OVERRIDE { return geometry().size(); }
inline QPoint position() const { return geometry().topLeft(); }
void setPosition(const QPoint &pt);
@@ -286,6 +285,8 @@ public Q_SLOTS:
Q_REVISION(1) void alert(int msec);
+ Q_REVISION(3) void requestUpdate();
+
Q_SIGNALS:
void screenChanged(QScreen *screen);
void modalityChanged(Qt::WindowModality modality);
@@ -312,9 +313,6 @@ Q_SIGNALS:
Q_REVISION(1) void opacityChanged(qreal opacity);
-private Q_SLOTS:
- void screenDestroyed(QObject *screen);
-
protected:
virtual void exposeEvent(QExposeEvent *);
virtual void resizeEvent(QResizeEvent *);
@@ -326,7 +324,7 @@ protected:
virtual void hideEvent(QHideEvent *);
// TODO Qt 6 - add closeEvent virtual handler
- virtual bool event(QEvent *);
+ virtual bool event(QEvent *) Q_DECL_OVERRIDE;
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void mousePressEvent(QMouseEvent *);
@@ -346,7 +344,7 @@ protected:
private:
Q_PRIVATE_SLOT(d_func(), void _q_clearAlert())
- QPlatformSurface *surfaceHandle() const;
+ QPlatformSurface *surfaceHandle() const Q_DECL_OVERRIDE;
Q_DISABLE_COPY(QWindow)
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index bc5dfa4876..4fc63acf28 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,6 +45,7 @@
// We mean it.
//
+#include <QtGui/qscreen.h>
#include <QtGui/qwindow.h>
#include <qpa/qplatformwindow.h>
@@ -73,6 +74,7 @@ public:
, parentWindow(0)
, platformWindow(0)
, visible(false)
+ , visibilityOnDestroy(false)
, exposed(false)
, windowState(Qt::WindowNoState)
, visibility(QWindow::Hidden)
@@ -86,6 +88,8 @@ public:
, maximumSize(QWINDOWSIZE_MAX, QWINDOWSIZE_MAX)
, modality(Qt::NonModal)
, blockedByModalWindow(false)
+ , updateRequestPending(false)
+ , updateTimer(0)
, transientParent(0)
, topLevelScreen(0)
#ifndef QT_NO_CURSOR
@@ -109,6 +113,8 @@ public:
void applyCursor();
#endif
+ void deliverUpdateRequest();
+
QPoint globalPosition() const {
Q_Q(const QWindow);
QPoint offset = q->position();
@@ -134,11 +140,16 @@ public:
virtual void clearFocusObject();
virtual QRectF closestAcceptableGeometry(const QRectF &rect) const;
+ bool isPopup() const { return (windowFlags & Qt::WindowType_Mask) == Qt::Popup; }
+
+ static QWindowPrivate *get(QWindow *window) { return window->d_func(); }
+
QWindow::SurfaceType surfaceType;
Qt::WindowFlags windowFlags;
QWindow *parentWindow;
QPlatformWindow *platformWindow;
bool visible;
+ bool visibilityOnDestroy;
bool exposed;
QSurfaceFormat requestedFormat;
QString windowTitle;
@@ -163,8 +174,11 @@ public:
Qt::WindowModality modality;
bool blockedByModalWindow;
+ bool updateRequestPending;
+ int updateTimer;
+
QPointer<QWindow> transientParent;
- QScreen *topLevelScreen;
+ QPointer<QScreen> topLevelScreen;
#ifndef QT_NO_CURSOR
QCursor cursor;
diff --git a/src/gui/kernel/qwindowdefs.h b/src/gui/kernel/qwindowdefs.h
index 28bb665988..f9df68edb9 100644
--- a/src/gui/kernel/qwindowdefs.h
+++ b/src/gui/kernel/qwindowdefs.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qwindowdefs_win.h b/src/gui/kernel/qwindowdefs_win.h
index 21bcbf9463..6308977802 100644
--- a/src/gui/kernel/qwindowdefs_win.h
+++ b/src/gui/kernel/qwindowdefs_win.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 722a695481..b17978cb7d 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -201,6 +201,11 @@ bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp,
#ifndef QT_NO_SHORTCUT
QGuiApplicationPrivate::modifier_buttons = mods;
+ if (!w)
+ w = QGuiApplication::focusWindow();
+ if (!w)
+ return false;
+
QObject *focus = w->focusObject();
if (!focus)
focus = w;
@@ -220,6 +225,28 @@ bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp,
#endif
}
+// used by QTestLib to directly send shortcuts to objects
+bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
+ const QString &text, bool autorep, ushort count)
+{
+#ifndef QT_NO_SHORTCUT
+ QGuiApplicationPrivate::modifier_buttons = mods;
+
+ QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count);
+ qevent.setTimestamp(timestamp);
+ return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(o, &qevent);
+#else
+ Q_UNUSED(w)
+ Q_UNUSED(timestamp)
+ Q_UNUSED(k)
+ Q_UNUSED(mods)
+ Q_UNUSED(text)
+ Q_UNUSED(autorep)
+ Q_UNUSED(count)
+ return false;
+#endif
+}
+
bool QWindowSystemInterface::tryHandleExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
const QString &text, bool autorep, ushort count)
@@ -265,6 +292,14 @@ void QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Q
void QWindowSystemInterface::handleKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count)
{
+ // This is special handling needed for OS X which eventually will call sendEvent(), on other platforms
+ // this might not be safe, e.g., on Android. See: QGuiApplicationPrivate::processKeyEvent() for
+ // shortcut overriding on other platforms.
+#if defined(Q_OS_OSX)
+ if (t == QEvent::KeyPress && QWindowSystemInterface::tryHandleShortcutEvent(tlw, timestamp, k, mods, text))
+ return;
+#endif // Q_OS_OSX
+
QWindowSystemInterfacePrivate::KeyEvent * e =
new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
@@ -286,8 +321,9 @@ void QWindowSystemInterface::handleExtendedKeyEvent(QWindow *tlw, ulong timestam
quint32 nativeScanCode, quint32 nativeVirtualKey,
quint32 nativeModifiers,
const QString& text, bool autorep,
- ushort count)
+ ushort count, bool tryShortcutOverride)
{
+ Q_UNUSED(tryShortcutOverride)
QWindowSystemInterfacePrivate::KeyEvent * e =
new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, type, key, modifiers,
nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
@@ -305,13 +341,13 @@ void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, con
handleWheelEvent(tlw, timestamp, local, global, QPoint(), point, mods);
}
-void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase)
+void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, Qt::MouseEventSource source)
{
unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
- handleWheelEvent(w, time, local, global, pixelDelta, angleDelta, mods, phase);
+ handleWheelEvent(w, time, local, global, pixelDelta, angleDelta, mods, phase, source);
}
-void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase)
+void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, Qt::MouseEventSource source)
{
// Qt 4 sends two separate wheel events for horizontal and vertical
// deltas. For Qt 5 we want to send the deltas in one event, but at the
@@ -329,14 +365,14 @@ void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, con
// Simple case: vertical deltas only:
if (angleDelta.y() != 0 && angleDelta.x() == 0) {
- e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods, phase);
+ e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods, phase, source);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
return;
}
// Simple case: horizontal deltas only:
if (angleDelta.y() == 0 && angleDelta.x() != 0) {
- e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.x(), Qt::Horizontal, mods, phase);
+ e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.x(), Qt::Horizontal, mods, phase, source);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
return;
}
@@ -344,12 +380,12 @@ void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, con
// Both horizontal and vertical deltas: Send two wheel events.
// The first event contains the Qt 5 pixel and angle delta as points,
// and in addition the Qt 4 compatibility vertical angle delta.
- e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods, phase);
+ e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods, phase, source);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
// The second event contains null pixel and angle points and the
// Qt 4 compatibility horizontal angle delta.
- e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, QPoint(), QPoint(), angleDelta.x(), Qt::Horizontal, mods, phase);
+ e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, local, global, QPoint(), QPoint(), angleDelta.x(), Qt::Horizontal, mods, phase, source);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
}
@@ -745,9 +781,12 @@ void QWindowSystemInterface::handleEnterWhatsThisEvent()
#endif
#ifndef QT_NO_DEBUG_STREAM
-Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QWindowSystemInterface::TouchPoint &p) {
- dbg.nospace() << "TouchPoint(" << p.id << " @" << p.normalPosition << " press " << p.pressure << " vel " << p.velocity << " state " << (int)p.state;
- return dbg.space();
+Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QWindowSystemInterface::TouchPoint &p)
+{
+ QDebugStateSaver saver(dbg);
+ dbg.nospace() << "TouchPoint(" << p.id << " @" << p.area << " normalized " << p.normalPosition
+ << " press " << p.pressure << " vel " << p.velocity << " state " << (int)p.state;
+ return dbg;
}
#endif
@@ -760,6 +799,11 @@ Q_GUI_EXPORT void qt_handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::Keybo
QWindowSystemInterface::handleKeyEvent(w, t, k, mods, text, autorep, count);
}
+Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text = QString(), bool autorep = false, ushort count = 1)
+{
+ return QWindowSystemInterface::tryHandleShortcutEventToObject(o, timestamp, k, mods, text, autorep, count);
+}
+
static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt)
{
QWindowSystemInterface::TouchPoint p;
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index 30c236b51f..c004fc6ef2 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -83,6 +83,9 @@ public:
static bool tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
const QString & text = QString(), bool autorep = false, ushort count = 1);
+ static bool tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
+ const QString & text = QString(), bool autorep = false, ushort count = 1);
+
static bool tryHandleExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
const QString & text = QString(), bool autorep = false, ushort count = 1);
@@ -102,9 +105,9 @@ public:
quint32 nativeScanCode, quint32 nativeVirtualKey,
quint32 nativeModifiers,
const QString& text = QString(), bool autorep = false,
- ushort count = 1);
- static void handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, Qt::ScrollPhase phase = Qt::ScrollUpdate);
- static void handleWheelEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, Qt::ScrollPhase phase = Qt::ScrollUpdate);
+ ushort count = 1, bool tryShortcutOverride = true);
+ static void handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, Qt::ScrollPhase phase = Qt::ScrollUpdate, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
+ static void handleWheelEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, Qt::ScrollPhase phase = Qt::ScrollUpdate, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
// Wheel event compatibility functions. Will be removed: do not use.
static void handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods = Qt::NoModifier);
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index c3f41da835..2ec402a1e9 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -93,11 +93,20 @@ public:
class WindowSystemEvent {
public:
+ enum {
+ Synthetic = 0x1,
+ NullWindow = 0x2
+ };
+
explicit WindowSystemEvent(EventType t)
- : type(t), synthetic(false) { }
+ : type(t), flags(0) { }
virtual ~WindowSystemEvent() { }
+
+ bool synthetic() const { return flags & Synthetic; }
+ bool nullWindow() const { return flags & NullWindow; }
+
EventType type;
- bool synthetic;
+ int flags;
};
class CloseEvent : public WindowSystemEvent {
@@ -188,9 +197,12 @@ public:
class UserEvent : public WindowSystemEvent {
public:
UserEvent(QWindow * w, ulong time, EventType t)
- : WindowSystemEvent(t), window(w), nullWindow(w == 0), timestamp(time) { }
+ : WindowSystemEvent(t), window(w), timestamp(time)
+ {
+ if (!w)
+ flags |= NullWindow;
+ }
QPointer<QWindow> window;
- bool nullWindow;
unsigned long timestamp;
};
@@ -220,8 +232,8 @@ public:
class WheelEvent : public InputEvent {
public:
WheelEvent(QWindow *w, ulong time, const QPointF & local, const QPointF & global, QPoint pixelD, QPoint angleD, int qt4D, Qt::Orientation qt4O,
- Qt::KeyboardModifiers mods, Qt::ScrollPhase phase = Qt::ScrollUpdate)
- : InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D), qt4Orientation(qt4O), localPos(local), globalPos(global), phase(phase) { }
+ Qt::KeyboardModifiers mods, Qt::ScrollPhase phase = Qt::ScrollUpdate, Qt::MouseEventSource src = Qt::MouseEventNotSynthesized)
+ : InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D), qt4Orientation(qt4O), localPos(local), globalPos(global), phase(phase), source(src) { }
QPoint pixelDelta;
QPoint angleDelta;
int qt4Delta;
@@ -229,6 +241,7 @@ public:
QPointF localPos;
QPointF globalPos;
Qt::ScrollPhase phase;
+ Qt::MouseEventSource source;
};
class KeyEvent : public InputEvent {
diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp
index 995cf1716c..7b46bb452c 100644
--- a/src/gui/math3d/qgenericmatrix.cpp
+++ b/src/gui/math3d/qgenericmatrix.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -61,6 +61,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QGenericMatrix::QGenericMatrix(Qt::Initialization)
+ \since 5.5
+ \internal
+
+ Constructs a NxM matrix without initializing the contents.
+*/
+
+/*!
\fn QGenericMatrix::QGenericMatrix(const QGenericMatrix<N, M, T>& other)
Constructs a copy of \a other.
diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h
index 5b45ab7fa1..89bc09f544 100644
--- a/src/gui/math3d/qgenericmatrix.h
+++ b/src/gui/math3d/qgenericmatrix.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -46,6 +46,7 @@ class QGenericMatrix
{
public:
QGenericMatrix();
+ explicit QGenericMatrix(Qt::Initialization) {}
QGenericMatrix(const QGenericMatrix<N, M, T>& other);
explicit QGenericMatrix(const T *values);
@@ -340,6 +341,7 @@ typedef QGenericMatrix<4, 3, float> QMatrix4x3;
template <int N, int M, typename T>
QDebug operator<<(QDebug dbg, const QGenericMatrix<N, M, T> &m)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QGenericMatrix<" << N << ", " << M
<< ", " << QTypeInfo<T>::name()
<< ">(" << endl << qSetFieldWidth(10);
@@ -349,7 +351,7 @@ QDebug operator<<(QDebug dbg, const QGenericMatrix<N, M, T> &m)
dbg << endl;
}
dbg << qSetFieldWidth(0) << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index c8a036918c..eb7c7f4b7a 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -76,6 +76,14 @@ static const float inv_dist_to_plane = 1.0f / 1024.0f;
*/
/*!
+ \fn QMatrix4x4::QMatrix4x4(Qt::Initialization)
+ \since 5.5
+ \internal
+
+ Constructs a matrix without initializing the contents.
+*/
+
+/*!
Constructs a matrix from the given 16 floating-point \a values.
The contents of the array \a values is assumed to be in
row-major order.
@@ -290,6 +298,18 @@ QMatrix4x4::QMatrix4x4(const QTransform& transform)
*/
/*!
+ \fn bool QMatrix4x4::isAffine() const
+ \since 5.5
+
+ Returns \c true if this matrix is affine matrix; false otherwise.
+
+ An affine matrix is a 4x4 matrix with row 3 equal to (0, 0, 0, 1),
+ e.g. no projective coefficients.
+
+ \sa isIdentity()
+*/
+
+/*!
\fn bool QMatrix4x4::isIdentity() const
Returns \c true if this matrix is the identity; false otherwise.
@@ -1105,8 +1125,8 @@ void QMatrix4x4::rotate(float angle, float x, float y, float z)
c = -1.0f;
} else {
float a = angle * M_PI / 180.0f;
- c = cosf(a);
- s = sinf(a);
+ c = std::cos(a);
+ s = std::sin(a);
}
if (x == 0.0f) {
if (y == 0.0f) {
@@ -1166,7 +1186,7 @@ void QMatrix4x4::rotate(float angle, float x, float y, float z)
double(y) * double(y) +
double(z) * double(z);
if (!qFuzzyCompare(len, 1.0) && !qFuzzyIsNull(len)) {
- len = sqrt(len);
+ len = std::sqrt(len);
x = float(double(x) / len);
y = float(double(y) / len);
z = float(double(z) / len);
@@ -1214,8 +1234,8 @@ void QMatrix4x4::projectedRotate(float angle, float x, float y, float z)
c = -1.0f;
} else {
float a = angle * M_PI / 180.0f;
- c = cosf(a);
- s = sinf(a);
+ c = std::cos(a);
+ s = std::sin(a);
}
if (x == 0.0f) {
if (y == 0.0f) {
@@ -1262,7 +1282,7 @@ void QMatrix4x4::projectedRotate(float angle, float x, float y, float z)
double(y) * double(y) +
double(z) * double(z);
if (!qFuzzyCompare(len, 1.0) && !qFuzzyIsNull(len)) {
- len = sqrt(len);
+ len = std::sqrt(len);
x = float(double(x) / len);
y = float(double(y) / len);
z = float(double(z) / len);
@@ -1302,27 +1322,33 @@ void QMatrix4x4::rotate(const QQuaternion& quaternion)
{
// Algorithm from:
// http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q54
- QMatrix4x4 m(1);
- float xx = quaternion.x() * quaternion.x();
- float xy = quaternion.x() * quaternion.y();
- float xz = quaternion.x() * quaternion.z();
- float xw = quaternion.x() * quaternion.scalar();
- float yy = quaternion.y() * quaternion.y();
- float yz = quaternion.y() * quaternion.z();
- float yw = quaternion.y() * quaternion.scalar();
- float zz = quaternion.z() * quaternion.z();
- float zw = quaternion.z() * quaternion.scalar();
- m.m[0][0] = 1.0f - 2 * (yy + zz);
- m.m[1][0] = 2 * (xy - zw);
- m.m[2][0] = 2 * (xz + yw);
+
+ QMatrix4x4 m(Qt::Uninitialized);
+
+ const float f2x = quaternion.x() + quaternion.x();
+ const float f2y = quaternion.y() + quaternion.y();
+ const float f2z = quaternion.z() + quaternion.z();
+ const float f2xw = f2x * quaternion.scalar();
+ const float f2yw = f2y * quaternion.scalar();
+ const float f2zw = f2z * quaternion.scalar();
+ const float f2xx = f2x * quaternion.x();
+ const float f2xy = f2x * quaternion.y();
+ const float f2xz = f2x * quaternion.z();
+ const float f2yy = f2y * quaternion.y();
+ const float f2yz = f2y * quaternion.z();
+ const float f2zz = f2z * quaternion.z();
+
+ m.m[0][0] = 1.0f - (f2yy + f2zz);
+ m.m[1][0] = f2xy - f2zw;
+ m.m[2][0] = f2xz + f2yw;
m.m[3][0] = 0.0f;
- m.m[0][1] = 2 * (xy + zw);
- m.m[1][1] = 1.0f - 2 * (xx + zz);
- m.m[2][1] = 2 * (yz - xw);
+ m.m[0][1] = f2xy + f2zw;
+ m.m[1][1] = 1.0f - (f2xx + f2zz);
+ m.m[2][1] = f2yz - f2xw;
m.m[3][1] = 0.0f;
- m.m[0][2] = 2 * (xz - yw);
- m.m[1][2] = 2 * (yz + xw);
- m.m[2][2] = 1.0f - 2 * (xx + yy);
+ m.m[0][2] = f2xz - f2yw;
+ m.m[1][2] = f2yz + f2xw;
+ m.m[2][2] = 1.0f - (f2xx + f2yy);
m.m[3][2] = 0.0f;
m.m[0][3] = 0.0f;
m.m[1][3] = 0.0f;
@@ -1467,10 +1493,10 @@ void QMatrix4x4::perspective(float verticalAngle, float aspectRatio, float nearP
// Construct the projection.
QMatrix4x4 m(1);
float radians = (verticalAngle / 2.0f) * M_PI / 180.0f;
- float sine = sinf(radians);
+ float sine = std::sin(radians);
if (sine == 0.0f)
return;
- float cotan = cosf(radians) / sine;
+ float cotan = std::cos(radians) / sine;
float clip = farPlane - nearPlane;
m.m[0][0] = cotan / aspectRatio;
m.m[1][0] = 0.0f;
@@ -1497,14 +1523,21 @@ void QMatrix4x4::perspective(float verticalAngle, float aspectRatio, float nearP
#ifndef QT_NO_VECTOR3D
/*!
- Multiplies this matrix by another that applies an \a eye position
- transformation. The \a center value indicates the center of the
- view that the \a eye is looking at. The \a up value indicates
- which direction should be considered up with respect to the \a eye.
+ Multiplies this matrix by a viewing matrix derived from an eye
+ point. The \a center value indicates the center of the view that
+ the \a eye is looking at. The \a up value indicates which direction
+ should be considered up with respect to the \a eye.
+
+ \note The \a up vector must not be parallel to the line of sight
+ from \a eye to \a center.
*/
void QMatrix4x4::lookAt(const QVector3D& eye, const QVector3D& center, const QVector3D& up)
{
- QVector3D forward = (center - eye).normalized();
+ QVector3D forward = center - eye;
+ if (qFuzzyIsNull(forward.x()) && qFuzzyIsNull(forward.y()) && qFuzzyIsNull(forward.z()))
+ return;
+
+ forward.normalize();
QVector3D side = QVector3D::crossProduct(forward, up).normalized();
QVector3D upVector = QVector3D::crossProduct(side, forward);
@@ -1977,6 +2010,7 @@ QMatrix4x4::operator QVariant() const
QDebug operator<<(QDebug dbg, const QMatrix4x4 &m)
{
+ QDebugStateSaver saver(dbg);
// Create a string that represents the matrix type.
QByteArray bits;
if (m.flagBits == QMatrix4x4::Identity) {
@@ -2006,7 +2040,7 @@ QDebug operator<<(QDebug dbg, const QMatrix4x4 &m)
<< m(2, 0) << m(2, 1) << m(2, 2) << m(2, 3) << endl
<< m(3, 0) << m(3, 1) << m(3, 2) << m(3, 3) << endl
<< qSetFieldWidth(0) << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 31a4dbf1ca..6f6ff235cf 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -53,6 +53,7 @@ class Q_GUI_EXPORT QMatrix4x4
{
public:
inline QMatrix4x4() { setToIdentity(); }
+ explicit QMatrix4x4(Qt::Initialization) : flagBits(General) {}
explicit QMatrix4x4(const float *values);
inline QMatrix4x4(float m11, float m12, float m13, float m14,
float m21, float m22, float m23, float m24,
@@ -77,6 +78,8 @@ public:
inline void setRow(int index, const QVector4D& value);
#endif
+ inline bool isAffine() const;
+
inline bool isIdentity() const;
inline void setToIdentity();
@@ -302,6 +305,11 @@ inline void QMatrix4x4::setRow(int index, const QVector4D& value)
Q_GUI_EXPORT QMatrix4x4 operator/(const QMatrix4x4& matrix, float divisor);
+inline bool QMatrix4x4::isAffine() const
+{
+ return m[0][3] == 0.0f && m[1][3] == 0.0f && m[2][3] == 0.0f && m[3][3] == 1.0f;
+}
+
inline bool QMatrix4x4::isIdentity() const
{
if (flagBits == Identity)
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index f1af8922ca..6914a0b45e 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -63,6 +63,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QQuaternion::QQuaternion(Qt::Initialization)
+ \since 5.5
+ \internal
+
+ Constructs a quaternion without initializing the contents.
+*/
+
+/*!
\fn QQuaternion::QQuaternion(float scalar, float xpos, float ypos, float zpos)
Constructs a quaternion with the vector (\a xpos, \a ypos, \a zpos)
@@ -205,19 +213,28 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn float QQuaternion::dotProduct(const QQuaternion &q1, const QQuaternion &q2)
+ \since 5.5
+
+ Returns the dot product of \a q1 and \a q2.
+
+ \sa length()
+*/
+
+/*!
Returns the length of the quaternion. This is also called the "norm".
- \sa lengthSquared(), normalized()
+ \sa lengthSquared(), normalized(), dotProduct()
*/
float QQuaternion::length() const
{
- return qSqrt(xp * xp + yp * yp + zp * zp + wp * wp);
+ return std::sqrt(xp * xp + yp * yp + zp * zp + wp * wp);
}
/*!
Returns the squared length of the quaternion.
- \sa length()
+ \sa length(), dotProduct()
*/
float QQuaternion::lengthSquared() const
{
@@ -232,7 +249,7 @@ float QQuaternion::lengthSquared() const
will be returned as-is. Otherwise the normalized form of the
quaternion of length 1 will be returned.
- \sa length(), normalize()
+ \sa normalize(), length(), dotProduct()
*/
QQuaternion QQuaternion::normalized() const
{
@@ -244,7 +261,7 @@ QQuaternion QQuaternion::normalized() const
if (qFuzzyIsNull(len - 1.0f))
return *this;
else if (!qFuzzyIsNull(len))
- return *this / qSqrt(len);
+ return *this / std::sqrt(len);
else
return QQuaternion(0.0f, 0.0f, 0.0f, 0.0f);
}
@@ -265,7 +282,7 @@ void QQuaternion::normalize()
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
- len = qSqrt(len);
+ len = std::sqrt(len);
xp /= len;
yp /= len;
@@ -274,6 +291,16 @@ void QQuaternion::normalize()
}
/*!
+ \fn QQuaternion QQuaternion::inverted() const
+ \since 5.5
+
+ Returns the inverse of this quaternion.
+ If this quaternion is null, then a null quaternion is returned.
+
+ \sa isNull(), length()
+*/
+
+/*!
\fn QQuaternion QQuaternion::conjugate() const
Returns the conjugate of this quaternion, which is
@@ -345,8 +372,21 @@ QVector3D QQuaternion::rotatedVector(const QVector3D& vector) const
#ifndef QT_NO_VECTOR3D
/*!
+ \fn void QQuaternion::getAxisAndAngle(QVector3D *axis, float *angle) const
+ \since 5.5
+ \overload
+
+ Extracts a 3D axis \a axis and a rotating angle \a angle (in degrees)
+ that corresponds to this quaternion.
+
+ \sa fromAxisAndAngle()
+*/
+
+/*!
Creates a normalized quaternion that corresponds to rotating through
\a angle degrees about the specified 3D \a axis.
+
+ \sa getAxisAndAngle()
*/
QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, float angle)
{
@@ -355,8 +395,8 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, float angle)
// We normalize the result just in case the values are close
// to zero, as suggested in the above FAQ.
float a = (angle / 2.0f) * M_PI / 180.0f;
- float s = sinf(a);
- float c = cosf(a);
+ float s = std::sin(a);
+ float c = std::cos(a);
QVector3D ax = axis.normalized();
return QQuaternion(c, ax.x() * s, ax.y() * s, ax.z() * s).normalized();
}
@@ -364,24 +404,353 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, float angle)
#endif
/*!
+ \since 5.5
+
+ Extracts a 3D axis (\a x, \a y, \a z) and a rotating angle \a angle (in degrees)
+ that corresponds to this quaternion.
+
+ \sa fromAxisAndAngle()
+*/
+void QQuaternion::getAxisAndAngle(float *x, float *y, float *z, float *angle) const
+{
+ Q_ASSERT(x && y && z && angle);
+
+ // The quaternion representing the rotation is
+ // q = cos(A/2)+sin(A/2)*(x*i+y*j+z*k)
+
+ float length = xp * xp + yp * yp + zp * zp;
+ if (!qFuzzyIsNull(length)) {
+ *x = xp;
+ *y = yp;
+ *z = zp;
+ if (!qFuzzyIsNull(length - 1.0f)) {
+ length = std::sqrt(length);
+ *x /= length;
+ *y /= length;
+ *z /= length;
+ }
+ *angle = 2.0f * std::acos(wp);
+ } else {
+ // angle is 0 (mod 2*pi), so any axis will fit
+ *x = *y = *z = *angle = 0.0f;
+ }
+
+ *angle = qRadiansToDegrees(*angle);
+}
+
+/*!
Creates a normalized quaternion that corresponds to rotating through
\a angle degrees about the 3D axis (\a x, \a y, \a z).
+
+ \sa getAxisAndAngle()
*/
QQuaternion QQuaternion::fromAxisAndAngle
(float x, float y, float z, float angle)
{
- float length = qSqrt(x * x + y * y + z * z);
+ float length = std::sqrt(x * x + y * y + z * z);
if (!qFuzzyIsNull(length - 1.0f) && !qFuzzyIsNull(length)) {
x /= length;
y /= length;
z /= length;
}
float a = (angle / 2.0f) * M_PI / 180.0f;
- float s = sinf(a);
- float c = cosf(a);
+ float s = std::sin(a);
+ float c = std::cos(a);
return QQuaternion(c, x * s, y * s, z * s).normalized();
}
+#ifndef QT_NO_VECTOR3D
+
+/*!
+ \fn QVector3D QQuaternion::toEulerAngles() const
+ \since 5.5
+ \overload
+
+ Calculates roll, pitch, and yaw Euler angles (in degrees)
+ that corresponds to this quaternion.
+
+ \sa fromEulerAngles()
+*/
+
+/*!
+ \fn QQuaternion QQuaternion::fromEulerAngles(const QVector3D &eulerAngles)
+ \since 5.5
+ \overload
+
+ Creates a quaternion that corresponds to a rotation of \a eulerAngles:
+ eulerAngles.z() degrees around the z axis, eulerAngles.x() degrees around the x axis,
+ and eulerAngles.y() degrees around the y axis (in that order).
+
+ \sa toEulerAngles()
+*/
+
+#endif // QT_NO_VECTOR3D
+
+/*!
+ \since 5.5
+
+ Calculates \a roll, \a pitch, and \a yaw Euler angles (in degrees)
+ that corresponds to this quaternion.
+
+ \sa fromEulerAngles()
+*/
+void QQuaternion::getEulerAngles(float *pitch, float *yaw, float *roll) const
+{
+ Q_ASSERT(pitch && yaw && roll);
+
+ // Algorithm from:
+ // http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q37
+
+ float xx = xp * xp;
+ float xy = xp * yp;
+ float xz = xp * zp;
+ float xw = xp * wp;
+ float yy = yp * yp;
+ float yz = yp * zp;
+ float yw = yp * wp;
+ float zz = zp * zp;
+ float zw = zp * wp;
+
+ const float lengthSquared = xx + yy + zz + wp * wp;
+ if (!qFuzzyIsNull(lengthSquared - 1.0f) && !qFuzzyIsNull(lengthSquared)) {
+ xx /= lengthSquared;
+ xy /= lengthSquared; // same as (xp / length) * (yp / length)
+ xz /= lengthSquared;
+ xw /= lengthSquared;
+ yy /= lengthSquared;
+ yz /= lengthSquared;
+ yw /= lengthSquared;
+ zz /= lengthSquared;
+ zw /= lengthSquared;
+ }
+
+ *pitch = std::asin(-2.0f * (yz - xw));
+ if (*pitch < M_PI_2) {
+ if (*pitch > -M_PI_2) {
+ *yaw = std::atan2(2.0f * (xz + yw), 1.0f - 2.0f * (xx + yy));
+ *roll = std::atan2(2.0f * (xy + zw), 1.0f - 2.0f * (xx + zz));
+ } else {
+ // not a unique solution
+ *roll = 0.0f;
+ *yaw = -std::atan2(-2.0f * (xy - zw), 1.0f - 2.0f * (yy + zz));
+ }
+ } else {
+ // not a unique solution
+ *roll = 0.0f;
+ *yaw = std::atan2(-2.0f * (xy - zw), 1.0f - 2.0f * (yy + zz));
+ }
+
+ *pitch = qRadiansToDegrees(*pitch);
+ *yaw = qRadiansToDegrees(*yaw);
+ *roll = qRadiansToDegrees(*roll);
+}
+
+/*!
+ \since 5.5
+
+ Creates a quaternion that corresponds to a rotation of
+ \a roll degrees around the z axis, \a pitch degrees around the x axis,
+ and \a yaw degrees around the y axis (in that order).
+
+ \sa getEulerAngles()
+*/
+QQuaternion QQuaternion::fromEulerAngles(float pitch, float yaw, float roll)
+{
+ // Algorithm from:
+ // http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q60
+
+ pitch = qDegreesToRadians(pitch);
+ yaw = qDegreesToRadians(yaw);
+ roll = qDegreesToRadians(roll);
+
+ pitch *= 0.5f;
+ yaw *= 0.5f;
+ roll *= 0.5f;
+
+ const float c1 = std::cos(yaw);
+ const float s1 = std::sin(yaw);
+ const float c2 = std::cos(roll);
+ const float s2 = std::sin(roll);
+ const float c3 = std::cos(pitch);
+ const float s3 = std::sin(pitch);
+ const float c1c2 = c1 * c2;
+ const float s1s2 = s1 * s2;
+
+ const float w = c1c2 * c3 + s1s2 * s3;
+ const float x = c1c2 * s3 + s1s2 * c3;
+ const float y = s1 * c2 * c3 - c1 * s2 * s3;
+ const float z = c1 * s2 * c3 - s1 * c2 * s3;
+
+ return QQuaternion(w, x, y, z);
+}
+
+/*!
+ \since 5.5
+
+ Creates a rotation matrix that corresponds to this quaternion.
+
+ \note If this quaternion is not normalized,
+ the resulting rotation matrix will contain scaling information.
+
+ \sa fromRotationMatrix(), getAxes()
+*/
+QMatrix3x3 QQuaternion::toRotationMatrix() const
+{
+ // Algorithm from:
+ // http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q54
+
+ QMatrix3x3 rot3x3(Qt::Uninitialized);
+
+ const float f2x = xp + xp;
+ const float f2y = yp + yp;
+ const float f2z = zp + zp;
+ const float f2xw = f2x * wp;
+ const float f2yw = f2y * wp;
+ const float f2zw = f2z * wp;
+ const float f2xx = f2x * xp;
+ const float f2xy = f2x * yp;
+ const float f2xz = f2x * zp;
+ const float f2yy = f2y * yp;
+ const float f2yz = f2y * zp;
+ const float f2zz = f2z * zp;
+
+ rot3x3(0, 0) = 1.0f - (f2yy + f2zz);
+ rot3x3(0, 1) = f2xy - f2zw;
+ rot3x3(0, 2) = f2xz + f2yw;
+ rot3x3(1, 0) = f2xy + f2zw;
+ rot3x3(1, 1) = 1.0f - (f2xx + f2zz);
+ rot3x3(1, 2) = f2yz - f2xw;
+ rot3x3(2, 0) = f2xz - f2yw;
+ rot3x3(2, 1) = f2yz + f2xw;
+ rot3x3(2, 2) = 1.0f - (f2xx + f2yy);
+
+ return rot3x3;
+}
+
+/*!
+ \since 5.5
+
+ Creates a quaternion that corresponds to a rotation matrix \a rot3x3.
+
+ \note If a given rotation matrix is not normalized,
+ the resulting quaternion will contain scaling information.
+
+ \sa toRotationMatrix(), fromAxes()
+*/
+QQuaternion QQuaternion::fromRotationMatrix(const QMatrix3x3 &rot3x3)
+{
+ // Algorithm from:
+ // http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55
+
+ float scalar;
+ float axis[3];
+
+ const float trace = rot3x3(0, 0) + rot3x3(1, 1) + rot3x3(2, 2);
+ if (trace > 0.00000001f) {
+ const float s = 2.0f * std::sqrt(trace + 1.0f);
+ scalar = 0.25f * s;
+ axis[0] = (rot3x3(2, 1) - rot3x3(1, 2)) / s;
+ axis[1] = (rot3x3(0, 2) - rot3x3(2, 0)) / s;
+ axis[2] = (rot3x3(1, 0) - rot3x3(0, 1)) / s;
+ } else {
+ static int s_next[3] = { 1, 2, 0 };
+ int i = 0;
+ if (rot3x3(1, 1) > rot3x3(0, 0))
+ i = 1;
+ if (rot3x3(2, 2) > rot3x3(i, i))
+ i = 2;
+ int j = s_next[i];
+ int k = s_next[j];
+
+ const float s = 2.0f * std::sqrt(rot3x3(i, i) - rot3x3(j, j) - rot3x3(k, k) + 1.0f);
+ axis[i] = 0.25f * s;
+ scalar = (rot3x3(k, j) - rot3x3(j, k)) / s;
+ axis[j] = (rot3x3(j, i) + rot3x3(i, j)) / s;
+ axis[k] = (rot3x3(k, i) + rot3x3(i, k)) / s;
+ }
+
+ return QQuaternion(scalar, axis[0], axis[1], axis[2]);
+}
+
+#ifndef QT_NO_VECTOR3D
+
+/*!
+ \since 5.5
+
+ Returns the 3 orthonormal axes (\a xAxis, \a yAxis, \a zAxis) defining the quaternion.
+
+ \sa fromAxes(), toRotationMatrix()
+*/
+void QQuaternion::getAxes(QVector3D *xAxis, QVector3D *yAxis, QVector3D *zAxis) const
+{
+ Q_ASSERT(xAxis && yAxis && zAxis);
+
+ const QMatrix3x3 rot3x3(toRotationMatrix());
+
+ *xAxis = QVector3D(rot3x3(0, 0), rot3x3(1, 0), rot3x3(2, 0));
+ *yAxis = QVector3D(rot3x3(0, 1), rot3x3(1, 1), rot3x3(2, 1));
+ *zAxis = QVector3D(rot3x3(0, 2), rot3x3(1, 2), rot3x3(2, 2));
+}
+
+/*!
+ \since 5.5
+
+ Constructs the quaternion using 3 axes (\a xAxis, \a yAxis, \a zAxis).
+
+ \note The axes are assumed to be orthonormal.
+
+ \sa getAxes(), fromRotationMatrix()
+*/
+QQuaternion QQuaternion::fromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis)
+{
+ QMatrix3x3 rot3x3(Qt::Uninitialized);
+ rot3x3(0, 0) = xAxis.x();
+ rot3x3(1, 0) = xAxis.y();
+ rot3x3(2, 0) = xAxis.z();
+ rot3x3(0, 1) = yAxis.x();
+ rot3x3(1, 1) = yAxis.y();
+ rot3x3(2, 1) = yAxis.z();
+ rot3x3(0, 2) = zAxis.x();
+ rot3x3(1, 2) = zAxis.y();
+ rot3x3(2, 2) = zAxis.z();
+
+ return QQuaternion::fromRotationMatrix(rot3x3);
+}
+
+/*!
+ \since 5.5
+
+ Returns the shortest arc quaternion to rotate from the direction described by the vector \a from
+ to the direction described by the vector \a to.
+*/
+QQuaternion QQuaternion::rotationTo(const QVector3D &from, const QVector3D &to)
+{
+ // Based on Stan Melax's article in Game Programming Gems
+
+ const QVector3D v0(from.normalized());
+ const QVector3D v1(to.normalized());
+
+ float d = QVector3D::dotProduct(v0, v1) + 1.0f;
+
+ // if dest vector is close to the inverse of source vector, ANY axis of rotation is valid
+ if (qFuzzyIsNull(d)) {
+ QVector3D axis = QVector3D::crossProduct(QVector3D(1.0f, 0.0f, 0.0f), v0);
+ if (qFuzzyIsNull(axis.lengthSquared()))
+ axis = QVector3D::crossProduct(QVector3D(0.0f, 1.0f, 0.0f), v0);
+ axis.normalize();
+
+ // same as QQuaternion::fromAxisAndAngle(axis, 180.0f)
+ return QQuaternion(0.0f, axis.x(), axis.y(), axis.z());
+ }
+
+ d = std::sqrt(2.0f * d);
+ const QVector3D axis(QVector3D::crossProduct(v0, v1) / d);
+
+ return QQuaternion(d * 0.5f, axis).normalized();
+}
+
+#endif // QT_NO_VECTOR3D
+
/*!
\fn bool operator==(const QQuaternion &q1, const QQuaternion &q2)
\relates QQuaternion
@@ -470,6 +839,18 @@ QQuaternion QQuaternion::fromAxisAndAngle
\sa QQuaternion::operator/=()
*/
+#ifndef QT_NO_VECTOR3D
+
+/*!
+ \fn QVector3D operator*(const QQuaternion &quaternion, const QVector3D &vec)
+ \since 5.5
+ \relates QQuaternion
+
+ Rotates a vector \a vec with a quaternion \a quaternion to produce a new vector in 3D space.
+*/
+
+#endif
+
/*!
\fn bool qFuzzyCompare(const QQuaternion& q1, const QQuaternion& q2)
\relates QQuaternion
@@ -499,13 +880,10 @@ QQuaternion QQuaternion::slerp
return q2;
// Determine the angle between the two quaternions.
- QQuaternion q2b;
- float dot;
- dot = q1.xp * q2.xp + q1.yp * q2.yp + q1.zp * q2.zp + q1.wp * q2.wp;
- if (dot >= 0.0f) {
- q2b = q2;
- } else {
- q2b = -q2;
+ QQuaternion q2b(q2);
+ float dot = QQuaternion::dotProduct(q1, q2);
+ if (dot < 0.0f) {
+ q2b = -q2b;
dot = -dot;
}
@@ -514,11 +892,11 @@ QQuaternion QQuaternion::slerp
float factor1 = 1.0f - t;
float factor2 = t;
if ((1.0f - dot) > 0.0000001) {
- float angle = acosf(dot);
- float sinOfAngle = sinf(angle);
+ float angle = std::acos(dot);
+ float sinOfAngle = std::sin(angle);
if (sinOfAngle > 0.0000001) {
- factor1 = sinf((1.0f - t) * angle) / sinOfAngle;
- factor2 = sinf(t * angle) / sinOfAngle;
+ factor1 = std::sin((1.0f - t) * angle) / sinOfAngle;
+ factor2 = std::sin(t * angle) / sinOfAngle;
}
}
@@ -551,13 +929,10 @@ QQuaternion QQuaternion::nlerp
return q2;
// Determine the angle between the two quaternions.
- QQuaternion q2b;
- float dot;
- dot = q1.xp * q2.xp + q1.yp * q2.yp + q1.zp * q2.zp + q1.wp * q2.wp;
- if (dot >= 0.0f)
- q2b = q2;
- else
- q2b = -q2;
+ QQuaternion q2b(q2);
+ float dot = QQuaternion::dotProduct(q1, q2);
+ if (dot < 0.0f)
+ q2b = -q2b;
// Perform the linear interpolation.
return (q1 * (1.0f - t) + q2b * t).normalized();
@@ -575,10 +950,11 @@ QQuaternion::operator QVariant() const
QDebug operator<<(QDebug dbg, const QQuaternion &q)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QQuaternion(scalar:" << q.scalar()
<< ", vector:(" << q.x() << ", "
<< q.y() << ", " << q.z() << "))";
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index e0e52cefdd..c3918645d4 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -34,6 +34,7 @@
#ifndef QQUATERNION_H
#define QQUATERNION_H
+#include <QtGui/qgenericmatrix.h>
#include <QtGui/qvector3d.h>
#include <QtGui/qvector4d.h>
@@ -49,6 +50,7 @@ class Q_GUI_EXPORT QQuaternion
{
public:
QQuaternion();
+ explicit QQuaternion(Qt::Initialization) {}
QQuaternion(float scalar, float xpos, float ypos, float zpos);
#ifndef QT_NO_VECTOR3D
QQuaternion(float scalar, const QVector3D& vector);
@@ -76,12 +78,16 @@ public:
void setZ(float z);
void setScalar(float scalar);
+ Q_DECL_CONSTEXPR static inline float dotProduct(const QQuaternion &q1, const QQuaternion &q2);
+
float length() const;
float lengthSquared() const;
QQuaternion normalized() const;
void normalize();
+ inline QQuaternion inverted() const;
+
QQuaternion conjugate() const;
QVector3D rotatedVector(const QVector3D& vector) const;
@@ -111,11 +117,30 @@ public:
operator QVariant() const;
#ifndef QT_NO_VECTOR3D
+ inline void getAxisAndAngle(QVector3D *axis, float *angle) const;
static QQuaternion fromAxisAndAngle(const QVector3D& axis, float angle);
#endif
+ void getAxisAndAngle(float *x, float *y, float *z, float *angle) const;
static QQuaternion fromAxisAndAngle
(float x, float y, float z, float angle);
+#ifndef QT_NO_VECTOR3D
+ inline QVector3D toEulerAngles() const;
+ static inline QQuaternion fromEulerAngles(const QVector3D &eulerAngles);
+#endif
+ void getEulerAngles(float *pitch, float *yaw, float *roll) const;
+ static QQuaternion fromEulerAngles(float pitch, float yaw, float roll);
+
+ QMatrix3x3 toRotationMatrix() const;
+ static QQuaternion fromRotationMatrix(const QMatrix3x3 &rot3x3);
+
+#ifndef QT_NO_VECTOR3D
+ void getAxes(QVector3D *xAxis, QVector3D *yAxis, QVector3D *zAxis) const;
+ static QQuaternion fromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis);
+
+ static QQuaternion rotationTo(const QVector3D &from, const QVector3D &to);
+#endif
+
static QQuaternion slerp
(const QQuaternion& q1, const QQuaternion& q2, float t);
static QQuaternion nlerp
@@ -152,6 +177,23 @@ inline void QQuaternion::setY(float aY) { yp = aY; }
inline void QQuaternion::setZ(float aZ) { zp = aZ; }
inline void QQuaternion::setScalar(float aScalar) { wp = aScalar; }
+Q_DECL_CONSTEXPR inline float QQuaternion::dotProduct(const QQuaternion &q1, const QQuaternion &q2)
+{
+ return q1.xp * q2.xp + q1.yp * q2.yp + q1.zp * q2.zp + q1.wp * q2.wp;
+}
+
+inline QQuaternion QQuaternion::inverted() const
+{
+ // Need some extra precision if the length is very small.
+ double len = double(xp) * double(xp) +
+ double(yp) * double(yp) +
+ double(zp) * double(zp) +
+ double(wp) * double(wp);
+ if (!qFuzzyIsNull(len))
+ return QQuaternion(wp / len, -xp / len, -yp / len, -zp / len);
+ return QQuaternion(0.0f, 0.0f, 0.0f, 0.0f);
+}
+
inline QQuaternion QQuaternion::conjugate() const
{
return QQuaternion(wp, -xp, -yp, -zp);
@@ -280,6 +322,30 @@ inline QVector3D QQuaternion::vector() const
return QVector3D(xp, yp, zp);
}
+inline QVector3D operator*(const QQuaternion &quaternion, const QVector3D &vec)
+{
+ return quaternion.rotatedVector(vec);
+}
+
+inline void QQuaternion::getAxisAndAngle(QVector3D *axis, float *angle) const
+{
+ float aX, aY, aZ;
+ getAxisAndAngle(&aX, &aY, &aZ, angle);
+ *axis = QVector3D(aX, aY, aZ);
+}
+
+inline QVector3D QQuaternion::toEulerAngles() const
+{
+ float pitch, yaw, roll;
+ getEulerAngles(&pitch, &yaw, &roll);
+ return QVector3D(pitch, yaw, roll);
+}
+
+inline QQuaternion QQuaternion::fromEulerAngles(const QVector3D &eulerAngles)
+{
+ return QQuaternion::fromEulerAngles(eulerAngles.x(), eulerAngles.y(), eulerAngles.z());
+}
+
#endif
inline void QQuaternion::setVector(float aX, float aY, float aZ)
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index c46dd35766..2d8a1d3a0f 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -64,6 +64,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QVector2D::QVector2D(Qt::Initialization)
+ \since 5.5
+ \internal
+
+ Constructs a vector without initializing the contents.
+*/
+
+/*!
\fn QVector2D::QVector2D(float xpos, float ypos)
Constructs a vector with coordinates (\a xpos, \a ypos).
@@ -181,7 +189,7 @@ float QVector2D::length() const
// Need some extra precision if the length is very small.
double len = double(xp) * double(xp) +
double(yp) * double(yp);
- return float(sqrt(len));
+ return float(std::sqrt(len));
}
/*!
@@ -212,7 +220,7 @@ QVector2D QVector2D::normalized() const
if (qFuzzyIsNull(len - 1.0f)) {
return *this;
} else if (!qFuzzyIsNull(len)) {
- double sqrtLen = sqrt(len);
+ double sqrtLen = std::sqrt(len);
return QVector2D(float(double(xp) / sqrtLen), float(double(yp) / sqrtLen));
} else {
return QVector2D();
@@ -233,7 +241,7 @@ void QVector2D::normalize()
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
- len = sqrt(len);
+ len = std::sqrt(len);
xp = float(double(xp) / len);
yp = float(double(yp) / len);
@@ -316,6 +324,16 @@ float QVector2D::distanceToLine
*/
/*!
+ \fn QVector2D &QVector2D::operator/=(const QVector2D &vector)
+ \since 5.5
+
+ Divides the components of this vector by the corresponding
+ components in \a vector.
+
+ \sa operator*=()
+*/
+
+/*!
Returns the dot product of \a v1 and \a v2.
*/
float QVector2D::dotProduct(const QVector2D& v1, const QVector2D& v2)
@@ -407,6 +425,17 @@ float QVector2D::dotProduct(const QVector2D& v1, const QVector2D& v2)
*/
/*!
+ \fn const QVector2D operator/(const QVector2D &vector, const QVector2D &divisor)
+ \relates QVector2D
+ \since 5.5
+
+ Returns the QVector2D object formed by dividing components of the given
+ \a vector by a respective components of the given \a divisor.
+
+ \sa QVector2D::operator/=()
+*/
+
+/*!
\fn bool qFuzzyCompare(const QVector2D& v1, const QVector2D& v2)
\relates QVector2D
@@ -470,8 +499,9 @@ QVector2D::operator QVariant() const
QDebug operator<<(QDebug dbg, const QVector2D &vector)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QVector2D(" << vector.x() << ", " << vector.y() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index 2cacd8ade0..20264fa84f 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -50,6 +50,7 @@ class Q_GUI_EXPORT QVector2D
{
public:
Q_DECL_CONSTEXPR QVector2D();
+ explicit QVector2D(Qt::Initialization) {}
Q_DECL_CONSTEXPR QVector2D(float xpos, float ypos);
Q_DECL_CONSTEXPR explicit QVector2D(const QPoint& point);
Q_DECL_CONSTEXPR explicit QVector2D(const QPointF& point);
@@ -85,6 +86,7 @@ public:
QVector2D &operator*=(float factor);
QVector2D &operator*=(const QVector2D &vector);
QVector2D &operator/=(float divisor);
+ inline QVector2D &operator/=(const QVector2D &vector);
static float dotProduct(const QVector2D& v1, const QVector2D& v2); //In Qt 6 convert to inline and constexpr
@@ -97,6 +99,7 @@ public:
Q_DECL_CONSTEXPR friend inline const QVector2D operator*(const QVector2D &v1, const QVector2D &v2);
Q_DECL_CONSTEXPR friend inline const QVector2D operator-(const QVector2D &vector);
Q_DECL_CONSTEXPR friend inline const QVector2D operator/(const QVector2D &vector, float divisor);
+ Q_DECL_CONSTEXPR friend inline const QVector2D operator/(const QVector2D &vector, const QVector2D &divisor);
Q_DECL_CONSTEXPR friend inline bool qFuzzyCompare(const QVector2D& v1, const QVector2D& v2);
@@ -187,6 +190,13 @@ inline QVector2D &QVector2D::operator/=(float divisor)
return *this;
}
+inline QVector2D &QVector2D::operator/=(const QVector2D &vector)
+{
+ xp /= vector.xp;
+ yp /= vector.yp;
+ return *this;
+}
+
Q_DECL_CONSTEXPR inline bool operator==(const QVector2D &v1, const QVector2D &v2)
{
return v1.xp == v2.xp && v1.yp == v2.yp;
@@ -232,6 +242,11 @@ Q_DECL_CONSTEXPR inline const QVector2D operator/(const QVector2D &vector, float
return QVector2D(vector.xp / divisor, vector.yp / divisor);
}
+Q_DECL_CONSTEXPR inline const QVector2D operator/(const QVector2D &vector, const QVector2D &divisor)
+{
+ return QVector2D(vector.xp / divisor.xp, vector.yp / divisor.yp);
+}
+
Q_DECL_CONSTEXPR inline bool qFuzzyCompare(const QVector2D& v1, const QVector2D& v2)
{
return qFuzzyCompare(v1.xp, v2.xp) && qFuzzyCompare(v1.yp, v2.yp);
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 75d61e5f85..19aa4facdb 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -34,10 +34,12 @@
#include "qvector3d.h"
#include "qvector2d.h"
#include "qvector4d.h"
+#include "qmatrix4x4.h"
#include <QtCore/qdatastream.h>
#include <QtCore/qmath.h>
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
+#include <QtCore/qrect.h>
QT_BEGIN_NAMESPACE
@@ -67,6 +69,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QVector3D::QVector3D(Qt::Initialization)
+ \since 5.5
+ \internal
+
+ Constructs a vector without initializing the contents.
+*/
+
+/*!
\fn QVector3D::QVector3D(float xpos, float ypos, float zpos)
Constructs a vector with coordinates (\a xpos, \a ypos, \a zpos).
@@ -225,7 +235,7 @@ QVector3D QVector3D::normalized() const
if (qFuzzyIsNull(len - 1.0f)) {
return *this;
} else if (!qFuzzyIsNull(len)) {
- double sqrtLen = sqrt(len);
+ double sqrtLen = std::sqrt(len);
return QVector3D(float(double(xp) / sqrtLen),
float(double(yp) / sqrtLen),
float(double(zp) / sqrtLen));
@@ -249,7 +259,7 @@ void QVector3D::normalize()
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
- len = sqrt(len);
+ len = std::sqrt(len);
xp = float(double(xp) / len);
yp = float(double(yp) / len);
@@ -306,6 +316,16 @@ void QVector3D::normalize()
*/
/*!
+ \fn QVector3D &QVector3D::operator/=(const QVector3D &vector)
+ \since 5.5
+
+ Divides the components of this vector by the corresponding
+ components in \a vector.
+
+ \sa operator*=()
+*/
+
+/*!
Returns the dot product of \a v1 and \a v2.
*/
float QVector3D::dotProduct(const QVector3D& v1, const QVector3D& v2)
@@ -359,6 +379,69 @@ QVector3D QVector3D::normal
}
/*!
+ \since 5.5
+
+ Returns the window coordinates of this vector initially in object/model
+ coordinates using the model view matrix \a modelView, the projection matrix
+ \a projection and the viewport dimensions \a viewport.
+
+ When transforming from clip to normalized space, a division by the w
+ component on the vector components takes place. To prevent dividing by 0 if
+ w equals to 0, it is set to 1.
+
+ \note the returned y coordinates are in OpenGL orientation. OpenGL expects
+ the bottom to be 0 whereas for Qt top is 0.
+
+ \sa unproject()
+ */
+QVector3D QVector3D::project(const QMatrix4x4 &modelView, const QMatrix4x4 &projection, const QRect &viewport) const
+{
+ QVector4D tmp(*this, 1.0f);
+ tmp = projection * modelView * tmp;
+ if (qFuzzyIsNull(tmp.w()))
+ tmp.setW(1.0f);
+ tmp /= tmp.w();
+
+ tmp = tmp * 0.5f + QVector4D(0.5f, 0.5f, 0.5f, 0.5f);
+ tmp.setX(tmp.x() * viewport.width() + viewport.x());
+ tmp.setY(tmp.y() * viewport.height() + viewport.y());
+
+ return tmp.toVector3D();
+}
+
+/*!
+ \since 5.5
+
+ Returns the object/model coordinates of this vector initially in window
+ coordinates using the model view matrix \a modelView, the projection matrix
+ \a projection and the viewport dimensions \a viewport.
+
+ When transforming from clip to normalized space, a division by the w
+ component of the vector components takes place. To prevent dividing by 0 if
+ w equals to 0, it is set to 1.
+
+ \note y coordinates in \a viewport should use OpenGL orientation. OpenGL
+ expects the bottom to be 0 whereas for Qt top is 0.
+
+ \sa project()
+ */
+QVector3D QVector3D::unproject(const QMatrix4x4 &modelView, const QMatrix4x4 &projection, const QRect &viewport) const
+{
+ QMatrix4x4 inverse = QMatrix4x4( projection * modelView ).inverted();
+
+ QVector4D tmp(*this, 1.0f);
+ tmp.setX((tmp.x() - float(viewport.x())) / float(viewport.width()));
+ tmp.setY((tmp.y() - float(viewport.y())) / float(viewport.height()));
+ tmp = tmp * 2.0f - QVector4D(1.0f, 1.0f, 1.0f, 1.0f);
+
+ QVector4D obj = inverse * tmp;
+ if (qFuzzyIsNull(obj.w()))
+ obj.setW(1.0f);
+ obj /= obj.w();
+ return obj.toVector3D();
+}
+
+/*!
\since 5.1
Returns the distance from this vertex to a point defined by
@@ -513,6 +596,17 @@ float QVector3D::distanceToLine
*/
/*!
+ \fn const QVector3D operator/(const QVector3D &vector, const QVector3D &divisor)
+ \relates QVector3D
+ \since 5.5
+
+ Returns the QVector3D object formed by dividing components of the given
+ \a vector by a respective components of the given \a divisor.
+
+ \sa QVector3D::operator/=()
+*/
+
+/*!
\fn bool qFuzzyCompare(const QVector3D& v1, const QVector3D& v2)
\relates QVector3D
@@ -585,7 +679,7 @@ float QVector3D::length() const
double len = double(xp) * double(xp) +
double(yp) * double(yp) +
double(zp) * double(zp);
- return float(sqrt(len));
+ return float(std::sqrt(len));
}
/*!
@@ -603,9 +697,10 @@ float QVector3D::lengthSquared() const
QDebug operator<<(QDebug dbg, const QVector3D &vector)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QVector3D("
<< vector.x() << ", " << vector.y() << ", " << vector.z() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index 40e9035621..5be637e0c5 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -43,6 +43,7 @@ QT_BEGIN_NAMESPACE
class QMatrix4x4;
class QVector2D;
class QVector4D;
+class QRect;
#ifndef QT_NO_VECTOR3D
@@ -50,6 +51,7 @@ class Q_GUI_EXPORT QVector3D
{
public:
Q_DECL_CONSTEXPR QVector3D();
+ explicit QVector3D(Qt::Initialization) {}
Q_DECL_CONSTEXPR QVector3D(float xpos, float ypos, float zpos) : xp(xpos), yp(ypos), zp(zpos) {}
Q_DECL_CONSTEXPR explicit QVector3D(const QPoint& point);
@@ -86,6 +88,7 @@ public:
QVector3D &operator*=(float factor);
QVector3D &operator*=(const QVector3D& vector);
QVector3D &operator/=(float divisor);
+ inline QVector3D &operator/=(const QVector3D &vector);
static float dotProduct(const QVector3D& v1, const QVector3D& v2); //In Qt 6 convert to inline and constexpr
static QVector3D crossProduct(const QVector3D& v1, const QVector3D& v2); //in Qt 6 convert to inline and constexpr
@@ -94,6 +97,9 @@ public:
static QVector3D normal
(const QVector3D& v1, const QVector3D& v2, const QVector3D& v3);
+ QVector3D project(const QMatrix4x4 &modelView, const QMatrix4x4 &projection, const QRect &viewport) const;
+ QVector3D unproject(const QMatrix4x4 &modelView, const QMatrix4x4 &projection, const QRect &viewport) const;
+
float distanceToPoint(const QVector3D& point) const;
float distanceToPlane(const QVector3D& plane, const QVector3D& normal) const;
float distanceToPlane(const QVector3D& plane1, const QVector3D& plane2, const QVector3D& plane3) const;
@@ -108,6 +114,7 @@ public:
Q_DECL_CONSTEXPR friend const QVector3D operator*(const QVector3D &v1, const QVector3D& v2);
Q_DECL_CONSTEXPR friend inline const QVector3D operator-(const QVector3D &vector);
Q_DECL_CONSTEXPR friend inline const QVector3D operator/(const QVector3D &vector, float divisor);
+ Q_DECL_CONSTEXPR friend inline const QVector3D operator/(const QVector3D &vector, const QVector3D &divisor);
Q_DECL_CONSTEXPR friend inline bool qFuzzyCompare(const QVector3D& v1, const QVector3D& v2);
@@ -207,6 +214,14 @@ inline QVector3D &QVector3D::operator/=(float divisor)
return *this;
}
+inline QVector3D &QVector3D::operator/=(const QVector3D &vector)
+{
+ xp /= vector.xp;
+ yp /= vector.yp;
+ zp /= vector.zp;
+ return *this;
+}
+
Q_DECL_CONSTEXPR inline bool operator==(const QVector3D &v1, const QVector3D &v2)
{
return v1.xp == v2.xp && v1.yp == v2.yp && v1.zp == v2.zp;
@@ -252,6 +267,11 @@ Q_DECL_CONSTEXPR inline const QVector3D operator/(const QVector3D &vector, float
return QVector3D(vector.xp / divisor, vector.yp / divisor, vector.zp / divisor);
}
+Q_DECL_CONSTEXPR inline const QVector3D operator/(const QVector3D &vector, const QVector3D &divisor)
+{
+ return QVector3D(vector.xp / divisor.xp, vector.yp / divisor.yp, vector.zp / divisor.zp);
+}
+
Q_DECL_CONSTEXPR inline bool qFuzzyCompare(const QVector3D& v1, const QVector3D& v2)
{
return qFuzzyCompare(v1.xp, v2.xp) &&
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index 3603f655cb..494e6f97f0 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -63,6 +63,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QVector4D::QVector4D(Qt::Initialization)
+ \since 5.5
+ \internal
+
+ Constructs a vector without initializing the contents.
+*/
+
+/*!
\fn QVector4D::QVector4D(float xpos, float ypos, float zpos, float wpos)
Constructs a vector with coordinates (\a xpos, \a ypos, \a zpos, \a wpos).
@@ -248,7 +256,7 @@ float QVector4D::length() const
double(yp) * double(yp) +
double(zp) * double(zp) +
double(wp) * double(wp);
- return float(sqrt(len));
+ return float(std::sqrt(len));
}
/*!
@@ -281,7 +289,7 @@ QVector4D QVector4D::normalized() const
if (qFuzzyIsNull(len - 1.0f)) {
return *this;
} else if (!qFuzzyIsNull(len)) {
- double sqrtLen = sqrt(len);
+ double sqrtLen = std::sqrt(len);
return QVector4D(float(double(xp) / sqrtLen),
float(double(yp) / sqrtLen),
float(double(zp) / sqrtLen),
@@ -307,7 +315,7 @@ void QVector4D::normalize()
if (qFuzzyIsNull(len - 1.0f) || qFuzzyIsNull(len))
return;
- len = sqrt(len);
+ len = std::sqrt(len);
xp = float(double(xp) / len);
yp = float(double(yp) / len);
@@ -359,6 +367,16 @@ void QVector4D::normalize()
*/
/*!
+ \fn QVector4D &QVector4D::operator/=(const QVector4D &vector)
+ \since 5.5
+
+ Divides the components of this vector by the corresponding
+ components in \a vector.
+
+ \sa operator*=()
+*/
+
+/*!
Returns the dot product of \a v1 and \a v2.
*/
float QVector4D::dotProduct(const QVector4D& v1, const QVector4D& v2)
@@ -452,6 +470,17 @@ float QVector4D::dotProduct(const QVector4D& v1, const QVector4D& v2)
*/
/*!
+ \fn const QVector4D operator/(const QVector4D &vector, const QVector4D &divisor)
+ \relates QVector4D
+ \since 5.5
+
+ Returns the QVector4D object formed by dividing components of the given
+ \a vector by a respective components of the given \a divisor.
+
+ \sa QVector4D::operator/=()
+*/
+
+/*!
\fn bool qFuzzyCompare(const QVector4D& v1, const QVector4D& v2)
\relates QVector4D
@@ -544,10 +573,11 @@ QVector4D::operator QVariant() const
QDebug operator<<(QDebug dbg, const QVector4D &vector)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QVector4D("
<< vector.x() << ", " << vector.y() << ", "
<< vector.z() << ", " << vector.w() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index 291af5c072..aa69104f55 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -50,6 +50,7 @@ class Q_GUI_EXPORT QVector4D
{
public:
Q_DECL_CONSTEXPR QVector4D();
+ explicit QVector4D(Qt::Initialization) {}
Q_DECL_CONSTEXPR QVector4D(float xpos, float ypos, float zpos, float wpos);
Q_DECL_CONSTEXPR explicit QVector4D(const QPoint& point);
Q_DECL_CONSTEXPR explicit QVector4D(const QPointF& point);
@@ -88,6 +89,7 @@ public:
QVector4D &operator*=(float factor);
QVector4D &operator*=(const QVector4D &vector);
QVector4D &operator/=(float divisor);
+ inline QVector4D &operator/=(const QVector4D &vector);
static float dotProduct(const QVector4D& v1, const QVector4D& v2); //In Qt 6 convert to inline and constexpr
@@ -100,6 +102,7 @@ public:
Q_DECL_CONSTEXPR friend inline const QVector4D operator*(const QVector4D &v1, const QVector4D& v2);
Q_DECL_CONSTEXPR friend inline const QVector4D operator-(const QVector4D &vector);
Q_DECL_CONSTEXPR friend inline const QVector4D operator/(const QVector4D &vector, float divisor);
+ Q_DECL_CONSTEXPR friend inline const QVector4D operator/(const QVector4D &vector, const QVector4D &divisor);
Q_DECL_CONSTEXPR friend inline bool qFuzzyCompare(const QVector4D& v1, const QVector4D& v2);
@@ -210,6 +213,15 @@ inline QVector4D &QVector4D::operator/=(float divisor)
return *this;
}
+inline QVector4D &QVector4D::operator/=(const QVector4D &vector)
+{
+ xp /= vector.xp;
+ yp /= vector.yp;
+ zp /= vector.zp;
+ wp /= vector.wp;
+ return *this;
+}
+
Q_DECL_CONSTEXPR inline bool operator==(const QVector4D &v1, const QVector4D &v2)
{
return v1.xp == v2.xp && v1.yp == v2.yp && v1.zp == v2.zp && v1.wp == v2.wp;
@@ -255,6 +267,11 @@ Q_DECL_CONSTEXPR inline const QVector4D operator/(const QVector4D &vector, float
return QVector4D(vector.xp / divisor, vector.yp / divisor, vector.zp / divisor, vector.wp / divisor);
}
+Q_DECL_CONSTEXPR inline const QVector4D operator/(const QVector4D &vector, const QVector4D &divisor)
+{
+ return QVector4D(vector.xp / divisor.xp, vector.yp / divisor.yp, vector.zp / divisor.zp, vector.wp / divisor.wp);
+}
+
Q_DECL_CONSTEXPR inline bool qFuzzyCompare(const QVector4D& v1, const QVector4D& v2)
{
return qFuzzyCompare(v1.xp, v2.xp) &&
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
index adf5428c49..8659bd6dea 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -32,7 +32,11 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
opengl/qopenglversionfunctionsfactory_p.h \
opengl/qopenglvertexarrayobject.h \
opengl/qopengldebug.h \
- opengl/qopengltextureblitter_p.h
+ opengl/qopengltextureblitter_p.h \
+ opengl/qopengltexture.h \
+ opengl/qopengltexture_p.h \
+ opengl/qopengltexturehelper_p.h \
+ opengl/qopenglpixeltransferoptions.h
SOURCES += opengl/qopengl.cpp \
opengl/qopenglfunctions.cpp \
@@ -53,18 +57,10 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
opengl/qopenglversionfunctionsfactory.cpp \
opengl/qopenglvertexarrayobject.cpp \
opengl/qopengldebug.cpp \
- opengl/qopengltextureblitter.cpp
-
- !wince* {
- HEADERS += opengl/qopengltexture.h \
- opengl/qopengltexture_p.h \
- opengl/qopengltexturehelper_p.h \
- opengl/qopenglpixeltransferoptions.h
-
- SOURCES += opengl/qopengltexture.cpp \
- opengl/qopengltexturehelper.cpp \
- opengl/qopenglpixeltransferoptions.cpp
- }
+ opengl/qopengltextureblitter.cpp \
+ opengl/qopengltexture.cpp \
+ opengl/qopengltexturehelper.cpp \
+ opengl/qopenglpixeltransferoptions.cpp
!contains(QT_CONFIG, opengles2) {
HEADERS += opengl/qopenglfunctions_1_0.h \
@@ -83,12 +79,16 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
opengl/qopenglfunctions_4_1_core.h \
opengl/qopenglfunctions_4_2_core.h \
opengl/qopenglfunctions_4_3_core.h \
+ opengl/qopenglfunctions_4_4_core.h \
+ opengl/qopenglfunctions_4_5_core.h \
opengl/qopenglfunctions_3_2_compatibility.h \
opengl/qopenglfunctions_3_3_compatibility.h \
opengl/qopenglfunctions_4_0_compatibility.h \
opengl/qopenglfunctions_4_1_compatibility.h \
opengl/qopenglfunctions_4_2_compatibility.h \
opengl/qopenglfunctions_4_3_compatibility.h \
+ opengl/qopenglfunctions_4_4_compatibility.h \
+ opengl/qopenglfunctions_4_5_compatibility.h \
opengl/qopenglqueryhelper_p.h \
opengl/qopengltimerquery.h
@@ -108,12 +108,16 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
opengl/qopenglfunctions_4_1_core.cpp \
opengl/qopenglfunctions_4_2_core.cpp \
opengl/qopenglfunctions_4_3_core.cpp \
+ opengl/qopenglfunctions_4_4_core.cpp \
+ opengl/qopenglfunctions_4_5_core.cpp \
opengl/qopenglfunctions_3_2_compatibility.cpp \
opengl/qopenglfunctions_3_3_compatibility.cpp \
opengl/qopenglfunctions_4_0_compatibility.cpp \
opengl/qopenglfunctions_4_1_compatibility.cpp \
opengl/qopenglfunctions_4_2_compatibility.cpp \
opengl/qopenglfunctions_4_3_compatibility.cpp \
+ opengl/qopenglfunctions_4_4_compatibility.cpp \
+ opengl/qopenglfunctions_4_5_compatibility.cpp \
opengl/qopengltimerquery.cpp
}
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 2b23bb8346..61d0614724 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -37,6 +37,15 @@
#include "qopenglcontext.h"
#include "qopenglfunctions.h"
+#include <QtCore/QDebug>
+#include <QtCore/QJsonDocument>
+#include <QtCore/QJsonValue>
+#include <QtCore/QJsonObject>
+#include <QtCore/QJsonArray>
+#include <QtCore/QTextStream>
+#include <QtCore/QFile>
+#include <QtCore/QDir>
+
QT_BEGIN_NAMESPACE
#if defined(QT_OPENGL_3)
@@ -79,4 +88,364 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher()
}
}
+/* Helpers to read out the list of features matching a device from
+ * a Chromium driver bug list of the format using a subset of keys
+ * (namely, matching by gl_vendor RegExp is not implemented):
+ {
+ "entries": [
+ {
+ "id": 20,
+ "description": "Disable EXT_draw_buffers on GeForce GT 650M on Linux due to driver bugs",
+ "os": {
+ "type": "linux"
+ },
+ // Optional: "exceptions" list
+ "vendor_id": "0x10de",
+ "device_id": ["0x0fd5"],
+ "multi_gpu_category": "any",
+ "features": [
+ "disable_ext_draw_buffers"
+ ]
+ },
+ ....
+ }
+*/
+
+QDebug operator<<(QDebug d, const QOpenGLConfig::Gpu &g)
+{
+ QDebugStateSaver s(d);
+ d.nospace();
+ d << "Gpu(";
+ if (g.isValid()) {
+ d << "vendor=" << hex << showbase <<g.vendorId << ", device=" << g.deviceId
+ << "version=" << g.driverVersion;
+ } else {
+ d << 0;
+ }
+ d << ')';
+ return d;
+}
+
+enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan };
+static const char *operators[] = {"!=", "<", "<=", "=", ">", ">="};
+
+static inline QString valueKey() { return QStringLiteral("value"); }
+static inline QString opKey() { return QStringLiteral("op"); }
+static inline QString versionKey() { return QStringLiteral("version"); }
+static inline QString typeKey() { return QStringLiteral("type"); }
+static inline QString osKey() { return QStringLiteral("os"); }
+static inline QString vendorIdKey() { return QStringLiteral("vendor_id"); }
+static inline QString glVendorKey() { return QStringLiteral("gl_vendor"); }
+static inline QString deviceIdKey() { return QStringLiteral("device_id"); }
+static inline QString driverVersionKey() { return QStringLiteral("driver_version"); }
+static inline QString featuresKey() { return QStringLiteral("features"); }
+static inline QString idKey() { return QStringLiteral("id"); }
+static inline QString descriptionKey() { return QStringLiteral("description"); }
+static inline QString exceptionsKey() { return QStringLiteral("exceptions"); }
+
+namespace {
+// VersionTerm describing a version term consisting of number and operator
+// found in "os", "driver_version", "gl_version".
+struct VersionTerm {
+ VersionTerm() : op(NotEqual) {}
+ static VersionTerm fromJson(const QJsonValue &v);
+ bool isNull() const { return number.isNull(); }
+ bool matches(const QVersionNumber &other) const;
+
+ QVersionNumber number;
+ Operator op;
+};
+
+bool VersionTerm::matches(const QVersionNumber &other) const
+{
+ if (isNull() || other.isNull()) {
+ qWarning() << Q_FUNC_INFO << "called with invalid parameters";
+ return false;
+ }
+ switch (op) {
+ case NotEqual:
+ return other != number;
+ case LessThan:
+ return other < number;
+ case LessEqualThan:
+ return other <= number;
+ case Equals:
+ return other == number;
+ case GreaterThan:
+ return other > number;
+ case GreaterEqualThan:
+ return other >= number;
+ }
+ return false;
+}
+
+VersionTerm VersionTerm::fromJson(const QJsonValue &v)
+{
+ VersionTerm result;
+ if (!v.isObject())
+ return result;
+ const QJsonObject o = v.toObject();
+ result.number = QVersionNumber::fromString(o.value(valueKey()).toString());
+ const QString opS = o.value(opKey()).toString();
+ for (size_t i = 0; i < sizeof(operators) / sizeof(operators[0]); ++i) {
+ if (opS == QLatin1String(operators[i])) {
+ result.op = static_cast<Operator>(i);
+ break;
+ }
+ }
+ return result;
+}
+
+// OS term consisting of name and optional version found in
+// under "os" in main array and in "exceptions" lists.
+struct OsTypeTerm
+{
+ static OsTypeTerm fromJson(const QJsonValue &v);
+ static QString hostOs();
+ static QVersionNumber hostKernelVersion() { return QVersionNumber::fromString(QSysInfo::kernelVersion()); }
+
+ bool isNull() const { return type.isEmpty(); }
+ bool matches(const QString &osName, const QVersionNumber &kernelVersion) const
+ {
+ if (isNull() || osName.isEmpty() || kernelVersion.isNull()) {
+ qWarning() << Q_FUNC_INFO << "called with invalid parameters";
+ return false;
+ }
+ if (type != osName)
+ return false;
+ return versionTerm.isNull() || versionTerm.matches(kernelVersion);
+ }
+
+ QString type;
+ VersionTerm versionTerm;
+};
+
+OsTypeTerm OsTypeTerm::fromJson(const QJsonValue &v)
+{
+ OsTypeTerm result;
+ if (!v.isObject())
+ return result;
+ const QJsonObject o = v.toObject();
+ result.type = o.value(typeKey()).toString();
+ result.versionTerm = VersionTerm::fromJson(o.value(versionKey()));
+ return result;
+}
+
+QString OsTypeTerm::hostOs()
+{
+ // Determine Host OS.
+#if defined(Q_OS_WIN)
+ return QStringLiteral("win");
+#elif defined(Q_OS_LINUX)
+ return QStringLiteral("linux");
+#elif defined(Q_OS_OSX)
+ return QStringLiteral("macosx");
+#elif defined(Q_OS_ANDROID)
+ return QStringLiteral("android");
+#else
+ return QString();
+#endif
+}
+} // anonymous namespace
+
+typedef QJsonArray::ConstIterator JsonArrayConstIt;
+
+static inline bool contains(const QJsonArray &a, unsigned needle)
+{
+ for (JsonArrayConstIt it = a.constBegin(), cend = a.constEnd(); it != cend; ++it) {
+ if (needle == it->toString().toUInt(Q_NULLPTR, /* base */ 0))
+ return true;
+ }
+ return false;
+}
+
+static QString msgSyntaxWarning(const QJsonObject &object, const QString &what)
+{
+ QString result;
+ QTextStream(&result) << "Id " << object.value(idKey()).toInt()
+ << " (\"" << object.value(descriptionKey()).toString()
+ << "\"): " << what;
+ return result;
+}
+
+// Check whether an entry matches. Called recursively for
+// "exceptions" list.
+
+static bool matches(const QJsonObject &object,
+ const QString &osName,
+ const QVersionNumber &kernelVersion,
+ const QOpenGLConfig::Gpu &gpu)
+{
+ const OsTypeTerm os = OsTypeTerm::fromJson(object.value(osKey()));
+ if (!os.isNull() && !os.matches(osName, kernelVersion))
+ return false;
+
+ const QJsonValue exceptionsV = object.value(exceptionsKey());
+ if (exceptionsV.isArray()) {
+ const QJsonArray exceptionsA = exceptionsV.toArray();
+ for (JsonArrayConstIt it = exceptionsA.constBegin(), cend = exceptionsA.constEnd(); it != cend; ++it) {
+ if (matches(it->toObject(), osName, kernelVersion, gpu))
+ return false;
+ }
+ }
+
+ const QJsonValue vendorV = object.value(vendorIdKey());
+ if (vendorV.isString()) {
+ if (gpu.vendorId != vendorV.toString().toUInt(Q_NULLPTR, /* base */ 0))
+ return false;
+ } else {
+ if (object.contains(glVendorKey())) {
+ qWarning().nospace() << "Id " << object.value(idKey()).toInt()
+ << ": Matching by " << glVendorKey() << " is not implemented.";
+ return false;
+ }
+ }
+
+ if (gpu.deviceId) {
+ const QJsonValue deviceIdV = object.value(deviceIdKey());
+ switch (deviceIdV.type()) {
+ case QJsonValue::Array:
+ if (!contains(deviceIdV.toArray(), gpu.deviceId))
+ return false;
+ break;
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ break;
+ default:
+ qWarning().noquote()
+ << msgSyntaxWarning(object,
+ QLatin1String("Device ID must be of type array."));
+ }
+ }
+ if (!gpu.driverVersion.isNull()) {
+ const QJsonValue driverVersionV = object.value(driverVersionKey());
+ switch (driverVersionV.type()) {
+ case QJsonValue::Object:
+ if (!VersionTerm::fromJson(driverVersionV).matches(gpu.driverVersion))
+ return false;
+ break;
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ break;
+ default:
+ qWarning().noquote()
+ << msgSyntaxWarning(object,
+ QLatin1String("Driver version must be of type object."));
+ }
+ }
+ return true;
+}
+
+static bool readGpuFeatures(const QOpenGLConfig::Gpu &gpu,
+ const QString &osName,
+ const QVersionNumber &kernelVersion,
+ const QJsonDocument &doc,
+ QSet<QString> *result,
+ QString *errorMessage)
+{
+ result->clear();
+ errorMessage->clear();
+ const QJsonValue entriesV = doc.object().value(QStringLiteral("entries"));
+ if (!entriesV.isArray()) {
+ *errorMessage = QLatin1String("No entries read.");
+ return false;
+ }
+
+ const QJsonArray entriesA = entriesV.toArray();
+ for (JsonArrayConstIt eit = entriesA.constBegin(), ecend = entriesA.constEnd(); eit != ecend; ++eit) {
+ if (eit->isObject()) {
+ const QJsonObject object = eit->toObject();
+ if (matches(object, osName, kernelVersion, gpu)) {
+ const QJsonValue featuresListV = object.value(featuresKey());
+ if (featuresListV.isArray()) {
+ const QJsonArray featuresListA = featuresListV.toArray();
+ for (JsonArrayConstIt fit = featuresListA.constBegin(), fcend = featuresListA.constEnd(); fit != fcend; ++fit)
+ result->insert(fit->toString());
+ }
+ }
+ }
+ }
+ return true;
+}
+
+static bool readGpuFeatures(const QOpenGLConfig::Gpu &gpu,
+ const QString &osName,
+ const QVersionNumber &kernelVersion,
+ const QByteArray &jsonAsciiData,
+ QSet<QString> *result, QString *errorMessage)
+{
+ result->clear();
+ errorMessage->clear();
+ QJsonParseError error;
+ const QJsonDocument document = QJsonDocument::fromJson(jsonAsciiData, &error);
+ if (document.isNull()) {
+ const int lineNumber = 1 + jsonAsciiData.left(error.offset).count('\n');
+ QTextStream str(errorMessage);
+ str << "Failed to parse data: \"" << error.errorString()
+ << "\" at line " << lineNumber << " (offset: "
+ << error.offset << ").";
+ return false;
+ }
+ return readGpuFeatures(gpu, osName, kernelVersion, document, result, errorMessage);
+}
+
+static bool readGpuFeatures(const QOpenGLConfig::Gpu &gpu,
+ const QString &osName,
+ const QVersionNumber &kernelVersion,
+ const QString &fileName,
+ QSet<QString> *result, QString *errorMessage)
+{
+ result->clear();
+ errorMessage->clear();
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QTextStream str(errorMessage);
+ str << "Cannot open \"" << QDir::toNativeSeparators(fileName) << "\": "
+ << file.errorString();
+ return false;
+ }
+ const bool success = readGpuFeatures(gpu, osName, kernelVersion, file.readAll(), result, errorMessage);
+ if (!success) {
+ errorMessage->prepend(QLatin1String("Error reading \"")
+ + QDir::toNativeSeparators(fileName)
+ + QLatin1String("\": "));
+ }
+ return success;
+}
+
+QSet<QString> QOpenGLConfig::gpuFeatures(const QOpenGLConfig::Gpu &gpu,
+ const QString &osName,
+ const QVersionNumber &kernelVersion,
+ const QJsonDocument &doc)
+{
+ QSet<QString> result;
+ QString errorMessage;
+ if (!readGpuFeatures(gpu, osName, kernelVersion, doc, &result, &errorMessage))
+ qWarning().noquote() << errorMessage;
+ return result;
+}
+
+QSet<QString> QOpenGLConfig::gpuFeatures(const QOpenGLConfig::Gpu &gpu,
+ const QString &osName,
+ const QVersionNumber &kernelVersion,
+ const QString &fileName)
+{
+ QSet<QString> result;
+ QString errorMessage;
+ if (!readGpuFeatures(gpu, osName, kernelVersion, fileName, &result, &errorMessage))
+ qWarning().noquote() << errorMessage;
+ return result;
+}
+
+QSet<QString> QOpenGLConfig::gpuFeatures(const Gpu &gpu, const QJsonDocument &doc)
+{
+ return gpuFeatures(gpu, OsTypeTerm::hostOs(), OsTypeTerm::hostKernelVersion(), doc);
+}
+
+QSet<QString> QOpenGLConfig::gpuFeatures(const Gpu &gpu, const QString &fileName)
+{
+ return gpuFeatures(gpu, OsTypeTerm::hostOs(), OsTypeTerm::hostKernelVersion(), fileName);
+}
+
+
QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index 555f4bbe09..a70bd79997 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengl2pexvertexarray.cpp b/src/gui/opengl/qopengl2pexvertexarray.cpp
index da25e0512e..c873ef00b4 100644
--- a/src/gui/opengl/qopengl2pexvertexarray.cpp
+++ b/src/gui/opengl/qopengl2pexvertexarray.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengl2pexvertexarray_p.h b/src/gui/opengl/qopengl2pexvertexarray_p.h
index 667408a819..9049752763 100644
--- a/src/gui/opengl/qopengl2pexvertexarray_p.h
+++ b/src/gui/opengl/qopengl2pexvertexarray_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengl_p.h b/src/gui/opengl/qopengl_p.h
index 0a3da9489a..e04ae05120 100644
--- a/src/gui/opengl/qopengl_p.h
+++ b/src/gui/opengl/qopengl_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -48,9 +48,13 @@
#include <qopengl.h>
#include <private/qopenglcontext_p.h>
#include <QtCore/qset.h>
+#include <QtCore/qstring.h>
+#include <private/qversionnumber_p.h>
QT_BEGIN_NAMESPACE
+class QJsonDocument;
+
class Q_GUI_EXPORT QOpenGLExtensionMatcher
{
public:
@@ -67,6 +71,46 @@ private:
QSet<QByteArray> m_extensions;
};
+class Q_GUI_EXPORT QOpenGLConfig
+{
+public:
+ struct Gpu {
+ Gpu() : vendorId(0), deviceId(0) {}
+ bool isValid() const { return deviceId; }
+ bool equals(const Gpu &other) const {
+ return vendorId == other.vendorId && deviceId == other.deviceId && driverVersion == other.driverVersion;
+ }
+
+ uint vendorId;
+ uint deviceId;
+ QVersionNumber driverVersion;
+ };
+
+ static QSet<QString> gpuFeatures(const Gpu &gpu,
+ const QString &osName, const QVersionNumber &kernelVersion,
+ const QJsonDocument &doc);
+ static QSet<QString> gpuFeatures(const Gpu &gpu,
+ const QString &osName, const QVersionNumber &kernelVersion,
+ const QString &fileName);
+ static QSet<QString> gpuFeatures(const Gpu &gpu, const QJsonDocument &doc);
+ static QSet<QString> gpuFeatures(const Gpu &gpu, const QString &fileName);
+};
+
+inline bool operator==(const QOpenGLConfig::Gpu &a, const QOpenGLConfig::Gpu &b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const QOpenGLConfig::Gpu &a, const QOpenGLConfig::Gpu &b)
+{
+ return !a.equals(b);
+}
+
+inline uint qHash(const QOpenGLConfig::Gpu &gpu)
+{
+ return qHash(gpu.vendorId) + qHash(gpu.deviceId) + qHash(gpu.driverVersion);
+}
+
QT_END_NAMESPACE
#endif // QOPENGL_H
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index c8e3782274..4155a28989 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglbuffer.h b/src/gui/opengl/qopenglbuffer.h
index ce2aff387c..847c1efaa0 100644
--- a/src/gui/opengl/qopenglbuffer.h
+++ b/src/gui/opengl/qopenglbuffer.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglcustomshaderstage.cpp b/src/gui/opengl/qopenglcustomshaderstage.cpp
index 75a0389087..e0d131e64d 100644
--- a/src/gui/opengl/qopenglcustomshaderstage.cpp
+++ b/src/gui/opengl/qopenglcustomshaderstage.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglcustomshaderstage_p.h b/src/gui/opengl/qopenglcustomshaderstage_p.h
index daef2c627c..78c414d316 100644
--- a/src/gui/opengl/qopenglcustomshaderstage_p.h
+++ b/src/gui/opengl/qopenglcustomshaderstage_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 88f00128da..114f118989 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengldebug.h b/src/gui/opengl/qopengldebug.h
index d0a4729d1f..425ab78d7a 100644
--- a/src/gui/opengl/qopengldebug.h
+++ b/src/gui/opengl/qopengldebug.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -147,7 +147,6 @@ class QOpenGLDebugLoggerPrivate;
class Q_GUI_EXPORT QOpenGLDebugLogger : public QObject
{
Q_OBJECT
- Q_ENUMS(LoggingMode)
Q_PROPERTY(LoggingMode loggingMode READ loggingMode)
public:
@@ -155,6 +154,7 @@ public:
AsynchronousLogging,
SynchronousLogging
};
+ Q_ENUM(LoggingMode)
explicit QOpenGLDebugLogger(QObject *parent = 0);
~QOpenGLDebugLogger();
diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp
index 5bdb2f35ac..853ad8b711 100644
--- a/src/gui/opengl/qopenglengineshadermanager.cpp
+++ b/src/gui/opengl/qopenglengineshadermanager.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -61,13 +61,13 @@ public:
delete m_shaders;
}
- void invalidateResource()
+ void invalidateResource() Q_DECL_OVERRIDE
{
delete m_shaders;
m_shaders = 0;
}
- void freeResource(QOpenGLContext *)
+ void freeResource(QOpenGLContext *) Q_DECL_OVERRIDE
{
}
@@ -154,6 +154,8 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context)
code[ImageSrcFragmentShader] = qopenglslImageSrcFragmentShader;
code[ImageSrcWithPatternFragmentShader] = qopenglslImageSrcWithPatternFragmentShader;
code[NonPremultipliedImageSrcFragmentShader] = qopenglslNonPremultipliedImageSrcFragmentShader;
+ code[GrayscaleImageSrcFragmentShader] = qopenglslGrayscaleImageSrcFragmentShader;
+ code[AlphaImageSrcFragmentShader] = qopenglslAlphaImageSrcFragmentShader;
code[CustomImageSrcFragmentShader] = qopenglslCustomSrcFragmentShader; // Calls "customShader", which must be appended
code[SolidBrushSrcFragmentShader] = qopenglslSolidBrushSrcFragmentShader;
if (context->isOpenGLES())
@@ -700,6 +702,16 @@ bool QOpenGLEngineShaderManager::useCorrectShaderProg()
requiredProgram.positionVertexShader = QOpenGLEngineSharedShaders::PositionOnlyVertexShader;
texCoords = true;
break;
+ case QOpenGLEngineShaderManager::GrayscaleImageSrc:
+ requiredProgram.srcPixelFragShader = QOpenGLEngineSharedShaders::GrayscaleImageSrcFragmentShader;
+ requiredProgram.positionVertexShader = QOpenGLEngineSharedShaders::PositionOnlyVertexShader;
+ texCoords = true;
+ break;
+ case QOpenGLEngineShaderManager::AlphaImageSrc:
+ requiredProgram.srcPixelFragShader = QOpenGLEngineSharedShaders::AlphaImageSrcFragmentShader;
+ requiredProgram.positionVertexShader = QOpenGLEngineSharedShaders::PositionOnlyVertexShader;
+ texCoords = true;
+ break;
case QOpenGLEngineShaderManager::PatternSrc:
requiredProgram.srcPixelFragShader = QOpenGLEngineSharedShaders::ImageSrcWithPatternFragmentShader;
requiredProgram.positionVertexShader = QOpenGLEngineSharedShaders::PositionOnlyVertexShader;
diff --git a/src/gui/opengl/qopenglengineshadermanager_p.h b/src/gui/opengl/qopenglengineshadermanager_p.h
index 2ae0ae0866..481ecee6a6 100644
--- a/src/gui/opengl/qopenglengineshadermanager_p.h
+++ b/src/gui/opengl/qopenglengineshadermanager_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -288,6 +288,8 @@ public:
ImageSrcFragmentShader,
ImageSrcWithPatternFragmentShader,
NonPremultipliedImageSrcFragmentShader,
+ GrayscaleImageSrcFragmentShader,
+ AlphaImageSrcFragmentShader,
CustomImageSrcFragmentShader,
SolidBrushSrcFragmentShader,
TextureBrushSrcFragmentShader,
@@ -322,7 +324,7 @@ public:
TotalSnippetCount, InvalidSnippetName
};
#if defined (QT_DEBUG)
- Q_ENUMS(SnippetName)
+ Q_ENUM(SnippetName)
static QByteArray snippetNameStr(SnippetName snippetName);
#endif
@@ -414,7 +416,9 @@ public:
ImageSrc = Qt::TexturePattern+1,
NonPremultipliedImageSrc = Qt::TexturePattern+2,
PatternSrc = Qt::TexturePattern+3,
- TextureSrcWithPattern = Qt::TexturePattern+4
+ TextureSrcWithPattern = Qt::TexturePattern+4,
+ GrayscaleImageSrc = Qt::TexturePattern+5,
+ AlphaImageSrc = Qt::TexturePattern+6,
};
enum Uniform {
diff --git a/src/gui/opengl/qopenglengineshadersource_p.h b/src/gui/opengl/qopenglengineshadersource_p.h
index bc81fe4c77..1f7f2f19ce 100644
--- a/src/gui/opengl/qopenglengineshadersource_p.h
+++ b/src/gui/opengl/qopenglengineshadersource_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -367,6 +367,22 @@ static const char* const qopenglslNonPremultipliedImageSrcFragmentShader = "\n\
return sample; \n\
}\n";
+static const char* const qopenglslGrayscaleImageSrcFragmentShader = "\n\
+ varying highp vec2 textureCoords; \n\
+ uniform sampler2D imageTexture; \n\
+ lowp vec4 srcPixel() \n\
+ { \n\
+ return texture2D(imageTexture, textureCoords).rrra; \n\
+ }\n";
+
+static const char* const qopenglslAlphaImageSrcFragmentShader = "\n\
+ varying highp vec2 textureCoords; \n\
+ uniform sampler2D imageTexture; \n\
+ lowp vec4 srcPixel() \n\
+ { \n\
+ return vec4(0, 0, 0, texture2D(imageTexture, textureCoords).r); \n\
+ }\n";
+
static const char* const qopenglslShockingPinkSrcFragmentShader = "\n\
lowp vec4 srcPixel() \n\
{ \n\
diff --git a/src/gui/opengl/qopenglextensions_p.h b/src/gui/opengl/qopenglextensions_p.h
index f53addaf0e..ff5d79566c 100644
--- a/src/gui/opengl/qopenglextensions_p.h
+++ b/src/gui/opengl/qopenglextensions_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -72,6 +72,9 @@ public:
void (QOPENGLF_APIENTRYP CompressedTexImage3D)(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
void (QOPENGLF_APIENTRYP CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+ void (QOPENGLF_APIENTRYP TexStorage3D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth);
+ void (QOPENGLF_APIENTRYP TexStorage2D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height);
+
private:
QLibrary m_gl;
};
@@ -106,7 +109,8 @@ public:
MapBuffer = 0x00040000,
GeometryShaders = 0x00080000,
MapBufferRange = 0x00100000,
- Sized8Formats = 0x00200000
+ Sized8Formats = 0x00200000,
+ DiscardFramebuffer = 0x00400000
};
Q_DECLARE_FLAGS(OpenGLExtensions, OpenGLExtension)
@@ -127,8 +131,12 @@ public:
void glGetBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, GLvoid *data);
+ void glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+
QOpenGLES3Helper *gles3Helper();
+ void flushShared();
+
private:
static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != 0; }
};
@@ -151,6 +159,10 @@ public:
GLenum internalFormat,
GLsizei width, GLsizei height);
void (QOPENGLF_APIENTRYP GetBufferSubData)(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, GLvoid *data);
+ void (QOPENGLF_APIENTRYP DiscardFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+
+ bool flushVendorChecked;
+ bool flushIsSufficientToSyncContexts;
};
inline GLvoid *QOpenGLExtensions::glMapBuffer(GLenum target, GLenum access)
@@ -209,6 +221,14 @@ inline void QOpenGLExtensions::glGetBufferSubData(GLenum target, qopengl_GLintpt
Q_OPENGL_FUNCTIONS_DEBUG
}
+
+inline void QOpenGLExtensions::glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ Q_D(QOpenGLExtensions);
+ Q_ASSERT(QOpenGLExtensions::isInitialized(d));
+ d->DiscardFramebuffer(target,numAttachments, attachments);
+ Q_OPENGL_FUNCTIONS_DEBUG
+}
QT_END_NAMESPACE
#endif // QOPENGL_EXTENSIONS_P_H
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index 6351b8a1e3..c4deeea4c9 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/gui/opengl/qopenglframebufferobject.h
index fbcec53335..4ce0ee26cb 100644
--- a/src/gui/opengl/qopenglframebufferobject.h
+++ b/src/gui/opengl/qopenglframebufferobject.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h
index 043e7af8cc..7f0068dfc4 100644
--- a/src/gui/opengl/qopenglframebufferobject_p.h
+++ b/src/gui/opengl/qopenglframebufferobject_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index d561e65d8e..c60532b90b 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -173,6 +173,7 @@ QT_BEGIN_NAMESPACE
\value NPOTTextures Non power of two textures are available.
\value NPOTTextureRepeat Non power of two textures can use GL_REPEAT as wrap parameter.
\value FixedFunctionPipeline The fixed function pipeline is available.
+ \value TextureRGFormats The GL_RED and GL_RG texture formats are available.
*/
// Hidden private fields for additional extension data.
@@ -185,13 +186,13 @@ struct QOpenGLFunctionsPrivateEx : public QOpenGLExtensionsPrivate, public QOpen
, m_extensions(-1)
{}
- void invalidateResource()
+ void invalidateResource() Q_DECL_OVERRIDE
{
m_features = -1;
m_extensions = -1;
}
- void freeResource(QOpenGLContext *)
+ void freeResource(QOpenGLContext *) Q_DECL_OVERRIDE
{
// no gl resources to free
}
@@ -284,10 +285,12 @@ static int qt_gl_resolve_features()
if (extensions.match("GL_OES_texture_npot"))
features |= QOpenGLFunctions::NPOTTextures |
QOpenGLFunctions::NPOTTextureRepeat;
+ if (ctx->format().majorVersion() >= 3 || extensions.match("GL_EXT_texture_rg"))
+ features |= QOpenGLFunctions::TextureRGFormats;
return features;
} else {
// OpenGL
- int features = 0;
+ int features = QOpenGLFunctions::TextureRGFormats;
QSurfaceFormat format = QOpenGLContext::currentContext()->format();
QOpenGLExtensionMatcher extensions;
@@ -412,6 +415,9 @@ static int qt_gl_resolve_extensions()
// We don't match GL_APPLE_texture_format_BGRA8888 here because it has different semantics.
if (extensionMatcher.match("GL_IMG_texture_format_BGRA8888") || extensionMatcher.match("GL_EXT_texture_format_BGRA8888"))
extensions |= QOpenGLExtensions::BGRATextureFormat;
+
+ if (extensionMatcher.match("GL_EXT_discard_framebuffer"))
+ extensions |= QOpenGLExtensions::DiscardFramebuffer;
} else {
extensions |= QOpenGLExtensions::ElementIndexUint | QOpenGLExtensions::MapBuffer;
@@ -3223,7 +3229,10 @@ QOpenGLES3Helper::QOpenGLES3Helper()
CompressedTexImage3D = (void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) m_gl.resolve("glCompressedTexImage3D");
CompressedTexSubImage3D = (void (QOPENGLF_APIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) m_gl.resolve("glCompressedTexSubImage3D");
- if (!MapBufferRange || !GenVertexArrays || !TexImage3D)
+ TexStorage3D = (void (QOPENGLF_APIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei)) m_gl.resolve("glTexStorage3D");
+ TexStorage2D = (void (QOPENGLF_APIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)) m_gl.resolve("glTexStorage2D");
+
+ if (!MapBufferRange || !GenVertexArrays || !TexImage3D || !TexStorage3D)
qFatal("OpenGL ES 3.0 entry points not found");
} else {
qFatal("Failed to load libGLESv2");
@@ -3294,6 +3303,11 @@ static void QOPENGLF_APIENTRY qopenglfResolveGetBufferSubData(GLenum target, qop
(target, offset, size, data);
}
+static void QOPENGLF_APIENTRY qopenglfResolveDiscardFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ RESOLVE_FUNC_VOID(ResolveEXT, DiscardFramebuffer)(target, numAttachments, attachments);
+}
+
#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC)
// Special translation functions for ES-specific calls on desktop GL
@@ -3524,7 +3538,8 @@ QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *)
}
QOpenGLExtensionsPrivate::QOpenGLExtensionsPrivate(QOpenGLContext *ctx)
- : QOpenGLFunctionsPrivate(ctx)
+ : QOpenGLFunctionsPrivate(ctx),
+ flushVendorChecked(false)
{
MapBuffer = qopenglfResolveMapBuffer;
MapBufferRange = qopenglfResolveMapBufferRange;
@@ -3532,6 +3547,7 @@ QOpenGLExtensionsPrivate::QOpenGLExtensionsPrivate(QOpenGLContext *ctx)
BlitFramebuffer = qopenglfResolveBlitFramebuffer;
RenderbufferStorageMultisample = qopenglfResolveRenderbufferStorageMultisample;
GetBufferSubData = qopenglfResolveGetBufferSubData;
+ DiscardFramebuffer = qopenglfResolveDiscardFramebuffer;
}
QOpenGLES3Helper *QOpenGLExtensions::gles3Helper()
@@ -3539,4 +3555,33 @@ QOpenGLES3Helper *QOpenGLExtensions::gles3Helper()
return qgles3Helper();
}
+void QOpenGLExtensions::flushShared()
+{
+ Q_D(QOpenGLExtensions);
+
+ if (!d->flushVendorChecked) {
+ d->flushVendorChecked = true;
+ // It is not quite clear if glFlush() is sufficient to synchronize access to
+ // resources between sharing contexts in the same thread. On most platforms this
+ // is enough (e.g. iOS explicitly documents it), while certain drivers only work
+ // properly when doing glFinish().
+ d->flushIsSufficientToSyncContexts = false; // default to false, not guaranteed by the spec
+ const char *vendor = (const char *) glGetString(GL_VENDOR);
+ if (vendor) {
+ static const char *flushEnough[] = { "Apple", "ATI", "Intel", "NVIDIA" };
+ for (size_t i = 0; i < sizeof(flushEnough) / sizeof(const char *); ++i) {
+ if (strstr(vendor, flushEnough[i])) {
+ d->flushIsSufficientToSyncContexts = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (d->flushIsSufficientToSyncContexts)
+ glFlush();
+ else
+ glFinish();
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 479a280abe..b7cb4e53e9 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -240,7 +240,8 @@ public:
StencilSeparate = 0x0800,
NPOTTextures = 0x1000,
NPOTTextureRepeat = 0x2000,
- FixedFunctionPipeline = 0x4000
+ FixedFunctionPipeline = 0x4000,
+ TextureRGFormats = 0x8000
};
Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
diff --git a/src/gui/opengl/qopenglfunctions_1_0.cpp b/src/gui/opengl/qopenglfunctions_1_0.cpp
index 208893a50a..8e87529dd6 100644
--- a/src/gui/opengl/qopenglfunctions_1_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_0.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_0.h b/src/gui/opengl/qopenglfunctions_1_0.h
index ea59efc44d..4d7f98743a 100644
--- a/src/gui/opengl/qopenglfunctions_1_0.h
+++ b/src/gui/opengl/qopenglfunctions_1_0.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_1.cpp b/src/gui/opengl/qopenglfunctions_1_1.cpp
index 48120ad440..6ab5fda124 100644
--- a/src/gui/opengl/qopenglfunctions_1_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_1.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_1.h b/src/gui/opengl/qopenglfunctions_1_1.h
index 39fcc44929..3f196efac2 100644
--- a/src/gui/opengl/qopenglfunctions_1_1.h
+++ b/src/gui/opengl/qopenglfunctions_1_1.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -661,12 +661,12 @@ inline void QOpenGLFunctions_1_1::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_1_1::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_1_1::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_1_1::glIsTexture(GLuint texture)
@@ -726,7 +726,7 @@ inline void QOpenGLFunctions_1_1::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_1_1::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_1_1::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_1_2.cpp b/src/gui/opengl/qopenglfunctions_1_2.cpp
index baf6ac39e5..1a1d44c477 100644
--- a/src/gui/opengl/qopenglfunctions_1_2.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_2.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_2.h b/src/gui/opengl/qopenglfunctions_1_2.h
index 8aa08df57e..461084a6be 100644
--- a/src/gui/opengl/qopenglfunctions_1_2.h
+++ b/src/gui/opengl/qopenglfunctions_1_2.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -705,12 +705,12 @@ inline void QOpenGLFunctions_1_2::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_1_2::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_1_2::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_1_2::glIsTexture(GLuint texture)
@@ -770,7 +770,7 @@ inline void QOpenGLFunctions_1_2::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_1_2::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_1_2::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_1_3.cpp b/src/gui/opengl/qopenglfunctions_1_3.cpp
index 82c1da5da9..38a8b7e922 100644
--- a/src/gui/opengl/qopenglfunctions_1_3.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_3.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_3.h b/src/gui/opengl/qopenglfunctions_1_3.h
index 79b0ff163b..ce56a14d40 100644
--- a/src/gui/opengl/qopenglfunctions_1_3.h
+++ b/src/gui/opengl/qopenglfunctions_1_3.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -757,12 +757,12 @@ inline void QOpenGLFunctions_1_3::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_1_3::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_1_3::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_1_3::glIsTexture(GLuint texture)
@@ -822,7 +822,7 @@ inline void QOpenGLFunctions_1_3::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_1_3::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_1_3::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_1_4.cpp b/src/gui/opengl/qopenglfunctions_1_4.cpp
index 6438453552..f3472d1e82 100644
--- a/src/gui/opengl/qopenglfunctions_1_4.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_4.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_4.h b/src/gui/opengl/qopenglfunctions_1_4.h
index c65abf0df0..f97879a190 100644
--- a/src/gui/opengl/qopenglfunctions_1_4.h
+++ b/src/gui/opengl/qopenglfunctions_1_4.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -808,12 +808,12 @@ inline void QOpenGLFunctions_1_4::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_1_4::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_1_4::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_1_4::glIsTexture(GLuint texture)
@@ -873,7 +873,7 @@ inline void QOpenGLFunctions_1_4::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_1_4::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_1_4::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_1_5.cpp b/src/gui/opengl/qopenglfunctions_1_5.cpp
index f502f03452..ac7e3cd84d 100644
--- a/src/gui/opengl/qopenglfunctions_1_5.cpp
+++ b/src/gui/opengl/qopenglfunctions_1_5.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_1_5.h b/src/gui/opengl/qopenglfunctions_1_5.h
index fd887e9e99..edd3e9b71e 100644
--- a/src/gui/opengl/qopenglfunctions_1_5.h
+++ b/src/gui/opengl/qopenglfunctions_1_5.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -832,12 +832,12 @@ inline void QOpenGLFunctions_1_5::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_1_5::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_1_5::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_1_5::glIsTexture(GLuint texture)
@@ -897,7 +897,7 @@ inline void QOpenGLFunctions_1_5::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_1_5::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_1_5::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_2_0.cpp b/src/gui/opengl/qopenglfunctions_2_0.cpp
index 1d4f70706a..a263f36e30 100644
--- a/src/gui/opengl/qopenglfunctions_2_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_2_0.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -73,7 +73,7 @@ QOpenGLFunctions_2_0::QOpenGLFunctions_2_0()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
{
}
@@ -127,10 +127,6 @@ QOpenGLFunctions_2_0::~QOpenGLFunctions_2_0()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
}
bool QOpenGLFunctions_2_0::initializeOpenGLFunctions()
@@ -244,14 +240,6 @@ bool QOpenGLFunctions_2_0::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
}
return isInitialized();
diff --git a/src/gui/opengl/qopenglfunctions_2_0.h b/src/gui/opengl/qopenglfunctions_2_0.h
index 4fb8c6c5b5..d1d3124a34 100644
--- a/src/gui/opengl/qopenglfunctions_2_0.h
+++ b/src/gui/opengl/qopenglfunctions_2_0.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -683,7 +683,7 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
};
// OpenGL 1.0 core functions
@@ -931,12 +931,12 @@ inline void QOpenGLFunctions_2_0::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_2_0::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_2_0::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_2_0::glIsTexture(GLuint texture)
@@ -996,7 +996,7 @@ inline void QOpenGLFunctions_2_0::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_2_0::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_2_0::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -3420,182 +3420,182 @@ inline void QOpenGLFunctions_2_0::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_2_0::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_2_0::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_2_1.cpp b/src/gui/opengl/qopenglfunctions_2_1.cpp
index eb1202bcd3..1febd3b046 100644
--- a/src/gui/opengl/qopenglfunctions_2_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_2_1.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -74,7 +74,7 @@ QOpenGLFunctions_2_1::QOpenGLFunctions_2_1()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
{
}
@@ -132,10 +132,6 @@ QOpenGLFunctions_2_1::~QOpenGLFunctions_2_1()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
}
bool QOpenGLFunctions_2_1::initializeOpenGLFunctions()
@@ -257,14 +253,6 @@ bool QOpenGLFunctions_2_1::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
}
return isInitialized();
diff --git a/src/gui/opengl/qopenglfunctions_2_1.h b/src/gui/opengl/qopenglfunctions_2_1.h
index 77205edef0..900b8753c4 100644
--- a/src/gui/opengl/qopenglfunctions_2_1.h
+++ b/src/gui/opengl/qopenglfunctions_2_1.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -694,7 +694,7 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
};
// OpenGL 1.0 core functions
@@ -942,12 +942,12 @@ inline void QOpenGLFunctions_2_1::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_2_1::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_2_1::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_2_1::glIsTexture(GLuint texture)
@@ -1007,7 +1007,7 @@ inline void QOpenGLFunctions_2_1::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_2_1::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_2_1::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -3463,182 +3463,182 @@ inline void QOpenGLFunctions_2_1::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_2_1::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_2_1::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_3_0.cpp b/src/gui/opengl/qopenglfunctions_3_0.cpp
index f96e8d31e6..2522941dd4 100644
--- a/src/gui/opengl/qopenglfunctions_3_0.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_0.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -75,8 +75,8 @@ QOpenGLFunctions_3_0::QOpenGLFunctions_3_0()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , m_reserved_3_0_Deprecated(Q_NULLPTR)
{
}
@@ -138,14 +138,6 @@ QOpenGLFunctions_3_0::~QOpenGLFunctions_3_0()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
- }
}
bool QOpenGLFunctions_3_0::initializeOpenGLFunctions()
@@ -275,22 +267,6 @@ bool QOpenGLFunctions_3_0::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
- }
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
}
return isInitialized();
diff --git a/src/gui/opengl/qopenglfunctions_3_0.h b/src/gui/opengl/qopenglfunctions_3_0.h
index b64e828200..c9ed7493c4 100644
--- a/src/gui/opengl/qopenglfunctions_3_0.h
+++ b/src/gui/opengl/qopenglfunctions_3_0.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -783,8 +783,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ void *m_reserved_3_0_Deprecated; // To maintain BC
};
// OpenGL 1.0 core functions
@@ -1032,12 +1032,12 @@ inline void QOpenGLFunctions_3_0::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_3_0::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_3_0::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_3_0::glIsTexture(GLuint texture)
@@ -1097,7 +1097,7 @@ inline void QOpenGLFunctions_3_0::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_3_0::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_3_0::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -3875,182 +3875,182 @@ inline void QOpenGLFunctions_3_0::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_3_0::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -4059,102 +4059,102 @@ inline void QOpenGLFunctions_3_0::glVertexAttrib1d(GLuint index, GLdouble x)
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_3_0::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_3_0::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_3_1.cpp b/src/gui/opengl/qopenglfunctions_3_1.cpp
index 6690b0c6ac..80512821bb 100644
--- a/src/gui/opengl/qopenglfunctions_3_1.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_1.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_3_1.h b/src/gui/opengl/qopenglfunctions_3_1.h
index 57736a16de..da726150b9 100644
--- a/src/gui/opengl/qopenglfunctions_3_1.h
+++ b/src/gui/opengl/qopenglfunctions_3_1.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -587,12 +587,14 @@ inline void QOpenGLFunctions_3_1::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_3_1::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_1::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_3_1::glIsTexture(GLuint texture)
@@ -652,7 +654,9 @@ inline void QOpenGLFunctions_3_1::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions_3_1::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_1::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
index 49ae7fa097..81bf9a7768 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -77,8 +77,8 @@ QOpenGLFunctions_3_2_Compatibility::QOpenGLFunctions_3_2_Compatibility()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , m_reserved_3_0_Deprecated(Q_NULLPTR)
{
}
@@ -148,14 +148,6 @@ QOpenGLFunctions_3_2_Compatibility::~QOpenGLFunctions_3_2_Compatibility()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
- }
}
bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions()
@@ -301,22 +293,6 @@ bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
- }
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
}
return isInitialized();
diff --git a/src/gui/opengl/qopenglfunctions_3_2_compatibility.h b/src/gui/opengl/qopenglfunctions_3_2_compatibility.h
index 7b26b0b55a..9b768bf154 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_compatibility.h
+++ b/src/gui/opengl/qopenglfunctions_3_2_compatibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -824,8 +824,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ void *m_reserved_3_0_Deprecated; // To maintain BC
};
// OpenGL 1.0 core functions
@@ -1073,12 +1073,12 @@ inline void QOpenGLFunctions_3_2_Compatibility::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_3_2_Compatibility::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_3_2_Compatibility::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_3_2_Compatibility::glIsTexture(GLuint texture)
@@ -1138,7 +1138,7 @@ inline void QOpenGLFunctions_3_2_Compatibility::glPolygonOffset(GLfloat factor,
inline void QOpenGLFunctions_3_2_Compatibility::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_3_2_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -4075,182 +4075,182 @@ inline void QOpenGLFunctions_3_2_Compatibility::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -4259,102 +4259,102 @@ inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttrib1d(GLuint index, G
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_3_2_core.cpp b/src/gui/opengl/qopenglfunctions_3_2_core.cpp
index 38b6ba15cc..86e28f9bd8 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_2_core.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_3_2_core.h b/src/gui/opengl/qopenglfunctions_3_2_core.h
index 016ed7570a..b2f7e275dc 100644
--- a/src/gui/opengl/qopenglfunctions_3_2_core.h
+++ b/src/gui/opengl/qopenglfunctions_3_2_core.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -609,12 +609,14 @@ inline void QOpenGLFunctions_3_2_Core::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_3_2_Core::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_2_Core::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_3_2_Core::glIsTexture(GLuint texture)
@@ -674,7 +676,9 @@ inline void QOpenGLFunctions_3_2_Core::glPolygonOffset(GLfloat factor, GLfloat u
inline void QOpenGLFunctions_3_2_Core::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_2_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
diff --git a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
index bee69dd70b..a561238ffd 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -78,8 +78,8 @@ QOpenGLFunctions_3_3_Compatibility::QOpenGLFunctions_3_3_Compatibility()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , d_3_3_Deprecated(0)
{
}
@@ -153,13 +153,9 @@ QOpenGLFunctions_3_3_Compatibility::~QOpenGLFunctions_3_3_Compatibility()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
}
}
@@ -314,20 +310,12 @@ bool QOpenGLFunctions_3_3_Compatibility::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
diff --git a/src/gui/opengl/qopenglfunctions_3_3_compatibility.h b/src/gui/opengl/qopenglfunctions_3_3_compatibility.h
index 8295123cde..f4876523d1 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_compatibility.h
+++ b/src/gui/opengl/qopenglfunctions_3_3_compatibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -887,8 +887,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
};
// OpenGL 1.0 core functions
@@ -1136,12 +1136,12 @@ inline void QOpenGLFunctions_3_3_Compatibility::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_3_3_Compatibility::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_3_3_Compatibility::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_3_3_Compatibility::glIsTexture(GLuint texture)
@@ -1201,7 +1201,7 @@ inline void QOpenGLFunctions_3_3_Compatibility::glPolygonOffset(GLfloat factor,
inline void QOpenGLFunctions_3_3_Compatibility::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_3_3_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -2271,152 +2271,152 @@ inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribP1ui(GLuint index,
inline void QOpenGLFunctions_3_3_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
}
inline void QOpenGLFunctions_3_3_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
}
inline void QOpenGLFunctions_3_3_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ d_3_3_Deprecated->ColorP4uiv(type, color);
}
inline void QOpenGLFunctions_3_3_Compatibility::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ d_3_3_Deprecated->ColorP4ui(type, color);
}
inline void QOpenGLFunctions_3_3_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ d_3_3_Deprecated->ColorP3uiv(type, color);
}
inline void QOpenGLFunctions_3_3_Compatibility::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ d_3_3_Deprecated->ColorP3ui(type, color);
}
inline void QOpenGLFunctions_3_3_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ d_3_3_Deprecated->NormalP3ui(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ d_3_3_Deprecated->VertexP4uiv(type, value);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ d_3_3_Deprecated->VertexP4ui(type, value);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ d_3_3_Deprecated->VertexP3uiv(type, value);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ d_3_3_Deprecated->VertexP3ui(type, value);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ d_3_3_Deprecated->VertexP2uiv(type, value);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ d_3_3_Deprecated->VertexP2ui(type, value);
}
inline void QOpenGLFunctions_3_3_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
@@ -4430,182 +4430,182 @@ inline void QOpenGLFunctions_3_3_Compatibility::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -4614,102 +4614,102 @@ inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttrib1d(GLuint index, G
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_3_3_core.cpp b/src/gui/opengl/qopenglfunctions_3_3_core.cpp
index f874564d4a..d3070fc1ed 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_3_3_core.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_3_3_core.h b/src/gui/opengl/qopenglfunctions_3_3_core.h
index 04de3afb14..9ce643ccca 100644
--- a/src/gui/opengl/qopenglfunctions_3_3_core.h
+++ b/src/gui/opengl/qopenglfunctions_3_3_core.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -670,12 +670,14 @@ inline void QOpenGLFunctions_3_3_Core::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_3_3_Core::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_3_3_Core::glIsTexture(GLuint texture)
@@ -735,7 +737,9 @@ inline void QOpenGLFunctions_3_3_Core::glPolygonOffset(GLfloat factor, GLfloat u
inline void QOpenGLFunctions_3_3_Core::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -1805,152 +1809,220 @@ inline void QOpenGLFunctions_3_3_Core::glVertexAttribP1ui(GLuint index, GLenum t
inline void QOpenGLFunctions_3_3_Core::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_3_3_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
diff --git a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
index 328c2db1af..35d7246241 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -79,8 +79,8 @@ QOpenGLFunctions_4_0_Compatibility::QOpenGLFunctions_4_0_Compatibility()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , d_3_3_Deprecated(0)
{
}
@@ -158,13 +158,9 @@ QOpenGLFunctions_4_0_Compatibility::~QOpenGLFunctions_4_0_Compatibility()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
}
}
@@ -327,20 +323,12 @@ bool QOpenGLFunctions_4_0_Compatibility::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
diff --git a/src/gui/opengl/qopenglfunctions_4_0_compatibility.h b/src/gui/opengl/qopenglfunctions_4_0_compatibility.h
index f11cb1ad33..63828b2c28 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_compatibility.h
+++ b/src/gui/opengl/qopenglfunctions_4_0_compatibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -938,8 +938,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
};
// OpenGL 1.0 core functions
@@ -1187,12 +1187,12 @@ inline void QOpenGLFunctions_4_0_Compatibility::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_0_Compatibility::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_4_0_Compatibility::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_4_0_Compatibility::glIsTexture(GLuint texture)
@@ -1252,7 +1252,7 @@ inline void QOpenGLFunctions_4_0_Compatibility::glPolygonOffset(GLfloat factor,
inline void QOpenGLFunctions_4_0_Compatibility::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_4_0_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -2322,152 +2322,152 @@ inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribP1ui(GLuint index,
inline void QOpenGLFunctions_4_0_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_0_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_0_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ d_3_3_Deprecated->ColorP4uiv(type, color);
}
inline void QOpenGLFunctions_4_0_Compatibility::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ d_3_3_Deprecated->ColorP4ui(type, color);
}
inline void QOpenGLFunctions_4_0_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ d_3_3_Deprecated->ColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_0_Compatibility::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ d_3_3_Deprecated->ColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_0_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ d_3_3_Deprecated->NormalP3ui(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ d_3_3_Deprecated->VertexP4uiv(type, value);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ d_3_3_Deprecated->VertexP4ui(type, value);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ d_3_3_Deprecated->VertexP3uiv(type, value);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ d_3_3_Deprecated->VertexP3ui(type, value);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ d_3_3_Deprecated->VertexP2uiv(type, value);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ d_3_3_Deprecated->VertexP2ui(type, value);
}
inline void QOpenGLFunctions_4_0_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
@@ -4713,182 +4713,182 @@ inline void QOpenGLFunctions_4_0_Compatibility::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -4897,102 +4897,102 @@ inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttrib1d(GLuint index, G
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_4_0_core.cpp b/src/gui/opengl/qopenglfunctions_4_0_core.cpp
index 801d828f86..d4d0979ca4 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_0_core.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_4_0_core.h b/src/gui/opengl/qopenglfunctions_4_0_core.h
index 9aa898c796..8ac35488b1 100644
--- a/src/gui/opengl/qopenglfunctions_4_0_core.h
+++ b/src/gui/opengl/qopenglfunctions_4_0_core.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -719,12 +719,14 @@ inline void QOpenGLFunctions_4_0_Core::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_0_Core::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_4_0_Core::glIsTexture(GLuint texture)
@@ -784,7 +786,9 @@ inline void QOpenGLFunctions_4_0_Core::glPolygonOffset(GLfloat factor, GLfloat u
inline void QOpenGLFunctions_4_0_Core::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -1854,152 +1858,220 @@ inline void QOpenGLFunctions_4_0_Core::glVertexAttribP1ui(GLuint index, GLenum t
inline void QOpenGLFunctions_4_0_Core::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_0_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
diff --git a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
index 8622d8f740..d38cbbe49d 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -80,8 +80,8 @@ QOpenGLFunctions_4_1_Compatibility::QOpenGLFunctions_4_1_Compatibility()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , d_3_3_Deprecated(0)
{
}
@@ -163,13 +163,9 @@ QOpenGLFunctions_4_1_Compatibility::~QOpenGLFunctions_4_1_Compatibility()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
}
}
@@ -340,20 +336,12 @@ bool QOpenGLFunctions_4_1_Compatibility::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
diff --git a/src/gui/opengl/qopenglfunctions_4_1_compatibility.h b/src/gui/opengl/qopenglfunctions_4_1_compatibility.h
index 77830c622c..7a9394ff79 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_compatibility.h
+++ b/src/gui/opengl/qopenglfunctions_4_1_compatibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1031,8 +1031,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
};
// OpenGL 1.0 core functions
@@ -1280,12 +1280,12 @@ inline void QOpenGLFunctions_4_1_Compatibility::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_1_Compatibility::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_4_1_Compatibility::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_4_1_Compatibility::glIsTexture(GLuint texture)
@@ -1345,7 +1345,7 @@ inline void QOpenGLFunctions_4_1_Compatibility::glPolygonOffset(GLfloat factor,
inline void QOpenGLFunctions_4_1_Compatibility::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_4_1_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -2415,152 +2415,152 @@ inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribP1ui(GLuint index,
inline void QOpenGLFunctions_4_1_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_1_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_1_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ d_3_3_Deprecated->ColorP4uiv(type, color);
}
inline void QOpenGLFunctions_4_1_Compatibility::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ d_3_3_Deprecated->ColorP4ui(type, color);
}
inline void QOpenGLFunctions_4_1_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ d_3_3_Deprecated->ColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_1_Compatibility::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ d_3_3_Deprecated->ColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_1_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ d_3_3_Deprecated->NormalP3ui(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ d_3_3_Deprecated->VertexP4uiv(type, value);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ d_3_3_Deprecated->VertexP4ui(type, value);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ d_3_3_Deprecated->VertexP3uiv(type, value);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ d_3_3_Deprecated->VertexP3ui(type, value);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ d_3_3_Deprecated->VertexP2uiv(type, value);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ d_3_3_Deprecated->VertexP2ui(type, value);
}
inline void QOpenGLFunctions_4_1_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
@@ -5248,182 +5248,182 @@ inline void QOpenGLFunctions_4_1_Compatibility::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -5432,102 +5432,102 @@ inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttrib1d(GLuint index, G
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_4_1_core.cpp b/src/gui/opengl/qopenglfunctions_4_1_core.cpp
index a45acd2f1c..5546fa1868 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_1_core.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_4_1_core.h b/src/gui/opengl/qopenglfunctions_4_1_core.h
index 5a7861319b..9da4e14366 100644
--- a/src/gui/opengl/qopenglfunctions_4_1_core.h
+++ b/src/gui/opengl/qopenglfunctions_4_1_core.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -810,12 +810,14 @@ inline void QOpenGLFunctions_4_1_Core::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_1_Core::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_4_1_Core::glIsTexture(GLuint texture)
@@ -875,7 +877,9 @@ inline void QOpenGLFunctions_4_1_Core::glPolygonOffset(GLfloat factor, GLfloat u
inline void QOpenGLFunctions_4_1_Core::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -1945,152 +1949,220 @@ inline void QOpenGLFunctions_4_1_Core::glVertexAttribP1ui(GLuint index, GLenum t
inline void QOpenGLFunctions_4_1_Core::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_1_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
diff --git a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
index a44b38725a..020a851e52 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -81,8 +81,8 @@ QOpenGLFunctions_4_2_Compatibility::QOpenGLFunctions_4_2_Compatibility()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , d_3_3_Deprecated(0)
{
}
@@ -168,13 +168,9 @@ QOpenGLFunctions_4_2_Compatibility::~QOpenGLFunctions_4_2_Compatibility()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
}
}
@@ -353,20 +349,12 @@ bool QOpenGLFunctions_4_2_Compatibility::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
diff --git a/src/gui/opengl/qopenglfunctions_4_2_compatibility.h b/src/gui/opengl/qopenglfunctions_4_2_compatibility.h
index b3dec2c564..44458099d3 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_compatibility.h
+++ b/src/gui/opengl/qopenglfunctions_4_2_compatibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1048,8 +1048,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
};
// OpenGL 1.0 core functions
@@ -1297,12 +1297,12 @@ inline void QOpenGLFunctions_4_2_Compatibility::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_2_Compatibility::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_4_2_Compatibility::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_4_2_Compatibility::glIsTexture(GLuint texture)
@@ -1362,7 +1362,7 @@ inline void QOpenGLFunctions_4_2_Compatibility::glPolygonOffset(GLfloat factor,
inline void QOpenGLFunctions_4_2_Compatibility::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_4_2_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -2432,152 +2432,152 @@ inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribP1ui(GLuint index,
inline void QOpenGLFunctions_4_2_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_2_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_2_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ d_3_3_Deprecated->ColorP4uiv(type, color);
}
inline void QOpenGLFunctions_4_2_Compatibility::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ d_3_3_Deprecated->ColorP4ui(type, color);
}
inline void QOpenGLFunctions_4_2_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ d_3_3_Deprecated->ColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_2_Compatibility::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ d_3_3_Deprecated->ColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_2_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ d_3_3_Deprecated->NormalP3ui(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ d_3_3_Deprecated->VertexP4uiv(type, value);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ d_3_3_Deprecated->VertexP4ui(type, value);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ d_3_3_Deprecated->VertexP3uiv(type, value);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ d_3_3_Deprecated->VertexP3ui(type, value);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ d_3_3_Deprecated->VertexP2uiv(type, value);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ d_3_3_Deprecated->VertexP2ui(type, value);
}
inline void QOpenGLFunctions_4_2_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
@@ -5327,182 +5327,182 @@ inline void QOpenGLFunctions_4_2_Compatibility::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -5511,102 +5511,102 @@ inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttrib1d(GLuint index, G
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_4_2_core.cpp b/src/gui/opengl/qopenglfunctions_4_2_core.cpp
index 1373cc3df3..4f322ffb07 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_2_core.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_4_2_core.h b/src/gui/opengl/qopenglfunctions_4_2_core.h
index 4e10fa2b54..3d43ebc222 100644
--- a/src/gui/opengl/qopenglfunctions_4_2_core.h
+++ b/src/gui/opengl/qopenglfunctions_4_2_core.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -825,12 +825,14 @@ inline void QOpenGLFunctions_4_2_Core::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_2_Core::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_4_2_Core::glIsTexture(GLuint texture)
@@ -890,7 +892,9 @@ inline void QOpenGLFunctions_4_2_Core::glPolygonOffset(GLfloat factor, GLfloat u
inline void QOpenGLFunctions_4_2_Core::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -1960,152 +1964,220 @@ inline void QOpenGLFunctions_4_2_Core::glVertexAttribP1ui(GLuint index, GLenum t
inline void QOpenGLFunctions_4_2_Core::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_2_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
diff --git a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
index e4704f9dbc..58cc9c0b1c 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -82,8 +82,8 @@ QOpenGLFunctions_4_3_Compatibility::QOpenGLFunctions_4_3_Compatibility()
, d_1_2_Deprecated(0)
, d_1_3_Deprecated(0)
, d_1_4_Deprecated(0)
- , d_2_0_Deprecated(0)
- , d_3_0_Deprecated(0)
+ , m_reserved_2_0_Deprecated(Q_NULLPTR)
+ , d_3_3_Deprecated(0)
{
}
@@ -173,13 +173,9 @@ QOpenGLFunctions_4_3_Compatibility::~QOpenGLFunctions_4_3_Compatibility()
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
- if (d_2_0_Deprecated && !d_2_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Deprecated->context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- delete d_2_0_Deprecated;
- }
- if (d_3_0_Deprecated && !d_3_0_Deprecated->refs.deref()) {
- QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Deprecated->context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
- delete d_3_0_Deprecated;
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
}
}
@@ -366,20 +362,12 @@ bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions()
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus());
- if (!d) {
- d = new QOpenGLFunctions_2_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_DeprecatedBackend::versionStatus(), d);
- }
- d_2_0_Deprecated = static_cast<QOpenGLFunctions_2_0_DeprecatedBackend*>(d);
- d->refs.ref();
-
- d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus());
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
- d = new QOpenGLFunctions_3_0_DeprecatedBackend(context);
- QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus(), d);
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
- d_3_0_Deprecated = static_cast<QOpenGLFunctions_3_0_DeprecatedBackend*>(d);
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();
QAbstractOpenGLFunctions::initializeOpenGLFunctions();
diff --git a/src/gui/opengl/qopenglfunctions_4_3_compatibility.h b/src/gui/opengl/qopenglfunctions_4_3_compatibility.h
index 77a19c3947..6f353c2cc9 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_compatibility.h
+++ b/src/gui/opengl/qopenglfunctions_4_3_compatibility.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1086,8 +1086,8 @@ private:
QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
- QOpenGLFunctions_2_0_DeprecatedBackend* d_2_0_Deprecated;
- QOpenGLFunctions_3_0_DeprecatedBackend* d_3_0_Deprecated;
+ void *m_reserved_2_0_Deprecated; // To maintain BC
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
};
// OpenGL 1.0 core functions
@@ -1335,12 +1335,12 @@ inline void QOpenGLFunctions_4_3_Compatibility::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_3_Compatibility::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ d_1_1_Deprecated->Indexubv(c);
}
inline void QOpenGLFunctions_4_3_Compatibility::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ d_1_1_Deprecated->Indexub(c);
}
inline GLboolean QOpenGLFunctions_4_3_Compatibility::glIsTexture(GLuint texture)
@@ -1400,7 +1400,7 @@ inline void QOpenGLFunctions_4_3_Compatibility::glPolygonOffset(GLfloat factor,
inline void QOpenGLFunctions_4_3_Compatibility::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ d_1_1_Deprecated->GetPointerv(pname, params);
}
inline void QOpenGLFunctions_4_3_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -2470,152 +2470,152 @@ inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribP1ui(GLuint index,
inline void QOpenGLFunctions_4_3_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_3_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_3_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ d_3_3_Deprecated->ColorP4uiv(type, color);
}
inline void QOpenGLFunctions_4_3_Compatibility::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ d_3_3_Deprecated->ColorP4ui(type, color);
}
inline void QOpenGLFunctions_4_3_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ d_3_3_Deprecated->ColorP3uiv(type, color);
}
inline void QOpenGLFunctions_4_3_Compatibility::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ d_3_3_Deprecated->ColorP3ui(type, color);
}
inline void QOpenGLFunctions_4_3_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ d_3_3_Deprecated->NormalP3ui(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ d_3_3_Deprecated->VertexP4uiv(type, value);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ d_3_3_Deprecated->VertexP4ui(type, value);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ d_3_3_Deprecated->VertexP3uiv(type, value);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ d_3_3_Deprecated->VertexP3ui(type, value);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ d_3_3_Deprecated->VertexP2uiv(type, value);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ d_3_3_Deprecated->VertexP2ui(type, value);
}
inline void QOpenGLFunctions_4_3_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
@@ -5532,182 +5532,182 @@ inline void QOpenGLFunctions_4_3_Compatibility::glFogCoordf(GLfloat coord)
// OpenGL 2.0 deprecated functions
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4usv(index, v);
+ d_2_0_Core->VertexAttrib4usv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4uiv(index, v);
+ d_2_0_Core->VertexAttrib4uiv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4ubv(index, v);
+ d_2_0_Core->VertexAttrib4ubv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4sv(index, v);
+ d_2_0_Core->VertexAttrib4sv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
{
- d_2_0_Deprecated->VertexAttrib4s(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4iv(index, v);
+ d_2_0_Core->VertexAttrib4iv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib4fv(index, v);
+ d_2_0_Core->VertexAttrib4fv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- d_2_0_Deprecated->VertexAttrib4f(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib4dv(index, v);
+ d_2_0_Core->VertexAttrib4dv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- d_2_0_Deprecated->VertexAttrib4d(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4bv(index, v);
+ d_2_0_Core->VertexAttrib4bv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nusv(index, v);
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
{
- d_2_0_Deprecated->VertexAttrib4Nuiv(index, v);
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nubv(index, v);
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
{
- d_2_0_Deprecated->VertexAttrib4Nub(index, x, y, z, w);
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib4Nsv(index, v);
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
{
- d_2_0_Deprecated->VertexAttrib4Niv(index, v);
+ d_2_0_Core->VertexAttrib4Niv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
{
- d_2_0_Deprecated->VertexAttrib4Nbv(index, v);
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib3sv(index, v);
+ d_2_0_Core->VertexAttrib3sv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
{
- d_2_0_Deprecated->VertexAttrib3s(index, x, y, z);
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib3fv(index, v);
+ d_2_0_Core->VertexAttrib3fv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- d_2_0_Deprecated->VertexAttrib3f(index, x, y, z);
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib3dv(index, v);
+ d_2_0_Core->VertexAttrib3dv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
- d_2_0_Deprecated->VertexAttrib3d(index, x, y, z);
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib2sv(index, v);
+ d_2_0_Core->VertexAttrib2sv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
{
- d_2_0_Deprecated->VertexAttrib2s(index, x, y);
+ d_2_0_Core->VertexAttrib2s(index, x, y);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib2fv(index, v);
+ d_2_0_Core->VertexAttrib2fv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
{
- d_2_0_Deprecated->VertexAttrib2f(index, x, y);
+ d_2_0_Core->VertexAttrib2f(index, x, y);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib2dv(index, v);
+ d_2_0_Core->VertexAttrib2dv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
{
- d_2_0_Deprecated->VertexAttrib2d(index, x, y);
+ d_2_0_Core->VertexAttrib2d(index, x, y);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
{
- d_2_0_Deprecated->VertexAttrib1sv(index, v);
+ d_2_0_Core->VertexAttrib1sv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
{
- d_2_0_Deprecated->VertexAttrib1s(index, x);
+ d_2_0_Core->VertexAttrib1s(index, x);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
{
- d_2_0_Deprecated->VertexAttrib1fv(index, v);
+ d_2_0_Core->VertexAttrib1fv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
{
- d_2_0_Deprecated->VertexAttrib1f(index, x);
+ d_2_0_Core->VertexAttrib1f(index, x);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
{
- d_2_0_Deprecated->VertexAttrib1dv(index, v);
+ d_2_0_Core->VertexAttrib1dv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
{
- d_2_0_Deprecated->VertexAttrib1d(index, x);
+ d_2_0_Core->VertexAttrib1d(index, x);
}
@@ -5716,102 +5716,102 @@ inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttrib1d(GLuint index, G
// OpenGL 3.0 deprecated functions
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
{
- d_3_0_Deprecated->VertexAttribI4usv(index, v);
+ d_3_0_Core->VertexAttribI4usv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- d_3_0_Deprecated->VertexAttribI4ubv(index, v);
+ d_3_0_Core->VertexAttribI4ubv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
{
- d_3_0_Deprecated->VertexAttribI4sv(index, v);
+ d_3_0_Core->VertexAttribI4sv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
{
- d_3_0_Deprecated->VertexAttribI4bv(index, v);
+ d_3_0_Core->VertexAttribI4bv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI4uiv(index, v);
+ d_3_0_Core->VertexAttribI4uiv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI3uiv(index, v);
+ d_3_0_Core->VertexAttribI3uiv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI2uiv(index, v);
+ d_3_0_Core->VertexAttribI2uiv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
{
- d_3_0_Deprecated->VertexAttribI1uiv(index, v);
+ d_3_0_Core->VertexAttribI1uiv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI4iv(index, v);
+ d_3_0_Core->VertexAttribI4iv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI3iv(index, v);
+ d_3_0_Core->VertexAttribI3iv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI2iv(index, v);
+ d_3_0_Core->VertexAttribI2iv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
{
- d_3_0_Deprecated->VertexAttribI1iv(index, v);
+ d_3_0_Core->VertexAttribI1iv(index, v);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
{
- d_3_0_Deprecated->VertexAttribI4ui(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
{
- d_3_0_Deprecated->VertexAttribI3ui(index, x, y, z);
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
{
- d_3_0_Deprecated->VertexAttribI2ui(index, x, y);
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
{
- d_3_0_Deprecated->VertexAttribI1ui(index, x);
+ d_3_0_Core->VertexAttribI1ui(index, x);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
{
- d_3_0_Deprecated->VertexAttribI4i(index, x, y, z, w);
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
{
- d_3_0_Deprecated->VertexAttribI3i(index, x, y, z);
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
{
- d_3_0_Deprecated->VertexAttribI2i(index, x, y);
+ d_3_0_Core->VertexAttribI2i(index, x, y);
}
inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
{
- d_3_0_Deprecated->VertexAttribI1i(index, x);
+ d_3_0_Core->VertexAttribI1i(index, x);
}
diff --git a/src/gui/opengl/qopenglfunctions_4_3_core.cpp b/src/gui/opengl/qopenglfunctions_4_3_core.cpp
index 13b698ca9a..15bb6841dc 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_core.cpp
+++ b/src/gui/opengl/qopenglfunctions_4_3_core.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_4_3_core.h b/src/gui/opengl/qopenglfunctions_4_3_core.h
index bef6b56ef3..3d1da0be2d 100644
--- a/src/gui/opengl/qopenglfunctions_4_3_core.h
+++ b/src/gui/opengl/qopenglfunctions_4_3_core.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -861,12 +861,14 @@ inline void QOpenGLFunctions_4_3_Core::glCullFace(GLenum mode)
// OpenGL 1.1 core functions
inline void QOpenGLFunctions_4_3_Core::glIndexubv(const GLubyte *c)
{
- d_1_1_Core->Indexubv(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glIndexub(GLubyte c)
{
- d_1_1_Core->Indexub(c);
+ Q_UNUSED(c);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline GLboolean QOpenGLFunctions_4_3_Core::glIsTexture(GLuint texture)
@@ -926,7 +928,9 @@ inline void QOpenGLFunctions_4_3_Core::glPolygonOffset(GLfloat factor, GLfloat u
inline void QOpenGLFunctions_4_3_Core::glGetPointerv(GLenum pname, GLvoid* *params)
{
- d_1_1_Core->GetPointerv(pname, params);
+ Q_UNUSED(pname);
+ Q_UNUSED(params);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
@@ -1996,152 +2000,220 @@ inline void QOpenGLFunctions_4_3_Core::glVertexAttribP1ui(GLuint index, GLenum t
inline void QOpenGLFunctions_4_3_Core::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->SecondaryColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glSecondaryColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->SecondaryColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glColorP4uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP4uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glColorP4ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP4ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glColorP3uiv(GLenum type, const GLuint *color)
{
- d_3_3_Core->ColorP3uiv(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glColorP3ui(GLenum type, GLuint color)
{
- d_3_3_Core->ColorP3ui(type, color);
+ Q_UNUSED(type);
+ Q_UNUSED(color);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glNormalP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->NormalP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glNormalP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->NormalP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP4uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP4ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP3uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP3ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP2uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP2ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
- d_3_3_Core->MultiTexCoordP1uiv(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
- d_3_3_Core->MultiTexCoordP1ui(texture, type, coords);
+ Q_UNUSED(texture);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP4uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP4uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP4ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP4ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP3uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP3uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP3ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP3ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP2uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP2uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP2ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP2ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP1uiv(GLenum type, const GLuint *coords)
{
- d_3_3_Core->TexCoordP1uiv(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glTexCoordP1ui(GLenum type, GLuint coords)
{
- d_3_3_Core->TexCoordP1ui(type, coords);
+ Q_UNUSED(type);
+ Q_UNUSED(coords);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glVertexP4uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP4uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glVertexP4ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP4ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glVertexP3uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP3uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glVertexP3ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP3ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glVertexP2uiv(GLenum type, const GLuint *value)
{
- d_3_3_Core->VertexP2uiv(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glVertexP2ui(GLenum type, GLuint value)
{
- d_3_3_Core->VertexP2ui(type, value);
+ Q_UNUSED(type);
+ Q_UNUSED(value);
+ QOPENGL_DEPRECATEDFUNCTION;
}
inline void QOpenGLFunctions_4_3_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
diff --git a/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp
new file mode 100644
index 0000000000..d56a0d8de1
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp
@@ -0,0 +1,412 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#include "qopenglfunctions_4_4_compatibility.h"
+#include "qopenglcontext.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QOpenGLFunctions_4_4_Compatibility
+ \inmodule QtGui
+ \since 5.5
+ \wrapper
+ \brief The QOpenGLFunctions_4_4_Compatibility class provides all functions for OpenGL 4.4 compatibility profile.
+
+ This class is a wrapper for functions from OpenGL 4.4 compatibility profile.
+ See reference pages on \l {http://www.opengl.org/sdk/docs/}{opengl.org}
+ for function documentation.
+
+ \sa QAbstractOpenGLFunctions
+*/
+
+QOpenGLFunctions_4_4_Compatibility::QOpenGLFunctions_4_4_Compatibility()
+ : QAbstractOpenGLFunctions()
+ , d_1_0_Core(0)
+ , d_1_1_Core(0)
+ , d_1_2_Core(0)
+ , d_1_3_Core(0)
+ , d_1_4_Core(0)
+ , d_1_5_Core(0)
+ , d_2_0_Core(0)
+ , d_2_1_Core(0)
+ , d_3_0_Core(0)
+ , d_3_1_Core(0)
+ , d_3_2_Core(0)
+ , d_3_3_Core(0)
+ , d_4_0_Core(0)
+ , d_4_1_Core(0)
+ , d_4_2_Core(0)
+ , d_4_3_Core(0)
+ , d_4_4_Core(0)
+ , d_1_0_Deprecated(0)
+ , d_1_1_Deprecated(0)
+ , d_1_2_Deprecated(0)
+ , d_1_3_Deprecated(0)
+ , d_1_4_Deprecated(0)
+ , d_3_3_Deprecated(0)
+{
+}
+
+QOpenGLFunctions_4_4_Compatibility::~QOpenGLFunctions_4_4_Compatibility()
+{
+ if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ delete d_1_0_Core;
+ }
+ if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ delete d_1_1_Core;
+ }
+ if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ delete d_1_2_Core;
+ }
+ if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ delete d_1_3_Core;
+ }
+ if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ delete d_1_4_Core;
+ }
+ if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ delete d_1_5_Core;
+ }
+ if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ delete d_2_0_Core;
+ }
+ if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ delete d_2_1_Core;
+ }
+ if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ delete d_3_0_Core;
+ }
+ if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ delete d_3_1_Core;
+ }
+ if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ delete d_3_2_Core;
+ }
+ if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ delete d_3_3_Core;
+ }
+ if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ delete d_4_0_Core;
+ }
+ if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ delete d_4_1_Core;
+ }
+ if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ delete d_4_2_Core;
+ }
+ if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ delete d_4_3_Core;
+ }
+ if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ delete d_4_4_Core;
+ }
+ if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
+ delete d_1_0_Deprecated;
+ }
+ if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
+ delete d_1_1_Deprecated;
+ }
+ if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
+ delete d_1_2_Deprecated;
+ }
+ if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
+ delete d_1_3_Deprecated;
+ }
+ if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
+ delete d_1_4_Deprecated;
+ }
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
+ }
+}
+
+bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions()
+{
+ if ( isInitialized() )
+ return true;
+
+ QOpenGLContext* context = QOpenGLContext::currentContext();
+
+ // If owned by a context object make sure it is current.
+ // Also check that current context is capable of resolving all needed functions
+ if (((owningContext() && owningContext() == context) || !owningContext())
+ && QOpenGLFunctions_4_4_Compatibility::isContextCompatible(context))
+ {
+ // Associate with private implementation, creating if necessary
+ // Function pointers in the backends are resolved at creation time
+ QOpenGLVersionFunctionsBackend* d = 0;
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
+ }
+ d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
+ }
+ d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
+ }
+ d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
+ }
+ d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
+ }
+ d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_5_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
+ }
+ d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
+ }
+ d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
+ }
+ d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
+ }
+ d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
+ }
+ d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
+ }
+ d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
+ }
+ d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
+ }
+ d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
+ }
+ d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
+ }
+ d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
+ }
+ d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
+ }
+ d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
+ }
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ QAbstractOpenGLFunctions::initializeOpenGLFunctions();
+ }
+ return isInitialized();
+}
+
+bool QOpenGLFunctions_4_4_Compatibility::isContextCompatible(QOpenGLContext *context)
+{
+ Q_ASSERT(context);
+ QSurfaceFormat f = context->format();
+ const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
+ if (v < qMakePair(4, 4))
+ return false;
+
+ if (f.profile() == QSurfaceFormat::CoreProfile)
+ return false;
+
+ return true;
+}
+
+QOpenGLVersionProfile QOpenGLFunctions_4_4_Compatibility::versionProfile()
+{
+ QOpenGLVersionProfile v;
+ v.setVersion(4, 4);
+ v.setProfile(QSurfaceFormat::CompatibilityProfile);
+ return v;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions_4_4_compatibility.h b/src/gui/opengl/qopenglfunctions_4_4_compatibility.h
new file mode 100644
index 0000000000..3e5204eaa2
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_4_compatibility.h
@@ -0,0 +1,5959 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#ifndef QOPENGLVERSIONFUNCTIONS_4_4_COMPATIBILITY_H
+#define QOPENGLVERSIONFUNCTIONS_4_4_COMPATIBILITY_H
+
+#include <QtCore/qglobal.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+
+#include <QtGui/QOpenGLVersionFunctions>
+#include <QtGui/qopenglcontext.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QOpenGLFunctions_4_4_Compatibility : public QAbstractOpenGLFunctions
+{
+public:
+ QOpenGLFunctions_4_4_Compatibility();
+ ~QOpenGLFunctions_4_4_Compatibility();
+
+ bool initializeOpenGLFunctions() Q_DECL_OVERRIDE;
+
+ // OpenGL 1.0 core functions
+ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glDepthRange(GLdouble nearVal, GLdouble farVal);
+ GLboolean glIsEnabled(GLenum cap);
+ void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
+ void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
+ void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+ const GLubyte * glGetString(GLenum name);
+ void glGetIntegerv(GLenum pname, GLint *data);
+ void glGetFloatv(GLenum pname, GLfloat *data);
+ GLenum glGetError();
+ void glGetDoublev(GLenum pname, GLdouble *data);
+ void glGetBooleanv(GLenum pname, GLboolean *data);
+ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+ void glReadBuffer(GLenum src);
+ void glPixelStorei(GLenum pname, GLint param);
+ void glPixelStoref(GLenum pname, GLfloat param);
+ void glDepthFunc(GLenum func);
+ void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+ void glStencilFunc(GLenum func, GLint ref, GLuint mask);
+ void glLogicOp(GLenum opcode);
+ void glBlendFunc(GLenum sfactor, GLenum dfactor);
+ void glFlush();
+ void glFinish();
+ void glEnable(GLenum cap);
+ void glDisable(GLenum cap);
+ void glDepthMask(GLboolean flag);
+ void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void glStencilMask(GLuint mask);
+ void glClearDepth(GLdouble depth);
+ void glClearStencil(GLint s);
+ void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glClear(GLbitfield mask);
+ void glDrawBuffer(GLenum buf);
+ void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glTexParameteri(GLenum target, GLenum pname, GLint param);
+ void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glPolygonMode(GLenum face, GLenum mode);
+ void glPointSize(GLfloat size);
+ void glLineWidth(GLfloat width);
+ void glHint(GLenum target, GLenum mode);
+ void glFrontFace(GLenum mode);
+ void glCullFace(GLenum mode);
+
+ // OpenGL 1.1 core functions
+ GLboolean glIsTexture(GLuint texture);
+ void glGenTextures(GLsizei n, GLuint *textures);
+ void glDeleteTextures(GLsizei n, const GLuint *textures);
+ void glBindTexture(GLenum target, GLuint texture);
+ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+ void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+ void glPolygonOffset(GLfloat factor, GLfloat units);
+ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
+ void glDrawArrays(GLenum mode, GLint first, GLsizei count);
+
+ // OpenGL 1.2 core functions
+ void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glBlendEquation(GLenum mode);
+ void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+
+ // OpenGL 1.3 core functions
+ void glGetCompressedTexImage(GLenum target, GLint level, void *img);
+ void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+ void glSampleCoverage(GLfloat value, GLboolean invert);
+ void glActiveTexture(GLenum texture);
+
+ // OpenGL 1.4 core functions
+ void glPointParameteriv(GLenum pname, const GLint *params);
+ void glPointParameteri(GLenum pname, GLint param);
+ void glPointParameterfv(GLenum pname, const GLfloat *params);
+ void glPointParameterf(GLenum pname, GLfloat param);
+ void glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount);
+ void glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+ void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+
+ // OpenGL 1.5 core functions
+ void glGetBufferPointerv(GLenum target, GLenum pname, void * *params);
+ void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ GLboolean glUnmapBuffer(GLenum target);
+ void * glMapBuffer(GLenum target, GLenum access);
+ void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data);
+ void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+ void glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+ GLboolean glIsBuffer(GLuint buffer);
+ void glGenBuffers(GLsizei n, GLuint *buffers);
+ void glDeleteBuffers(GLsizei n, const GLuint *buffers);
+ void glBindBuffer(GLenum target, GLuint buffer);
+ void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
+ void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params);
+ void glGetQueryiv(GLenum target, GLenum pname, GLint *params);
+ void glEndQuery(GLenum target);
+ void glBeginQuery(GLenum target, GLuint id);
+ GLboolean glIsQuery(GLuint id);
+ void glDeleteQueries(GLsizei n, const GLuint *ids);
+ void glGenQueries(GLsizei n, GLuint *ids);
+
+ // OpenGL 2.0 core functions
+ void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+ void glVertexAttrib4usv(GLuint index, const GLushort *v);
+ void glVertexAttrib4uiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4sv(GLuint index, const GLshort *v);
+ void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+ void glVertexAttrib4iv(GLuint index, const GLint *v);
+ void glVertexAttrib4fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glVertexAttrib4dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttrib4bv(GLuint index, const GLbyte *v);
+ void glVertexAttrib4Nusv(GLuint index, const GLushort *v);
+ void glVertexAttrib4Nuiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4Nubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+ void glVertexAttrib4Nsv(GLuint index, const GLshort *v);
+ void glVertexAttrib4Niv(GLuint index, const GLint *v);
+ void glVertexAttrib4Nbv(GLuint index, const GLbyte *v);
+ void glVertexAttrib3sv(GLuint index, const GLshort *v);
+ void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z);
+ void glVertexAttrib3fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+ void glVertexAttrib3dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttrib2sv(GLuint index, const GLshort *v);
+ void glVertexAttrib2s(GLuint index, GLshort x, GLshort y);
+ void glVertexAttrib2fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+ void glVertexAttrib2dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttrib1sv(GLuint index, const GLshort *v);
+ void glVertexAttrib1s(GLuint index, GLshort x);
+ void glVertexAttrib1fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib1f(GLuint index, GLfloat x);
+ void glVertexAttrib1dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib1d(GLuint index, GLdouble x);
+ void glValidateProgram(GLuint program);
+ void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniform4iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform3iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform2iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform1iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform4fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform3fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform2fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform1fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+ void glUniform2i(GLint location, GLint v0, GLint v1);
+ void glUniform1i(GLint location, GLint v0);
+ void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glUniform2f(GLint location, GLfloat v0, GLfloat v1);
+ void glUniform1f(GLint location, GLfloat v0);
+ void glUseProgram(GLuint program);
+ void glShaderSource(GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
+ void glLinkProgram(GLuint program);
+ GLboolean glIsShader(GLuint shader);
+ GLboolean glIsProgram(GLuint program);
+ void glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer);
+ void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params);
+ void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params);
+ void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params);
+ void glGetUniformiv(GLuint program, GLint location, GLint *params);
+ void glGetUniformfv(GLuint program, GLint location, GLfloat *params);
+ GLint glGetUniformLocation(GLuint program, const GLchar *name);
+ void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+ void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
+ void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetProgramiv(GLuint program, GLenum pname, GLint *params);
+ GLint glGetAttribLocation(GLuint program, const GLchar *name);
+ void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+ void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glEnableVertexAttribArray(GLuint index);
+ void glDisableVertexAttribArray(GLuint index);
+ void glDetachShader(GLuint program, GLuint shader);
+ void glDeleteShader(GLuint shader);
+ void glDeleteProgram(GLuint program);
+ GLuint glCreateShader(GLenum type);
+ GLuint glCreateProgram();
+ void glCompileShader(GLuint shader);
+ void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name);
+ void glAttachShader(GLuint program, GLuint shader);
+ void glStencilMaskSeparate(GLenum face, GLuint mask);
+ void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+ void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+ void glDrawBuffers(GLsizei n, const GLenum *bufs);
+ void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+
+ // OpenGL 2.1 core functions
+ void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+
+ // OpenGL 3.0 core functions
+ GLboolean glIsVertexArray(GLuint array);
+ void glGenVertexArrays(GLsizei n, GLuint *arrays);
+ void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
+ void glBindVertexArray(GLuint array);
+ void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
+ void * glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+ void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void glGenerateMipmap(GLenum target);
+ void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+ void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+ void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ GLenum glCheckFramebufferStatus(GLenum target);
+ void glGenFramebuffers(GLsizei n, GLuint *framebuffers);
+ void glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
+ void glBindFramebuffer(GLenum target, GLuint framebuffer);
+ GLboolean glIsFramebuffer(GLuint framebuffer);
+ void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+ void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
+ void glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
+ void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+ GLboolean glIsRenderbuffer(GLuint renderbuffer);
+ const GLubyte * glGetStringi(GLenum name, GLuint index);
+ void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+ void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
+ void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params);
+ void glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params);
+ void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);
+ void glTexParameterIiv(GLenum target, GLenum pname, const GLint *params);
+ void glUniform4uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform3uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform2uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform1uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glUniform2ui(GLint location, GLuint v0, GLuint v1);
+ void glUniform1ui(GLint location, GLuint v0);
+ GLint glGetFragDataLocation(GLuint program, const GLchar *name);
+ void glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name);
+ void glGetUniformuiv(GLuint program, GLint location, GLuint *params);
+ void glVertexAttribI4usv(GLuint index, const GLushort *v);
+ void glVertexAttribI4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttribI4sv(GLuint index, const GLshort *v);
+ void glVertexAttribI4bv(GLuint index, const GLbyte *v);
+ void glVertexAttribI4uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI3uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI2uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI1uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI4iv(GLuint index, const GLint *v);
+ void glVertexAttribI3iv(GLuint index, const GLint *v);
+ void glVertexAttribI2iv(GLuint index, const GLint *v);
+ void glVertexAttribI1iv(GLuint index, const GLint *v);
+ void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z);
+ void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y);
+ void glVertexAttribI1ui(GLuint index, GLuint x);
+ void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z);
+ void glVertexAttribI2i(GLuint index, GLint x, GLint y);
+ void glVertexAttribI1i(GLuint index, GLint x);
+ void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
+ void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
+ void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glEndConditionalRender();
+ void glBeginConditionalRender(GLuint id, GLenum mode);
+ void glClampColor(GLenum target, GLenum clamp);
+ void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+ void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
+ void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
+ void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glEndTransformFeedback();
+ void glBeginTransformFeedback(GLenum primitiveMode);
+ GLboolean glIsEnabledi(GLenum target, GLuint index);
+ void glDisablei(GLenum target, GLuint index);
+ void glEnablei(GLenum target, GLuint index);
+ void glGetIntegeri_v(GLenum target, GLuint index, GLint *data);
+ void glGetBooleani_v(GLenum target, GLuint index, GLboolean *data);
+ void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+
+ // OpenGL 3.1 core functions
+ void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+ void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+ void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+ GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
+ void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+ void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+ void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices);
+ void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+ void glPrimitiveRestartIndex(GLuint index);
+ void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer);
+ void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+ void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+
+ // OpenGL 3.2 core functions
+ void glSampleMaski(GLuint maskNumber, GLbitfield mask);
+ void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
+ void glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);
+ void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
+ void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
+ void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+ void glGetInteger64v(GLenum pname, GLint64 *data);
+ void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ void glDeleteSync(GLsync sync);
+ GLboolean glIsSync(GLsync sync);
+ GLsync glFenceSync(GLenum condition, GLbitfield flags);
+ void glProvokingVertex(GLenum mode);
+ void glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex);
+ void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
+ void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+ void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+
+ // OpenGL 3.3 core functions
+ void glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribDivisor(GLuint index, GLuint divisor);
+ void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params);
+ void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params);
+ void glQueryCounter(GLuint id, GLenum target);
+ void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params);
+ void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
+ void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params);
+ void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
+ void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param);
+ void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
+ void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
+ void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
+ void glBindSampler(GLuint unit, GLuint sampler);
+ GLboolean glIsSampler(GLuint sampler);
+ void glDeleteSamplers(GLsizei count, const GLuint *samplers);
+ void glGenSamplers(GLsizei count, GLuint *samplers);
+ GLint glGetFragDataIndex(GLuint program, const GLchar *name);
+ void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+
+ // OpenGL 4.0 core functions
+ void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params);
+ void glEndQueryIndexed(GLenum target, GLuint index);
+ void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id);
+ void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream);
+ void glDrawTransformFeedback(GLenum mode, GLuint id);
+ void glResumeTransformFeedback();
+ void glPauseTransformFeedback();
+ GLboolean glIsTransformFeedback(GLuint id);
+ void glGenTransformFeedbacks(GLsizei n, GLuint *ids);
+ void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
+ void glBindTransformFeedback(GLenum target, GLuint id);
+ void glPatchParameterfv(GLenum pname, const GLfloat *values);
+ void glPatchParameteri(GLenum pname, GLint value);
+ void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+ void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params);
+ void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices);
+ void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+ GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name);
+ GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name);
+ void glGetUniformdv(GLuint program, GLint location, GLdouble *params);
+ void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniform4dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform3dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform2dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform1dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);
+ void glUniform2d(GLint location, GLdouble x, GLdouble y);
+ void glUniform1d(GLint location, GLdouble x);
+ void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
+ void glDrawArraysIndirect(GLenum mode, const void *indirect);
+ void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+ void glBlendFunci(GLuint buf, GLenum src, GLenum dst);
+ void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+ void glBlendEquationi(GLuint buf, GLenum mode);
+ void glMinSampleShading(GLfloat value);
+
+ // OpenGL 4.1 core functions
+ void glGetDoublei_v(GLenum target, GLuint index, GLdouble *data);
+ void glGetFloati_v(GLenum target, GLuint index, GLfloat *data);
+ void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f);
+ void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v);
+ void glScissorIndexedv(GLuint index, const GLint *v);
+ void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+ void glScissorArrayv(GLuint first, GLsizei count, const GLint *v);
+ void glViewportIndexedfv(GLuint index, const GLfloat *v);
+ void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+ void glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v);
+ void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params);
+ void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glVertexAttribL4dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL3dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL2dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL1dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttribL1d(GLuint index, GLdouble x);
+ void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glValidateProgramPipeline(GLuint pipeline);
+ void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+ void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+ void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+ void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
+ void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);
+ void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+ void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
+ void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
+ void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform1d(GLuint program, GLint location, GLdouble v0);
+ void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
+ void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform1i(GLuint program, GLint location, GLint v0);
+ void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
+ GLboolean glIsProgramPipeline(GLuint pipeline);
+ void glGenProgramPipelines(GLsizei n, GLuint *pipelines);
+ void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
+ void glBindProgramPipeline(GLuint pipeline);
+ GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar* const *strings);
+ void glActiveShaderProgram(GLuint pipeline, GLuint program);
+ void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
+ void glProgramParameteri(GLuint program, GLenum pname, GLint value);
+ void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+ void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+ void glClearDepthf(GLfloat dd);
+ void glDepthRangef(GLfloat n, GLfloat f);
+ void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+ void glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+ void glReleaseShaderCompiler();
+
+ // OpenGL 4.2 core functions
+ void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
+ void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount);
+ void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+ void glMemoryBarrier(GLbitfield barriers);
+ void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+ void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
+ void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+ void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
+ void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
+ void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
+
+ // OpenGL 4.3 core functions
+ void glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label);
+ void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+ void glPopDebugGroup();
+ void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message);
+ GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+ void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
+ void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+ void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+ void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
+ void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
+ void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+ void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+ GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+ void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+ GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+ void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+ void glInvalidateBufferData(GLuint buffer);
+ void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length);
+ void glInvalidateTexImage(GLuint texture, GLint level);
+ void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+ void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
+ void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
+ void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+ void glDispatchComputeIndirect(GLintptr indirect);
+ void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+ void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+ void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+
+ // OpenGL 4.4 core functions
+ void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers);
+ void glBindTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
+ void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
+ void glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+ void glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
+ void glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
+
+ // OpenGL 1.0 deprecated functions
+ void glTranslatef(GLfloat x, GLfloat y, GLfloat z);
+ void glTranslated(GLdouble x, GLdouble y, GLdouble z);
+ void glScalef(GLfloat x, GLfloat y, GLfloat z);
+ void glScaled(GLdouble x, GLdouble y, GLdouble z);
+ void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+ void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+ void glPushMatrix();
+ void glPopMatrix();
+ void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+ void glMultMatrixd(const GLdouble *m);
+ void glMultMatrixf(const GLfloat *m);
+ void glMatrixMode(GLenum mode);
+ void glLoadMatrixd(const GLdouble *m);
+ void glLoadMatrixf(const GLfloat *m);
+ void glLoadIdentity();
+ void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+ GLboolean glIsList(GLuint list);
+ void glGetTexGeniv(GLenum coord, GLenum pname, GLint *params);
+ void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params);
+ void glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params);
+ void glGetTexEnviv(GLenum target, GLenum pname, GLint *params);
+ void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetPolygonStipple(GLubyte *mask);
+ void glGetPixelMapusv(GLenum map, GLushort *values);
+ void glGetPixelMapuiv(GLenum map, GLuint *values);
+ void glGetPixelMapfv(GLenum map, GLfloat *values);
+ void glGetMaterialiv(GLenum face, GLenum pname, GLint *params);
+ void glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
+ void glGetMapiv(GLenum target, GLenum query, GLint *v);
+ void glGetMapfv(GLenum target, GLenum query, GLfloat *v);
+ void glGetMapdv(GLenum target, GLenum query, GLdouble *v);
+ void glGetLightiv(GLenum light, GLenum pname, GLint *params);
+ void glGetLightfv(GLenum light, GLenum pname, GLfloat *params);
+ void glGetClipPlane(GLenum plane, GLdouble *equation);
+ void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+ void glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values);
+ void glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values);
+ void glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values);
+ void glPixelTransferi(GLenum pname, GLint param);
+ void glPixelTransferf(GLenum pname, GLfloat param);
+ void glPixelZoom(GLfloat xfactor, GLfloat yfactor);
+ void glAlphaFunc(GLenum func, GLfloat ref);
+ void glEvalPoint2(GLint i, GLint j);
+ void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+ void glEvalPoint1(GLint i);
+ void glEvalMesh1(GLenum mode, GLint i1, GLint i2);
+ void glEvalCoord2fv(const GLfloat *u);
+ void glEvalCoord2f(GLfloat u, GLfloat v);
+ void glEvalCoord2dv(const GLdouble *u);
+ void glEvalCoord2d(GLdouble u, GLdouble v);
+ void glEvalCoord1fv(const GLfloat *u);
+ void glEvalCoord1f(GLfloat u);
+ void glEvalCoord1dv(const GLdouble *u);
+ void glEvalCoord1d(GLdouble u);
+ void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+ void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+ void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);
+ void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);
+ void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+ void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+ void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+ void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+ void glPushAttrib(GLbitfield mask);
+ void glPopAttrib();
+ void glAccum(GLenum op, GLfloat value);
+ void glIndexMask(GLuint mask);
+ void glClearIndex(GLfloat c);
+ void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glPushName(GLuint name);
+ void glPopName();
+ void glPassThrough(GLfloat token);
+ void glLoadName(GLuint name);
+ void glInitNames();
+ GLint glRenderMode(GLenum mode);
+ void glSelectBuffer(GLsizei size, GLuint *buffer);
+ void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer);
+ void glTexGeniv(GLenum coord, GLenum pname, const GLint *params);
+ void glTexGeni(GLenum coord, GLenum pname, GLint param);
+ void glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params);
+ void glTexGenf(GLenum coord, GLenum pname, GLfloat param);
+ void glTexGendv(GLenum coord, GLenum pname, const GLdouble *params);
+ void glTexGend(GLenum coord, GLenum pname, GLdouble param);
+ void glTexEnviv(GLenum target, GLenum pname, const GLint *params);
+ void glTexEnvi(GLenum target, GLenum pname, GLint param);
+ void glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glTexEnvf(GLenum target, GLenum pname, GLfloat param);
+ void glShadeModel(GLenum mode);
+ void glPolygonStipple(const GLubyte *mask);
+ void glMaterialiv(GLenum face, GLenum pname, const GLint *params);
+ void glMateriali(GLenum face, GLenum pname, GLint param);
+ void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
+ void glMaterialf(GLenum face, GLenum pname, GLfloat param);
+ void glLineStipple(GLint factor, GLushort pattern);
+ void glLightModeliv(GLenum pname, const GLint *params);
+ void glLightModeli(GLenum pname, GLint param);
+ void glLightModelfv(GLenum pname, const GLfloat *params);
+ void glLightModelf(GLenum pname, GLfloat param);
+ void glLightiv(GLenum light, GLenum pname, const GLint *params);
+ void glLighti(GLenum light, GLenum pname, GLint param);
+ void glLightfv(GLenum light, GLenum pname, const GLfloat *params);
+ void glLightf(GLenum light, GLenum pname, GLfloat param);
+ void glFogiv(GLenum pname, const GLint *params);
+ void glFogi(GLenum pname, GLint param);
+ void glFogfv(GLenum pname, const GLfloat *params);
+ void glFogf(GLenum pname, GLfloat param);
+ void glColorMaterial(GLenum face, GLenum mode);
+ void glClipPlane(GLenum plane, const GLdouble *equation);
+ void glVertex4sv(const GLshort *v);
+ void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);
+ void glVertex4iv(const GLint *v);
+ void glVertex4i(GLint x, GLint y, GLint z, GLint w);
+ void glVertex4fv(const GLfloat *v);
+ void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glVertex4dv(const GLdouble *v);
+ void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertex3sv(const GLshort *v);
+ void glVertex3s(GLshort x, GLshort y, GLshort z);
+ void glVertex3iv(const GLint *v);
+ void glVertex3i(GLint x, GLint y, GLint z);
+ void glVertex3fv(const GLfloat *v);
+ void glVertex3f(GLfloat x, GLfloat y, GLfloat z);
+ void glVertex3dv(const GLdouble *v);
+ void glVertex3d(GLdouble x, GLdouble y, GLdouble z);
+ void glVertex2sv(const GLshort *v);
+ void glVertex2s(GLshort x, GLshort y);
+ void glVertex2iv(const GLint *v);
+ void glVertex2i(GLint x, GLint y);
+ void glVertex2fv(const GLfloat *v);
+ void glVertex2f(GLfloat x, GLfloat y);
+ void glVertex2dv(const GLdouble *v);
+ void glVertex2d(GLdouble x, GLdouble y);
+ void glTexCoord4sv(const GLshort *v);
+ void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);
+ void glTexCoord4iv(const GLint *v);
+ void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);
+ void glTexCoord4fv(const GLfloat *v);
+ void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+ void glTexCoord4dv(const GLdouble *v);
+ void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+ void glTexCoord3sv(const GLshort *v);
+ void glTexCoord3s(GLshort s, GLshort t, GLshort r);
+ void glTexCoord3iv(const GLint *v);
+ void glTexCoord3i(GLint s, GLint t, GLint r);
+ void glTexCoord3fv(const GLfloat *v);
+ void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);
+ void glTexCoord3dv(const GLdouble *v);
+ void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);
+ void glTexCoord2sv(const GLshort *v);
+ void glTexCoord2s(GLshort s, GLshort t);
+ void glTexCoord2iv(const GLint *v);
+ void glTexCoord2i(GLint s, GLint t);
+ void glTexCoord2fv(const GLfloat *v);
+ void glTexCoord2f(GLfloat s, GLfloat t);
+ void glTexCoord2dv(const GLdouble *v);
+ void glTexCoord2d(GLdouble s, GLdouble t);
+ void glTexCoord1sv(const GLshort *v);
+ void glTexCoord1s(GLshort s);
+ void glTexCoord1iv(const GLint *v);
+ void glTexCoord1i(GLint s);
+ void glTexCoord1fv(const GLfloat *v);
+ void glTexCoord1f(GLfloat s);
+ void glTexCoord1dv(const GLdouble *v);
+ void glTexCoord1d(GLdouble s);
+ void glRectsv(const GLshort *v1, const GLshort *v2);
+ void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+ void glRectiv(const GLint *v1, const GLint *v2);
+ void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);
+ void glRectfv(const GLfloat *v1, const GLfloat *v2);
+ void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+ void glRectdv(const GLdouble *v1, const GLdouble *v2);
+ void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+ void glRasterPos4sv(const GLshort *v);
+ void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);
+ void glRasterPos4iv(const GLint *v);
+ void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);
+ void glRasterPos4fv(const GLfloat *v);
+ void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glRasterPos4dv(const GLdouble *v);
+ void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glRasterPos3sv(const GLshort *v);
+ void glRasterPos3s(GLshort x, GLshort y, GLshort z);
+ void glRasterPos3iv(const GLint *v);
+ void glRasterPos3i(GLint x, GLint y, GLint z);
+ void glRasterPos3fv(const GLfloat *v);
+ void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);
+ void glRasterPos3dv(const GLdouble *v);
+ void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);
+ void glRasterPos2sv(const GLshort *v);
+ void glRasterPos2s(GLshort x, GLshort y);
+ void glRasterPos2iv(const GLint *v);
+ void glRasterPos2i(GLint x, GLint y);
+ void glRasterPos2fv(const GLfloat *v);
+ void glRasterPos2f(GLfloat x, GLfloat y);
+ void glRasterPos2dv(const GLdouble *v);
+ void glRasterPos2d(GLdouble x, GLdouble y);
+ void glNormal3sv(const GLshort *v);
+ void glNormal3s(GLshort nx, GLshort ny, GLshort nz);
+ void glNormal3iv(const GLint *v);
+ void glNormal3i(GLint nx, GLint ny, GLint nz);
+ void glNormal3fv(const GLfloat *v);
+ void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
+ void glNormal3dv(const GLdouble *v);
+ void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);
+ void glNormal3bv(const GLbyte *v);
+ void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz);
+ void glIndexsv(const GLshort *c);
+ void glIndexs(GLshort c);
+ void glIndexiv(const GLint *c);
+ void glIndexi(GLint c);
+ void glIndexfv(const GLfloat *c);
+ void glIndexf(GLfloat c);
+ void glIndexdv(const GLdouble *c);
+ void glIndexd(GLdouble c);
+ void glEnd();
+ void glEdgeFlagv(const GLboolean *flag);
+ void glEdgeFlag(GLboolean flag);
+ void glColor4usv(const GLushort *v);
+ void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+ void glColor4uiv(const GLuint *v);
+ void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+ void glColor4ubv(const GLubyte *v);
+ void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+ void glColor4sv(const GLshort *v);
+ void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+ void glColor4iv(const GLint *v);
+ void glColor4i(GLint red, GLint green, GLint blue, GLint alpha);
+ void glColor4fv(const GLfloat *v);
+ void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glColor4dv(const GLdouble *v);
+ void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+ void glColor4bv(const GLbyte *v);
+ void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+ void glColor3usv(const GLushort *v);
+ void glColor3us(GLushort red, GLushort green, GLushort blue);
+ void glColor3uiv(const GLuint *v);
+ void glColor3ui(GLuint red, GLuint green, GLuint blue);
+ void glColor3ubv(const GLubyte *v);
+ void glColor3ub(GLubyte red, GLubyte green, GLubyte blue);
+ void glColor3sv(const GLshort *v);
+ void glColor3s(GLshort red, GLshort green, GLshort blue);
+ void glColor3iv(const GLint *v);
+ void glColor3i(GLint red, GLint green, GLint blue);
+ void glColor3fv(const GLfloat *v);
+ void glColor3f(GLfloat red, GLfloat green, GLfloat blue);
+ void glColor3dv(const GLdouble *v);
+ void glColor3d(GLdouble red, GLdouble green, GLdouble blue);
+ void glColor3bv(const GLbyte *v);
+ void glColor3b(GLbyte red, GLbyte green, GLbyte blue);
+ void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+ void glBegin(GLenum mode);
+ void glListBase(GLuint base);
+ GLuint glGenLists(GLsizei range);
+ void glDeleteLists(GLuint list, GLsizei range);
+ void glCallLists(GLsizei n, GLenum type, const void *lists);
+ void glCallList(GLuint list);
+ void glEndList();
+ void glNewList(GLuint list, GLenum mode);
+
+ // OpenGL 1.1 deprecated functions
+ void glPushClientAttrib(GLbitfield mask);
+ void glPopClientAttrib();
+ void glIndexubv(const GLubyte *c);
+ void glIndexub(GLubyte c);
+ void glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities);
+ GLboolean glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences);
+ void glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glNormalPointer(GLenum type, GLsizei stride, const void *pointer);
+ void glInterleavedArrays(GLenum format, GLsizei stride, const void *pointer);
+ void glGetPointerv(GLenum pname, void * *params);
+ void glIndexPointer(GLenum type, GLsizei stride, const void *pointer);
+ void glEnableClientState(GLenum array);
+ void glEdgeFlagPointer(GLsizei stride, const void *pointer);
+ void glDisableClientState(GLenum array);
+ void glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glArrayElement(GLint i);
+
+ // OpenGL 1.2 deprecated functions
+ void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
+ void glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+ void glGetColorTable(GLenum target, GLenum format, GLenum type, void *table);
+ void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
+ void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+ void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
+ void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
+ void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);
+ void glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glConvolutionParameteri(GLenum target, GLenum pname, GLint params);
+ void glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+ void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, void *image);
+ void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
+ void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
+ void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+ void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+ void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+ void glMinmax(GLenum target, GLenum internalformat, GLboolean sink);
+ void glResetHistogram(GLenum target);
+ void glResetMinmax(GLenum target);
+
+ // OpenGL 1.3 deprecated functions
+ void glMultTransposeMatrixd(const GLdouble *m);
+ void glMultTransposeMatrixf(const GLfloat *m);
+ void glLoadTransposeMatrixd(const GLdouble *m);
+ void glLoadTransposeMatrixf(const GLfloat *m);
+ void glMultiTexCoord4sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+ void glMultiTexCoord4iv(GLenum target, const GLint *v);
+ void glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q);
+ void glMultiTexCoord4fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+ void glMultiTexCoord4dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+ void glMultiTexCoord3sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r);
+ void glMultiTexCoord3iv(GLenum target, const GLint *v);
+ void glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r);
+ void glMultiTexCoord3fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+ void glMultiTexCoord3dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+ void glMultiTexCoord2sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord2s(GLenum target, GLshort s, GLshort t);
+ void glMultiTexCoord2iv(GLenum target, const GLint *v);
+ void glMultiTexCoord2i(GLenum target, GLint s, GLint t);
+ void glMultiTexCoord2fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t);
+ void glMultiTexCoord2dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t);
+ void glMultiTexCoord1sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord1s(GLenum target, GLshort s);
+ void glMultiTexCoord1iv(GLenum target, const GLint *v);
+ void glMultiTexCoord1i(GLenum target, GLint s);
+ void glMultiTexCoord1fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord1f(GLenum target, GLfloat s);
+ void glMultiTexCoord1dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord1d(GLenum target, GLdouble s);
+ void glClientActiveTexture(GLenum texture);
+
+ // OpenGL 1.4 deprecated functions
+ void glWindowPos3sv(const GLshort *v);
+ void glWindowPos3s(GLshort x, GLshort y, GLshort z);
+ void glWindowPos3iv(const GLint *v);
+ void glWindowPos3i(GLint x, GLint y, GLint z);
+ void glWindowPos3fv(const GLfloat *v);
+ void glWindowPos3f(GLfloat x, GLfloat y, GLfloat z);
+ void glWindowPos3dv(const GLdouble *v);
+ void glWindowPos3d(GLdouble x, GLdouble y, GLdouble z);
+ void glWindowPos2sv(const GLshort *v);
+ void glWindowPos2s(GLshort x, GLshort y);
+ void glWindowPos2iv(const GLint *v);
+ void glWindowPos2i(GLint x, GLint y);
+ void glWindowPos2fv(const GLfloat *v);
+ void glWindowPos2f(GLfloat x, GLfloat y);
+ void glWindowPos2dv(const GLdouble *v);
+ void glWindowPos2d(GLdouble x, GLdouble y);
+ void glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glSecondaryColor3usv(const GLushort *v);
+ void glSecondaryColor3us(GLushort red, GLushort green, GLushort blue);
+ void glSecondaryColor3uiv(const GLuint *v);
+ void glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue);
+ void glSecondaryColor3ubv(const GLubyte *v);
+ void glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue);
+ void glSecondaryColor3sv(const GLshort *v);
+ void glSecondaryColor3s(GLshort red, GLshort green, GLshort blue);
+ void glSecondaryColor3iv(const GLint *v);
+ void glSecondaryColor3i(GLint red, GLint green, GLint blue);
+ void glSecondaryColor3fv(const GLfloat *v);
+ void glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue);
+ void glSecondaryColor3dv(const GLdouble *v);
+ void glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue);
+ void glSecondaryColor3bv(const GLbyte *v);
+ void glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue);
+ void glFogCoordPointer(GLenum type, GLsizei stride, const void *pointer);
+ void glFogCoorddv(const GLdouble *coord);
+ void glFogCoordd(GLdouble coord);
+ void glFogCoordfv(const GLfloat *coord);
+ void glFogCoordf(GLfloat coord);
+
+ // OpenGL 1.5 deprecated functions
+
+ // OpenGL 2.0 deprecated functions
+
+ // OpenGL 2.1 deprecated functions
+
+ // OpenGL 3.0 deprecated functions
+
+ // OpenGL 3.1 deprecated functions
+
+ // OpenGL 3.2 deprecated functions
+
+ // OpenGL 3.3 deprecated functions
+ void glSecondaryColorP3uiv(GLenum type, const GLuint *color);
+ void glSecondaryColorP3ui(GLenum type, GLuint color);
+ void glColorP4uiv(GLenum type, const GLuint *color);
+ void glColorP4ui(GLenum type, GLuint color);
+ void glColorP3uiv(GLenum type, const GLuint *color);
+ void glColorP3ui(GLenum type, GLuint color);
+ void glNormalP3uiv(GLenum type, const GLuint *coords);
+ void glNormalP3ui(GLenum type, GLuint coords);
+ void glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords);
+ void glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords);
+ void glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords);
+ void glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords);
+ void glTexCoordP4uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP4ui(GLenum type, GLuint coords);
+ void glTexCoordP3uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP3ui(GLenum type, GLuint coords);
+ void glTexCoordP2uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP2ui(GLenum type, GLuint coords);
+ void glTexCoordP1uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP1ui(GLenum type, GLuint coords);
+ void glVertexP4uiv(GLenum type, const GLuint *value);
+ void glVertexP4ui(GLenum type, GLuint value);
+ void glVertexP3uiv(GLenum type, const GLuint *value);
+ void glVertexP3ui(GLenum type, GLuint value);
+ void glVertexP2uiv(GLenum type, const GLuint *value);
+ void glVertexP2ui(GLenum type, GLuint value);
+
+ // OpenGL 4.0 deprecated functions
+
+ // OpenGL 4.1 deprecated functions
+
+ // OpenGL 4.2 deprecated functions
+
+ // OpenGL 4.3 deprecated functions
+
+ // OpenGL 4.4 deprecated functions
+
+private:
+ friend class QOpenGLContext;
+
+ static bool isContextCompatible(QOpenGLContext *context);
+ static QOpenGLVersionProfile versionProfile();
+
+ QOpenGLFunctions_1_0_CoreBackend* d_1_0_Core;
+ QOpenGLFunctions_1_1_CoreBackend* d_1_1_Core;
+ QOpenGLFunctions_1_2_CoreBackend* d_1_2_Core;
+ QOpenGLFunctions_1_3_CoreBackend* d_1_3_Core;
+ QOpenGLFunctions_1_4_CoreBackend* d_1_4_Core;
+ QOpenGLFunctions_1_5_CoreBackend* d_1_5_Core;
+ QOpenGLFunctions_2_0_CoreBackend* d_2_0_Core;
+ QOpenGLFunctions_2_1_CoreBackend* d_2_1_Core;
+ QOpenGLFunctions_3_0_CoreBackend* d_3_0_Core;
+ QOpenGLFunctions_3_1_CoreBackend* d_3_1_Core;
+ QOpenGLFunctions_3_2_CoreBackend* d_3_2_Core;
+ QOpenGLFunctions_3_3_CoreBackend* d_3_3_Core;
+ QOpenGLFunctions_4_0_CoreBackend* d_4_0_Core;
+ QOpenGLFunctions_4_1_CoreBackend* d_4_1_Core;
+ QOpenGLFunctions_4_2_CoreBackend* d_4_2_Core;
+ QOpenGLFunctions_4_3_CoreBackend* d_4_3_Core;
+ QOpenGLFunctions_4_4_CoreBackend* d_4_4_Core;
+ QOpenGLFunctions_1_0_DeprecatedBackend* d_1_0_Deprecated;
+ QOpenGLFunctions_1_1_DeprecatedBackend* d_1_1_Deprecated;
+ QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
+ QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
+ QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
+};
+
+// OpenGL 1.0 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Viewport(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDepthRange(GLdouble nearVal, GLdouble farVal)
+{
+ d_1_0_Core->DepthRange(nearVal, farVal);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsEnabled(GLenum cap)
+{
+ return d_1_0_Core->IsEnabled(cap);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexLevelParameteriv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexLevelParameterfv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->GetTexImage(target, level, format, type, pixels);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_4_Compatibility::glGetString(GLenum name)
+{
+ return d_1_0_Core->GetString(name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetIntegerv(GLenum pname, GLint *data)
+{
+ d_1_0_Core->GetIntegerv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetFloatv(GLenum pname, GLfloat *data)
+{
+ d_1_0_Core->GetFloatv(pname, data);
+}
+
+inline GLenum QOpenGLFunctions_4_4_Compatibility::glGetError()
+{
+ return d_1_0_Core->GetError();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetDoublev(GLenum pname, GLdouble *data)
+{
+ d_1_0_Core->GetDoublev(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetBooleanv(GLenum pname, GLboolean *data)
+{
+ d_1_0_Core->GetBooleanv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->ReadPixels(x, y, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glReadBuffer(GLenum src)
+{
+ d_1_0_Core->ReadBuffer(src);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelStorei(GLenum pname, GLint param)
+{
+ d_1_0_Core->PixelStorei(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelStoref(GLenum pname, GLfloat param)
+{
+ d_1_0_Core->PixelStoref(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDepthFunc(GLenum func)
+{
+ d_1_0_Core->DepthFunc(func);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ d_1_0_Core->StencilOp(fail, zfail, zpass);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ d_1_0_Core->StencilFunc(func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLogicOp(GLenum opcode)
+{
+ d_1_0_Core->LogicOp(opcode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ d_1_0_Core->BlendFunc(sfactor, dfactor);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFlush()
+{
+ d_1_0_Core->Flush();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFinish()
+{
+ d_1_0_Core->Finish();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEnable(GLenum cap)
+{
+ d_1_0_Core->Enable(cap);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDisable(GLenum cap)
+{
+ d_1_0_Core->Disable(cap);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDepthMask(GLboolean flag)
+{
+ d_1_0_Core->DepthMask(flag);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ d_1_0_Core->ColorMask(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glStencilMask(GLuint mask)
+{
+ d_1_0_Core->StencilMask(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearDepth(GLdouble depth)
+{
+ d_1_0_Core->ClearDepth(depth);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearStencil(GLint s)
+{
+ d_1_0_Core->ClearStencil(s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Core->ClearColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClear(GLbitfield mask)
+{
+ d_1_0_Core->Clear(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawBuffer(GLenum buf)
+{
+ d_1_0_Core->DrawBuffer(buf);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage1D(target, level, internalformat, width, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_0_Core->TexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_1_0_Core->TexParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Core->TexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ d_1_0_Core->TexParameterf(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Scissor(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPolygonMode(GLenum face, GLenum mode)
+{
+ d_1_0_Core->PolygonMode(face, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPointSize(GLfloat size)
+{
+ d_1_0_Core->PointSize(size);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLineWidth(GLfloat width)
+{
+ d_1_0_Core->LineWidth(width);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glHint(GLenum target, GLenum mode)
+{
+ d_1_0_Core->Hint(target, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFrontFace(GLenum mode)
+{
+ d_1_0_Core->FrontFace(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCullFace(GLenum mode)
+{
+ d_1_0_Core->CullFace(mode);
+}
+
+
+// OpenGL 1.1 core functions
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsTexture(GLuint texture)
+{
+ return d_1_1_Core->IsTexture(texture);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenTextures(GLsizei n, GLuint *textures)
+{
+ d_1_1_Core->GenTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ d_1_1_Core->DeleteTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindTexture(GLenum target, GLuint texture)
+{
+ d_1_1_Core->BindTexture(target, texture);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage1D(target, level, xoffset, width, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_1_Core->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ d_1_1_Core->CopyTexSubImage1D(target, level, xoffset, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ d_1_1_Core->CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ d_1_1_Core->CopyTexImage1D(target, level, internalformat, x, y, width, border);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ d_1_1_Core->PolygonOffset(factor, units);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_1_Core->DrawElements(mode, count, type, indices);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ d_1_1_Core->DrawArrays(mode, first, count);
+}
+
+
+// OpenGL 1.2 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_2_Core->BlendColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendEquation(GLenum mode)
+{
+ d_1_2_Core->BlendEquation(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_2_Core->CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_2_Core->DrawRangeElements(mode, start, end, count, type, indices);
+}
+
+
+// OpenGL 1.3 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glGetCompressedTexImage(GLenum target, GLint level, void *img)
+{
+ d_1_3_Core->GetCompressedTexImage(target, level, img);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage1D(target, level, internalformat, width, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSampleCoverage(GLfloat value, GLboolean invert)
+{
+ d_1_3_Core->SampleCoverage(value, invert);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glActiveTexture(GLenum texture)
+{
+ d_1_3_Core->ActiveTexture(texture);
+}
+
+
+// OpenGL 1.4 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glPointParameteriv(GLenum pname, const GLint *params)
+{
+ d_1_4_Core->PointParameteriv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPointParameteri(GLenum pname, GLint param)
+{
+ d_1_4_Core->PointParameteri(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPointParameterfv(GLenum pname, const GLfloat *params)
+{
+ d_1_4_Core->PointParameterfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPointParameterf(GLenum pname, GLfloat param)
+{
+ d_1_4_Core->PointParameterf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawElements(mode, count, type, indices, drawcount);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawArrays(mode, first, count, drawcount);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ d_1_4_Core->BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+
+// OpenGL 1.5 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glGetBufferPointerv(GLenum target, GLenum pname, void * *params)
+{
+ d_1_5_Core->GetBufferPointerv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetBufferParameteriv(target, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glUnmapBuffer(GLenum target)
+{
+ return d_1_5_Core->UnmapBuffer(target);
+}
+
+inline void * QOpenGLFunctions_4_4_Compatibility::glMapBuffer(GLenum target, GLenum access)
+{
+ return d_1_5_Core->MapBuffer(target, access);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
+{
+ d_1_5_Core->GetBufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
+{
+ d_1_5_Core->BufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
+{
+ d_1_5_Core->BufferData(target, size, data, usage);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsBuffer(GLuint buffer)
+{
+ return d_1_5_Core->IsBuffer(buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenBuffers(GLsizei n, GLuint *buffers)
+{
+ d_1_5_Core->GenBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteBuffers(GLsizei n, const GLuint *buffers)
+{
+ d_1_5_Core->DeleteBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindBuffer(GLenum target, GLuint buffer)
+{
+ d_1_5_Core->BindBuffer(target, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+{
+ d_1_5_Core->GetQueryObjectuiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryObjectiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEndQuery(GLenum target)
+{
+ d_1_5_Core->EndQuery(target);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBeginQuery(GLenum target, GLuint id)
+{
+ d_1_5_Core->BeginQuery(target, id);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsQuery(GLuint id)
+{
+ return d_1_5_Core->IsQuery(id);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteQueries(GLsizei n, const GLuint *ids)
+{
+ d_1_5_Core->DeleteQueries(n, ids);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenQueries(GLsizei n, GLuint *ids)
+{
+ d_1_5_Core->GenQueries(n, ids);
+}
+
+
+// OpenGL 2.0 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer)
+{
+ d_2_0_Core->VertexAttribPointer(index, size, type, normalized, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib4fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4Niv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib3sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib3fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib2sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
+{
+ d_2_0_Core->VertexAttrib2s(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib2fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
+{
+ d_2_0_Core->VertexAttrib2f(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_2_0_Core->VertexAttrib2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib1sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
+{
+ d_2_0_Core->VertexAttrib1s(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib1fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
+{
+ d_2_0_Core->VertexAttrib1f(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
+{
+ d_2_0_Core->VertexAttrib1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glValidateProgram(GLuint program)
+{
+ d_2_0_Core->ValidateProgram(program);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform4iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform3iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform2iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform1iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform4fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform3fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform2fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform1fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_2_0_Core->Uniform4i(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3i(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_2_0_Core->Uniform3i(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2i(GLint location, GLint v0, GLint v1)
+{
+ d_2_0_Core->Uniform2i(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1i(GLint location, GLint v0)
+{
+ d_2_0_Core->Uniform1i(location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_2_0_Core->Uniform4f(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_2_0_Core->Uniform3f(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2f(GLint location, GLfloat v0, GLfloat v1)
+{
+ d_2_0_Core->Uniform2f(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1f(GLint location, GLfloat v0)
+{
+ d_2_0_Core->Uniform1f(location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUseProgram(GLuint program)
+{
+ d_2_0_Core->UseProgram(program);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
+{
+ d_2_0_Core->ShaderSource(shader, count, string, length);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLinkProgram(GLuint program)
+{
+ d_2_0_Core->LinkProgram(program);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsShader(GLuint shader)
+{
+ return d_2_0_Core->IsShader(shader);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsProgram(GLuint program)
+{
+ return d_2_0_Core->IsProgram(program);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer)
+{
+ d_2_0_Core->GetVertexAttribPointerv(index, pname, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetVertexAttribiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
+{
+ d_2_0_Core->GetVertexAttribfv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_2_0_Core->GetVertexAttribdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetUniformiv(GLuint program, GLint location, GLint *params)
+{
+ d_2_0_Core->GetUniformiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetUniformfv(GLuint program, GLint location, GLfloat *params)
+{
+ d_2_0_Core->GetUniformfv(program, location, params);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetUniformLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetUniformLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
+{
+ d_2_0_Core->GetShaderSource(shader, bufSize, length, source);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetShaderInfoLog(shader, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetShaderiv(shader, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetProgramInfoLog(program, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetProgramiv(program, pname, params);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetAttribLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetAttribLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
+{
+ d_2_0_Core->GetAttachedShaders(program, maxCount, count, shaders);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveUniform(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveAttrib(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEnableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->EnableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDisableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->DisableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDetachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->DetachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteShader(GLuint shader)
+{
+ d_2_0_Core->DeleteShader(shader);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteProgram(GLuint program)
+{
+ d_2_0_Core->DeleteProgram(program);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glCreateShader(GLenum type)
+{
+ return d_2_0_Core->CreateShader(type);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glCreateProgram()
+{
+ return d_2_0_Core->CreateProgram();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCompileShader(GLuint shader)
+{
+ d_2_0_Core->CompileShader(shader);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
+{
+ d_2_0_Core->BindAttribLocation(program, index, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glAttachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->AttachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ d_2_0_Core->StencilMaskSeparate(face, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ d_2_0_Core->StencilFuncSeparate(face, func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
+{
+ d_2_0_Core->StencilOpSeparate(face, sfail, dpfail, dppass);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawBuffers(GLsizei n, const GLenum *bufs)
+{
+ d_2_0_Core->DrawBuffers(n, bufs);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+{
+ d_2_0_Core->BlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+
+// OpenGL 2.1 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x3fv(location, count, transpose, value);
+}
+
+
+// OpenGL 3.0 core functions
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsVertexArray(GLuint array)
+{
+ return d_3_0_Core->IsVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenVertexArrays(GLsizei n, GLuint *arrays)
+{
+ d_3_0_Core->GenVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+{
+ d_3_0_Core->DeleteVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindVertexArray(GLuint array)
+{
+ d_3_0_Core->BindVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ d_3_0_Core->FlushMappedBufferRange(target, offset, length);
+}
+
+inline void * QOpenGLFunctions_4_4_Compatibility::glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ return d_3_0_Core->MapBufferRange(target, offset, length, access);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ d_3_0_Core->FramebufferTextureLayer(target, attachment, texture, level, layer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ d_3_0_Core->BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenerateMipmap(GLenum target)
+{
+ d_3_0_Core->GenerateMipmap(target);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ d_3_0_Core->FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ d_3_0_Core->FramebufferTexture3D(target, attachment, textarget, texture, level, zoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture2D(target, attachment, textarget, texture, level);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture1D(target, attachment, textarget, texture, level);
+}
+
+inline GLenum QOpenGLFunctions_4_4_Compatibility::glCheckFramebufferStatus(GLenum target)
+{
+ return d_3_0_Core->CheckFramebufferStatus(target);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ d_3_0_Core->GenFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
+{
+ d_3_0_Core->DeleteFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+ d_3_0_Core->BindFramebuffer(target, framebuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsFramebuffer(GLuint framebuffer)
+{
+ return d_3_0_Core->IsFramebuffer(framebuffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetRenderbufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorage(target, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ d_3_0_Core->GenRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
+{
+ d_3_0_Core->DeleteRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+ d_3_0_Core->BindRenderbuffer(target, renderbuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsRenderbuffer(GLuint renderbuffer)
+{
+ return d_3_0_Core->IsRenderbuffer(renderbuffer);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_4_Compatibility::glGetStringi(GLenum name, GLuint index)
+{
+ return d_3_0_Core->GetStringi(name, index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+{
+ d_3_0_Core->ClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ d_3_0_Core->ClearBufferfv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ d_3_0_Core->ClearBufferuiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ d_3_0_Core->ClearBufferiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetTexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetTexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ d_3_0_Core->TexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_3_0_Core->TexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform4uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform3uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform2uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform1uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_3_0_Core->Uniform4ui(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_3_0_Core->Uniform3ui(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+ d_3_0_Core->Uniform2ui(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1ui(GLint location, GLuint v0)
+{
+ d_3_0_Core->Uniform1ui(location, v0);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetFragDataLocation(GLuint program, const GLchar *name)
+{
+ return d_3_0_Core->GetFragDataLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name)
+{
+ d_3_0_Core->BindFragDataLocation(program, color, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+{
+ d_3_0_Core->GetUniformuiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
+{
+ d_3_0_Core->VertexAttribI4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
+{
+ d_3_0_Core->VertexAttribI4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
+{
+ d_3_0_Core->VertexAttribI4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
+{
+ d_3_0_Core->VertexAttribI4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI3uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI2uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI1uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI3iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI2iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI1iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
+{
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
+{
+ d_3_0_Core->VertexAttribI1ui(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
+{
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
+{
+ d_3_0_Core->VertexAttribI2i(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
+{
+ d_3_0_Core->VertexAttribI1i(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetVertexAttribIuiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetVertexAttribIiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_3_0_Core->VertexAttribIPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEndConditionalRender()
+{
+ d_3_0_Core->EndConditionalRender();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBeginConditionalRender(GLuint id, GLenum mode)
+{
+ d_3_0_Core->BeginConditionalRender(id, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClampColor(GLenum target, GLenum clamp)
+{
+ d_3_0_Core->ClampColor(target, clamp);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ d_3_0_Core->GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const *varyings, GLenum bufferMode)
+{
+ d_3_0_Core->TransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+ d_3_0_Core->BindBufferBase(target, index, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_3_0_Core->BindBufferRange(target, index, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEndTransformFeedback()
+{
+ d_3_0_Core->EndTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBeginTransformFeedback(GLenum primitiveMode)
+{
+ d_3_0_Core->BeginTransformFeedback(primitiveMode);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsEnabledi(GLenum target, GLuint index)
+{
+ return d_3_0_Core->IsEnabledi(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDisablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Disablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEnablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Enablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
+{
+ d_3_0_Core->GetIntegeri_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetBooleani_v(GLenum target, GLuint index, GLboolean *data)
+{
+ d_3_0_Core->GetBooleani_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ d_3_0_Core->ColorMaski(index, r, g, b, a);
+}
+
+
+// OpenGL 3.1 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+ d_3_1_Core->UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+{
+ d_3_1_Core->GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+{
+ return d_3_1_Core->GetUniformBlockIndex(program, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)
+{
+ d_3_1_Core->GetActiveUniformName(program, uniformIndex, bufSize, length, uniformName);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices)
+{
+ d_3_1_Core->GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ d_3_1_Core->CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPrimitiveRestartIndex(GLuint index)
+{
+ d_3_1_Core->PrimitiveRestartIndex(index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
+{
+ d_3_1_Core->TexBuffer(target, internalformat, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount)
+{
+ d_3_1_Core->DrawElementsInstanced(mode, count, type, indices, instancecount);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
+{
+ d_3_1_Core->DrawArraysInstanced(mode, first, count, instancecount);
+}
+
+
+// OpenGL 3.2 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glSampleMaski(GLuint maskNumber, GLbitfield mask)
+{
+ d_3_2_Core->SampleMaski(maskNumber, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
+{
+ d_3_2_Core->GetMultisamplefv(pname, index, val);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ d_3_2_Core->FramebufferTexture(target, attachment, texture, level);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+ d_3_2_Core->GetBufferParameteri64v(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64i_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ d_3_2_Core->GetSynciv(sync, pname, bufSize, length, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetInteger64v(GLenum pname, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64v(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ d_3_2_Core->WaitSync(sync, flags, timeout);
+}
+
+inline GLenum QOpenGLFunctions_4_4_Compatibility::glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ return d_3_2_Core->ClientWaitSync(sync, flags, timeout);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteSync(GLsync sync)
+{
+ d_3_2_Core->DeleteSync(sync);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsSync(GLsync sync)
+{
+ return d_3_2_Core->IsSync(sync);
+}
+
+inline GLsync QOpenGLFunctions_4_4_Compatibility::glFenceSync(GLenum condition, GLbitfield flags)
+{
+ return d_3_2_Core->FenceSync(condition, flags);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProvokingVertex(GLenum mode)
+{
+ d_3_2_Core->ProvokingVertex(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex)
+{
+ d_3_2_Core->MultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsBaseVertex(mode, count, type, indices, basevertex);
+}
+
+
+// OpenGL 3.3 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP4uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP4ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP3uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP3ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP2uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP2ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP1uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP1ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ d_3_3_Core->VertexAttribDivisor(index, divisor);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
+{
+ d_3_3_Core->GetQueryObjectui64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
+{
+ d_3_3_Core->GetQueryObjecti64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glQueryCounter(GLuint id, GLenum target)
+{
+ d_3_3_Core->QueryCounter(id, target);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
+{
+ d_3_3_Core->GetSamplerParameterIuiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+{
+ d_3_3_Core->GetSamplerParameterfv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameterIiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameteriv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param)
+{
+ d_3_3_Core->SamplerParameterIuiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameterIiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+{
+ d_3_3_Core->SamplerParameterfv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+ d_3_3_Core->SamplerParameterf(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameteriv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+ d_3_3_Core->SamplerParameteri(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindSampler(GLuint unit, GLuint sampler)
+{
+ d_3_3_Core->BindSampler(unit, sampler);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsSampler(GLuint sampler)
+{
+ return d_3_3_Core->IsSampler(sampler);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteSamplers(GLsizei count, const GLuint *samplers)
+{
+ d_3_3_Core->DeleteSamplers(count, samplers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenSamplers(GLsizei count, GLuint *samplers)
+{
+ d_3_3_Core->GenSamplers(count, samplers);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetFragDataIndex(GLuint program, const GLchar *name)
+{
+ return d_3_3_Core->GetFragDataIndex(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)
+{
+ d_3_3_Core->BindFragDataLocationIndexed(program, colorNumber, index, name);
+}
+
+
+// OpenGL 4.0 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params)
+{
+ d_4_0_Core->GetQueryIndexediv(target, index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEndQueryIndexed(GLenum target, GLuint index)
+{
+ d_4_0_Core->EndQueryIndexed(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBeginQueryIndexed(GLenum target, GLuint index, GLuint id)
+{
+ d_4_0_Core->BeginQueryIndexed(target, index, id);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream)
+{
+ d_4_0_Core->DrawTransformFeedbackStream(mode, id, stream);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawTransformFeedback(GLenum mode, GLuint id)
+{
+ d_4_0_Core->DrawTransformFeedback(mode, id);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glResumeTransformFeedback()
+{
+ d_4_0_Core->ResumeTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPauseTransformFeedback()
+{
+ d_4_0_Core->PauseTransformFeedback();
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsTransformFeedback(GLuint id)
+{
+ return d_4_0_Core->IsTransformFeedback(id);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ d_4_0_Core->GenTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+ d_4_0_Core->DeleteTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindTransformFeedback(GLenum target, GLuint id)
+{
+ d_4_0_Core->BindTransformFeedback(target, id);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPatchParameterfv(GLenum pname, const GLfloat *values)
+{
+ d_4_0_Core->PatchParameterfv(pname, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPatchParameteri(GLenum pname, GLint value)
+{
+ d_4_0_Core->PatchParameteri(pname, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetProgramStageiv(program, shadertype, pname, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params)
+{
+ d_4_0_Core->GetUniformSubroutineuiv(shadertype, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices)
+{
+ d_4_0_Core->UniformSubroutinesuiv(shadertype, count, indices);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetActiveSubroutineUniformiv(program, shadertype, index, pname, values);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineIndex(program, shadertype, name);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineUniformLocation(program, shadertype, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetUniformdv(GLuint program, GLint location, GLdouble *params)
+{
+ d_4_0_Core->GetUniformdv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform4dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform3dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform2dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform1dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_0_Core->Uniform4d(location, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_0_Core->Uniform3d(location, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform2d(GLint location, GLdouble x, GLdouble y)
+{
+ d_4_0_Core->Uniform2d(location, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUniform1d(GLint location, GLdouble x)
+{
+ d_4_0_Core->Uniform1d(location, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
+{
+ d_4_0_Core->DrawElementsIndirect(mode, type, indirect);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawArraysIndirect(GLenum mode, const void *indirect)
+{
+ d_4_0_Core->DrawArraysIndirect(mode, indirect);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+{
+ d_4_0_Core->BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendFunci(GLuint buf, GLenum src, GLenum dst)
+{
+ d_4_0_Core->BlendFunci(buf, src, dst);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
+{
+ d_4_0_Core->BlendEquationSeparatei(buf, modeRGB, modeAlpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBlendEquationi(GLuint buf, GLenum mode)
+{
+ d_4_0_Core->BlendEquationi(buf, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMinSampleShading(GLfloat value)
+{
+ d_4_0_Core->MinSampleShading(value);
+}
+
+
+// OpenGL 4.1 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glGetDoublei_v(GLenum target, GLuint index, GLdouble *data)
+{
+ d_4_1_Core->GetDoublei_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetFloati_v(GLenum target, GLuint index, GLfloat *data)
+{
+ d_4_1_Core->GetFloati_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f)
+{
+ d_4_1_Core->DepthRangeIndexed(index, n, f);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v)
+{
+ d_4_1_Core->DepthRangeArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glScissorIndexedv(GLuint index, const GLint *v)
+{
+ d_4_1_Core->ScissorIndexedv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)
+{
+ d_4_1_Core->ScissorIndexed(index, left, bottom, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glScissorArrayv(GLuint first, GLsizei count, const GLint *v)
+{
+ d_4_1_Core->ScissorArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glViewportIndexedfv(GLuint index, const GLfloat *v)
+{
+ d_4_1_Core->ViewportIndexedfv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+{
+ d_4_1_Core->ViewportIndexedf(index, x, y, w, h);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
+{
+ d_4_1_Core->ViewportArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_4_1_Core->GetVertexAttribLdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_4_1_Core->VertexAttribLPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL4dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL3dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL2dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL1dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_1_Core->VertexAttribL4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_1_Core->VertexAttribL3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_4_1_Core->VertexAttribL2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribL1d(GLuint index, GLdouble x)
+{
+ d_4_1_Core->VertexAttribL1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_4_1_Core->GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glValidateProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->ValidateProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform4uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_4_1_Core->ProgramUniform4ui(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform4dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)
+{
+ d_4_1_Core->ProgramUniform4d(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform4fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_4_1_Core->ProgramUniform4f(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform4iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_4_1_Core->ProgramUniform4i(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform3uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_4_1_Core->ProgramUniform3ui(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform3dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)
+{
+ d_4_1_Core->ProgramUniform3d(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform3fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_4_1_Core->ProgramUniform3f(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform3iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_4_1_Core->ProgramUniform3i(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform2uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
+{
+ d_4_1_Core->ProgramUniform2ui(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform2dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1)
+{
+ d_4_1_Core->ProgramUniform2d(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform2fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
+{
+ d_4_1_Core->ProgramUniform2f(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform2iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
+{
+ d_4_1_Core->ProgramUniform2i(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform1uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
+{
+ d_4_1_Core->ProgramUniform1ui(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform1dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1d(GLuint program, GLint location, GLdouble v0)
+{
+ d_4_1_Core->ProgramUniform1d(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform1fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1f(GLuint program, GLint location, GLfloat v0)
+{
+ d_4_1_Core->ProgramUniform1f(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform1iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramUniform1i(GLuint program, GLint location, GLint v0)
+{
+ d_4_1_Core->ProgramUniform1i(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
+{
+ d_4_1_Core->GetProgramPipelineiv(pipeline, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsProgramPipeline(GLuint pipeline)
+{
+ return d_4_1_Core->IsProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGenProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ d_4_1_Core->GenProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
+{
+ d_4_1_Core->DeleteProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->BindProgramPipeline(pipeline);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
+{
+ return d_4_1_Core->CreateShaderProgramv(type, count, strings);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glActiveShaderProgram(GLuint pipeline, GLuint program)
+{
+ d_4_1_Core->ActiveShaderProgram(pipeline, program);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+{
+ d_4_1_Core->UseProgramStages(pipeline, stages, program);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+ d_4_1_Core->ProgramParameteri(program, pname, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ProgramBinary(program, binaryFormat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
+{
+ d_4_1_Core->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearDepthf(GLfloat dd)
+{
+ d_4_1_Core->ClearDepthf(dd);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDepthRangef(GLfloat n, GLfloat f)
+{
+ d_4_1_Core->DepthRangef(n, f);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ d_4_1_Core->GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ShaderBinary(count, shaders, binaryformat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glReleaseShaderCompiler()
+{
+ d_4_1_Core->ReleaseShaderCompiler();
+}
+
+
+// OpenGL 4.2 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackStreamInstanced(mode, id, stream, instancecount);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackInstanced(mode, id, instancecount);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_2_Core->TexStorage3D(target, levels, internalformat, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_2_Core->TexStorage2D(target, levels, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
+{
+ d_4_2_Core->TexStorage1D(target, levels, internalformat, width);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMemoryBarrier(GLbitfield barriers)
+{
+ d_4_2_Core->MemoryBarrier(barriers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
+{
+ d_4_2_Core->BindImageTexture(unit, texture, level, layered, layer, access, format);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)
+{
+ d_4_2_Core->GetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
+{
+ d_4_2_Core->GetInternalformativ(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, instancecount, basevertex, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseInstance(mode, count, type, indices, instancecount, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance);
+}
+
+
+// OpenGL 4.3 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectPtrLabel(ptr, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectPtrLabel(ptr, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectLabel(identifier, name, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectLabel(identifier, name, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPopDebugGroup()
+{
+ d_4_3_Core->PopDebugGroup();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message)
+{
+ d_4_3_Core->PushDebugGroup(source, id, length, message);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
+{
+ return d_4_3_Core->GetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, messageLog);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
+{
+ d_4_3_Core->DebugMessageCallback(callback, userParam);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
+{
+ d_4_3_Core->DebugMessageInsert(source, type, id, severity, length, buf);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
+{
+ d_4_3_Core->DebugMessageControl(source, type, severity, count, ids, enabled);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexBindingDivisor(GLuint bindingindex, GLuint divisor)
+{
+ d_4_3_Core->VertexBindingDivisor(bindingindex, divisor);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribBinding(GLuint attribindex, GLuint bindingindex)
+{
+ d_4_3_Core->VertexAttribBinding(attribindex, bindingindex);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribLFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribIFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+{
+ d_4_3_Core->BindVertexBuffer(bindingindex, buffer, offset, stride);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
+{
+ d_4_3_Core->TextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_4_3_Core->TexBufferRange(target, internalformat, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)
+{
+ d_4_3_Core->ShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocationIndex(program, programInterface, name);
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocation(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)
+{
+ d_4_3_Core->GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
+{
+ d_4_3_Core->GetProgramResourceName(program, programInterface, index, bufSize, length, name);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceIndex(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetProgramInterfaceiv(program, programInterface, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawElementsIndirect(mode, type, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawArraysIndirect(mode, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_3_Core->InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ d_4_3_Core->InvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInvalidateBufferData(GLuint buffer)
+{
+ d_4_3_Core->InvalidateBufferData(buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
+{
+ d_4_3_Core->InvalidateBufferSubData(buffer, offset, length);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInvalidateTexImage(GLuint texture, GLint level)
+{
+ d_4_3_Core->InvalidateTexImage(texture, level);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_3_Core->InvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)
+{
+ d_4_3_Core->GetInternalformati64v(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetFramebufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_4_3_Core->FramebufferParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
+{
+ d_4_3_Core->CopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDispatchComputeIndirect(GLintptr indirect)
+{
+ d_4_3_Core->DispatchComputeIndirect(indirect);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
+{
+ d_4_3_Core->DispatchCompute(num_groups_x, num_groups_y, num_groups_z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferSubData(target, internalformat, offset, size, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferData(target, internalformat, format, type, data);
+}
+
+
+// OpenGL 4.4 core functions
+inline void QOpenGLFunctions_4_4_Compatibility::glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
+{
+ d_4_4_Core->BindVertexBuffers(first, count, buffers, offsets, strides);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindImageTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
+{
+ d_4_4_Core->BindSamplers(first, count, samplers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)
+{
+ d_4_4_Core->BindBuffersRange(target, first, count, buffers, offsets, sizes);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers)
+{
+ d_4_4_Core->BindBuffersBase(target, first, count, buffers);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexImage(texture, level, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)
+{
+ d_4_4_Core->BufferStorage(target, size, data, flags);
+}
+
+
+// OpenGL 1.0 deprecated functions
+inline void QOpenGLFunctions_4_4_Compatibility::glTranslatef(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Translatef(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTranslated(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Translated(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glScalef(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Scalef(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glScaled(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Scaled(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Rotatef(angle, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Rotated(angle, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPushMatrix()
+{
+ d_1_0_Deprecated->PushMatrix();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPopMatrix()
+{
+ d_1_0_Deprecated->PopMatrix();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ d_1_0_Deprecated->Ortho(left, right, bottom, top, zNear, zFar);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultMatrixd(const GLdouble *m)
+{
+ d_1_0_Deprecated->MultMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultMatrixf(const GLfloat *m)
+{
+ d_1_0_Deprecated->MultMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMatrixMode(GLenum mode)
+{
+ d_1_0_Deprecated->MatrixMode(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLoadMatrixd(const GLdouble *m)
+{
+ d_1_0_Deprecated->LoadMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLoadMatrixf(const GLfloat *m)
+{
+ d_1_0_Deprecated->LoadMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLoadIdentity()
+{
+ d_1_0_Deprecated->LoadIdentity();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ d_1_0_Deprecated->Frustum(left, right, bottom, top, zNear, zFar);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glIsList(GLuint list)
+{
+ return d_1_0_Deprecated->IsList(list);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetTexGeniv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetTexGenfv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
+{
+ d_1_0_Deprecated->GetTexGendv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexEnviv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetTexEnviv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetTexEnvfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetPolygonStipple(GLubyte *mask)
+{
+ d_1_0_Deprecated->GetPolygonStipple(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetPixelMapusv(GLenum map, GLushort *values)
+{
+ d_1_0_Deprecated->GetPixelMapusv(map, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetPixelMapuiv(GLenum map, GLuint *values)
+{
+ d_1_0_Deprecated->GetPixelMapuiv(map, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetPixelMapfv(GLenum map, GLfloat *values)
+{
+ d_1_0_Deprecated->GetPixelMapfv(map, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMaterialiv(GLenum face, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetMaterialiv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetMaterialfv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMapiv(GLenum target, GLenum query, GLint *v)
+{
+ d_1_0_Deprecated->GetMapiv(target, query, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMapfv(GLenum target, GLenum query, GLfloat *v)
+{
+ d_1_0_Deprecated->GetMapfv(target, query, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMapdv(GLenum target, GLenum query, GLdouble *v)
+{
+ d_1_0_Deprecated->GetMapdv(target, query, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetLightiv(GLenum light, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetLightiv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetLightfv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetClipPlane(GLenum plane, GLdouble *equation)
+{
+ d_1_0_Deprecated->GetClipPlane(plane, equation);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Deprecated->DrawPixels(width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
+{
+ d_1_0_Deprecated->CopyPixels(x, y, width, height, type);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
+{
+ d_1_0_Deprecated->PixelMapusv(map, mapsize, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
+{
+ d_1_0_Deprecated->PixelMapuiv(map, mapsize, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
+{
+ d_1_0_Deprecated->PixelMapfv(map, mapsize, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelTransferi(GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->PixelTransferi(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelTransferf(GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->PixelTransferf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPixelZoom(GLfloat xfactor, GLfloat yfactor)
+{
+ d_1_0_Deprecated->PixelZoom(xfactor, yfactor);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glAlphaFunc(GLenum func, GLfloat ref)
+{
+ d_1_0_Deprecated->AlphaFunc(func, ref);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalPoint2(GLint i, GLint j)
+{
+ d_1_0_Deprecated->EvalPoint2(i, j);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+{
+ d_1_0_Deprecated->EvalMesh2(mode, i1, i2, j1, j2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalPoint1(GLint i)
+{
+ d_1_0_Deprecated->EvalPoint1(i);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalMesh1(GLenum mode, GLint i1, GLint i2)
+{
+ d_1_0_Deprecated->EvalMesh1(mode, i1, i2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord2fv(const GLfloat *u)
+{
+ d_1_0_Deprecated->EvalCoord2fv(u);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord2f(GLfloat u, GLfloat v)
+{
+ d_1_0_Deprecated->EvalCoord2f(u, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord2dv(const GLdouble *u)
+{
+ d_1_0_Deprecated->EvalCoord2dv(u);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord2d(GLdouble u, GLdouble v)
+{
+ d_1_0_Deprecated->EvalCoord2d(u, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord1fv(const GLfloat *u)
+{
+ d_1_0_Deprecated->EvalCoord1fv(u);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord1f(GLfloat u)
+{
+ d_1_0_Deprecated->EvalCoord1f(u);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord1dv(const GLdouble *u)
+{
+ d_1_0_Deprecated->EvalCoord1dv(u);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEvalCoord1d(GLdouble u)
+{
+ d_1_0_Deprecated->EvalCoord1d(u);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
+{
+ d_1_0_Deprecated->MapGrid2f(un, u1, u2, vn, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
+{
+ d_1_0_Deprecated->MapGrid2d(un, u1, u2, vn, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
+{
+ d_1_0_Deprecated->MapGrid1f(un, u1, u2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
+{
+ d_1_0_Deprecated->MapGrid1d(un, u1, u2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
+{
+ d_1_0_Deprecated->Map2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
+{
+ d_1_0_Deprecated->Map2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
+{
+ d_1_0_Deprecated->Map1f(target, u1, u2, stride, order, points);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
+{
+ d_1_0_Deprecated->Map1d(target, u1, u2, stride, order, points);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPushAttrib(GLbitfield mask)
+{
+ d_1_0_Deprecated->PushAttrib(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPopAttrib()
+{
+ d_1_0_Deprecated->PopAttrib();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glAccum(GLenum op, GLfloat value)
+{
+ d_1_0_Deprecated->Accum(op, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexMask(GLuint mask)
+{
+ d_1_0_Deprecated->IndexMask(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearIndex(GLfloat c)
+{
+ d_1_0_Deprecated->ClearIndex(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Deprecated->ClearAccum(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPushName(GLuint name)
+{
+ d_1_0_Deprecated->PushName(name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPopName()
+{
+ d_1_0_Deprecated->PopName();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPassThrough(GLfloat token)
+{
+ d_1_0_Deprecated->PassThrough(token);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLoadName(GLuint name)
+{
+ d_1_0_Deprecated->LoadName(name);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInitNames()
+{
+ d_1_0_Deprecated->InitNames();
+}
+
+inline GLint QOpenGLFunctions_4_4_Compatibility::glRenderMode(GLenum mode)
+{
+ return d_1_0_Deprecated->RenderMode(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSelectBuffer(GLsizei size, GLuint *buffer)
+{
+ d_1_0_Deprecated->SelectBuffer(size, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
+{
+ d_1_0_Deprecated->FeedbackBuffer(size, type, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexGeniv(GLenum coord, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->TexGeniv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexGeni(GLenum coord, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->TexGeni(coord, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->TexGenfv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexGenf(GLenum coord, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->TexGenf(coord, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
+{
+ d_1_0_Deprecated->TexGendv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexGend(GLenum coord, GLenum pname, GLdouble param)
+{
+ d_1_0_Deprecated->TexGend(coord, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexEnviv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->TexEnviv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexEnvi(GLenum target, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->TexEnvi(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->TexEnvfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexEnvf(GLenum target, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->TexEnvf(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glShadeModel(GLenum mode)
+{
+ d_1_0_Deprecated->ShadeModel(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPolygonStipple(const GLubyte *mask)
+{
+ d_1_0_Deprecated->PolygonStipple(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMaterialiv(GLenum face, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->Materialiv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMateriali(GLenum face, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->Materiali(face, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->Materialfv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMaterialf(GLenum face, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->Materialf(face, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLineStipple(GLint factor, GLushort pattern)
+{
+ d_1_0_Deprecated->LineStipple(factor, pattern);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightModeliv(GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->LightModeliv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightModeli(GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->LightModeli(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightModelfv(GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->LightModelfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightModelf(GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->LightModelf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightiv(GLenum light, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->Lightiv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLighti(GLenum light, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->Lighti(light, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightfv(GLenum light, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->Lightfv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLightf(GLenum light, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->Lightf(light, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogiv(GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->Fogiv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogi(GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->Fogi(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogfv(GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->Fogfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogf(GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->Fogf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorMaterial(GLenum face, GLenum mode)
+{
+ d_1_0_Deprecated->ColorMaterial(face, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClipPlane(GLenum plane, const GLdouble *equation)
+{
+ d_1_0_Deprecated->ClipPlane(plane, equation);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Vertex4sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_1_0_Deprecated->Vertex4s(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4iv(const GLint *v)
+{
+ d_1_0_Deprecated->Vertex4iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4i(GLint x, GLint y, GLint z, GLint w)
+{
+ d_1_0_Deprecated->Vertex4i(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Vertex4fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_1_0_Deprecated->Vertex4f(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Vertex4dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_1_0_Deprecated->Vertex4d(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Vertex3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3s(GLshort x, GLshort y, GLshort z)
+{
+ d_1_0_Deprecated->Vertex3s(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3iv(const GLint *v)
+{
+ d_1_0_Deprecated->Vertex3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3i(GLint x, GLint y, GLint z)
+{
+ d_1_0_Deprecated->Vertex3i(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Vertex3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Vertex3f(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Vertex3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Vertex3d(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Vertex2sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2s(GLshort x, GLshort y)
+{
+ d_1_0_Deprecated->Vertex2s(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2iv(const GLint *v)
+{
+ d_1_0_Deprecated->Vertex2iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2i(GLint x, GLint y)
+{
+ d_1_0_Deprecated->Vertex2i(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Vertex2fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2f(GLfloat x, GLfloat y)
+{
+ d_1_0_Deprecated->Vertex2f(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Vertex2dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertex2d(GLdouble x, GLdouble y)
+{
+ d_1_0_Deprecated->Vertex2d(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord4sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ d_1_0_Deprecated->TexCoord4s(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord4iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
+{
+ d_1_0_Deprecated->TexCoord4i(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord4fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ d_1_0_Deprecated->TexCoord4f(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord4dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ d_1_0_Deprecated->TexCoord4d(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3s(GLshort s, GLshort t, GLshort r)
+{
+ d_1_0_Deprecated->TexCoord3s(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3i(GLint s, GLint t, GLint r)
+{
+ d_1_0_Deprecated->TexCoord3i(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
+{
+ d_1_0_Deprecated->TexCoord3f(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
+{
+ d_1_0_Deprecated->TexCoord3d(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord2sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2s(GLshort s, GLshort t)
+{
+ d_1_0_Deprecated->TexCoord2s(s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord2iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2i(GLint s, GLint t)
+{
+ d_1_0_Deprecated->TexCoord2i(s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord2fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2f(GLfloat s, GLfloat t)
+{
+ d_1_0_Deprecated->TexCoord2f(s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord2dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord2d(GLdouble s, GLdouble t)
+{
+ d_1_0_Deprecated->TexCoord2d(s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord1sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1s(GLshort s)
+{
+ d_1_0_Deprecated->TexCoord1s(s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord1iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1i(GLint s)
+{
+ d_1_0_Deprecated->TexCoord1i(s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord1fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1f(GLfloat s)
+{
+ d_1_0_Deprecated->TexCoord1f(s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord1dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoord1d(GLdouble s)
+{
+ d_1_0_Deprecated->TexCoord1d(s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRectsv(const GLshort *v1, const GLshort *v2)
+{
+ d_1_0_Deprecated->Rectsv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+{
+ d_1_0_Deprecated->Rects(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRectiv(const GLint *v1, const GLint *v2)
+{
+ d_1_0_Deprecated->Rectiv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
+{
+ d_1_0_Deprecated->Recti(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRectfv(const GLfloat *v1, const GLfloat *v2)
+{
+ d_1_0_Deprecated->Rectfv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+{
+ d_1_0_Deprecated->Rectf(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRectdv(const GLdouble *v1, const GLdouble *v2)
+{
+ d_1_0_Deprecated->Rectdv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ d_1_0_Deprecated->Rectd(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->RasterPos4sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_1_0_Deprecated->RasterPos4s(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4iv(const GLint *v)
+{
+ d_1_0_Deprecated->RasterPos4iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
+{
+ d_1_0_Deprecated->RasterPos4i(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->RasterPos4fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_1_0_Deprecated->RasterPos4f(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->RasterPos4dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_1_0_Deprecated->RasterPos4d(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->RasterPos3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3s(GLshort x, GLshort y, GLshort z)
+{
+ d_1_0_Deprecated->RasterPos3s(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3iv(const GLint *v)
+{
+ d_1_0_Deprecated->RasterPos3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3i(GLint x, GLint y, GLint z)
+{
+ d_1_0_Deprecated->RasterPos3i(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->RasterPos3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->RasterPos3f(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->RasterPos3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->RasterPos3d(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2sv(const GLshort *v)
+{
+ d_1_0_Deprecated->RasterPos2sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2s(GLshort x, GLshort y)
+{
+ d_1_0_Deprecated->RasterPos2s(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2iv(const GLint *v)
+{
+ d_1_0_Deprecated->RasterPos2iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2i(GLint x, GLint y)
+{
+ d_1_0_Deprecated->RasterPos2i(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->RasterPos2fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2f(GLfloat x, GLfloat y)
+{
+ d_1_0_Deprecated->RasterPos2f(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->RasterPos2dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glRasterPos2d(GLdouble x, GLdouble y)
+{
+ d_1_0_Deprecated->RasterPos2d(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Normal3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3s(GLshort nx, GLshort ny, GLshort nz)
+{
+ d_1_0_Deprecated->Normal3s(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3iv(const GLint *v)
+{
+ d_1_0_Deprecated->Normal3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3i(GLint nx, GLint ny, GLint nz)
+{
+ d_1_0_Deprecated->Normal3i(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Normal3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
+{
+ d_1_0_Deprecated->Normal3f(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Normal3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
+{
+ d_1_0_Deprecated->Normal3d(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3bv(const GLbyte *v)
+{
+ d_1_0_Deprecated->Normal3bv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
+{
+ d_1_0_Deprecated->Normal3b(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexsv(const GLshort *c)
+{
+ d_1_0_Deprecated->Indexsv(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexs(GLshort c)
+{
+ d_1_0_Deprecated->Indexs(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexiv(const GLint *c)
+{
+ d_1_0_Deprecated->Indexiv(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexi(GLint c)
+{
+ d_1_0_Deprecated->Indexi(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexfv(const GLfloat *c)
+{
+ d_1_0_Deprecated->Indexfv(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexf(GLfloat c)
+{
+ d_1_0_Deprecated->Indexf(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexdv(const GLdouble *c)
+{
+ d_1_0_Deprecated->Indexdv(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexd(GLdouble c)
+{
+ d_1_0_Deprecated->Indexd(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEnd()
+{
+ d_1_0_Deprecated->End();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEdgeFlagv(const GLboolean *flag)
+{
+ d_1_0_Deprecated->EdgeFlagv(flag);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEdgeFlag(GLboolean flag)
+{
+ d_1_0_Deprecated->EdgeFlag(flag);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4usv(const GLushort *v)
+{
+ d_1_0_Deprecated->Color4usv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
+{
+ d_1_0_Deprecated->Color4us(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4uiv(const GLuint *v)
+{
+ d_1_0_Deprecated->Color4uiv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ d_1_0_Deprecated->Color4ui(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4ubv(const GLubyte *v)
+{
+ d_1_0_Deprecated->Color4ubv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+{
+ d_1_0_Deprecated->Color4ub(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Color4sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
+{
+ d_1_0_Deprecated->Color4s(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4iv(const GLint *v)
+{
+ d_1_0_Deprecated->Color4iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ d_1_0_Deprecated->Color4i(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Color4fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Deprecated->Color4f(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Color4dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
+{
+ d_1_0_Deprecated->Color4d(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4bv(const GLbyte *v)
+{
+ d_1_0_Deprecated->Color4bv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
+{
+ d_1_0_Deprecated->Color4b(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3usv(const GLushort *v)
+{
+ d_1_0_Deprecated->Color3usv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3us(GLushort red, GLushort green, GLushort blue)
+{
+ d_1_0_Deprecated->Color3us(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3uiv(const GLuint *v)
+{
+ d_1_0_Deprecated->Color3uiv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3ui(GLuint red, GLuint green, GLuint blue)
+{
+ d_1_0_Deprecated->Color3ui(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3ubv(const GLubyte *v)
+{
+ d_1_0_Deprecated->Color3ubv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
+{
+ d_1_0_Deprecated->Color3ub(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Color3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3s(GLshort red, GLshort green, GLshort blue)
+{
+ d_1_0_Deprecated->Color3s(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3iv(const GLint *v)
+{
+ d_1_0_Deprecated->Color3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3i(GLint red, GLint green, GLint blue)
+{
+ d_1_0_Deprecated->Color3i(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Color3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3f(GLfloat red, GLfloat green, GLfloat blue)
+{
+ d_1_0_Deprecated->Color3f(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Color3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3d(GLdouble red, GLdouble green, GLdouble blue)
+{
+ d_1_0_Deprecated->Color3d(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3bv(const GLbyte *v)
+{
+ d_1_0_Deprecated->Color3bv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColor3b(GLbyte red, GLbyte green, GLbyte blue)
+{
+ d_1_0_Deprecated->Color3b(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
+{
+ d_1_0_Deprecated->Bitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glBegin(GLenum mode)
+{
+ d_1_0_Deprecated->Begin(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glListBase(GLuint base)
+{
+ d_1_0_Deprecated->ListBase(base);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Compatibility::glGenLists(GLsizei range)
+{
+ return d_1_0_Deprecated->GenLists(range);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDeleteLists(GLuint list, GLsizei range)
+{
+ d_1_0_Deprecated->DeleteLists(list, range);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCallLists(GLsizei n, GLenum type, const void *lists)
+{
+ d_1_0_Deprecated->CallLists(n, type, lists);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCallList(GLuint list)
+{
+ d_1_0_Deprecated->CallList(list);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEndList()
+{
+ d_1_0_Deprecated->EndList();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNewList(GLuint list, GLenum mode)
+{
+ d_1_0_Deprecated->NewList(list, mode);
+}
+
+
+// OpenGL 1.1 deprecated functions
+inline void QOpenGLFunctions_4_4_Compatibility::glPushClientAttrib(GLbitfield mask)
+{
+ d_1_1_Deprecated->PushClientAttrib(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPopClientAttrib()
+{
+ d_1_1_Deprecated->PopClientAttrib();
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexubv(const GLubyte *c)
+{
+ d_1_1_Deprecated->Indexubv(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexub(GLubyte c)
+{
+ d_1_1_Deprecated->Indexub(c);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities)
+{
+ d_1_1_Deprecated->PrioritizeTextures(n, textures, priorities);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Compatibility::glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
+{
+ return d_1_1_Deprecated->AreTexturesResident(n, textures, residences);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->VertexPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->TexCoordPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormalPointer(GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->NormalPointer(type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glInterleavedArrays(GLenum format, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->InterleavedArrays(format, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetPointerv(GLenum pname, void * *params)
+{
+ d_1_1_Deprecated->GetPointerv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glIndexPointer(GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->IndexPointer(type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEnableClientState(GLenum array)
+{
+ d_1_1_Deprecated->EnableClientState(array);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glEdgeFlagPointer(GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->EdgeFlagPointer(stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glDisableClientState(GLenum array)
+{
+ d_1_1_Deprecated->DisableClientState(array);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->ColorPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glArrayElement(GLint i)
+{
+ d_1_1_Deprecated->ArrayElement(i);
+}
+
+
+// OpenGL 1.2 deprecated functions
+inline void QOpenGLFunctions_4_4_Compatibility::glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table)
+{
+ d_1_2_Deprecated->ColorTable(target, internalformat, width, format, type, table);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_2_Deprecated->ColorTableParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_2_Deprecated->ColorTableParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ d_1_2_Deprecated->CopyColorTable(target, internalformat, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetColorTable(GLenum target, GLenum format, GLenum type, void *table)
+{
+ d_1_2_Deprecated->GetColorTable(target, format, type, table);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetColorTableParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetColorTableParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data)
+{
+ d_1_2_Deprecated->ColorSubTable(target, start, count, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
+{
+ d_1_2_Deprecated->CopyColorSubTable(target, start, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image)
+{
+ d_1_2_Deprecated->ConvolutionFilter1D(target, internalformat, width, format, type, image);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image)
+{
+ d_1_2_Deprecated->ConvolutionFilter2D(target, internalformat, width, height, format, type, image);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
+{
+ d_1_2_Deprecated->ConvolutionParameterf(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_2_Deprecated->ConvolutionParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
+{
+ d_1_2_Deprecated->ConvolutionParameteri(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_2_Deprecated->ConvolutionParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ d_1_2_Deprecated->CopyConvolutionFilter1D(target, internalformat, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_2_Deprecated->CopyConvolutionFilter2D(target, internalformat, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, void *image)
+{
+ d_1_2_Deprecated->GetConvolutionFilter(target, format, type, image);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetConvolutionParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetConvolutionParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetSeparableFilter(GLenum target, GLenum format, GLenum type, void *row, void *column, void *span)
+{
+ d_1_2_Deprecated->GetSeparableFilter(target, format, type, row, column, span);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column)
+{
+ d_1_2_Deprecated->SeparableFilter2D(target, internalformat, width, height, format, type, row, column);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values)
+{
+ d_1_2_Deprecated->GetHistogram(target, reset, format, type, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetHistogramParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetHistogramParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values)
+{
+ d_1_2_Deprecated->GetMinmax(target, reset, format, type, values);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetMinmaxParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetMinmaxParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
+{
+ d_1_2_Deprecated->Histogram(target, width, internalformat, sink);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
+{
+ d_1_2_Deprecated->Minmax(target, internalformat, sink);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glResetHistogram(GLenum target)
+{
+ d_1_2_Deprecated->ResetHistogram(target);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glResetMinmax(GLenum target)
+{
+ d_1_2_Deprecated->ResetMinmax(target);
+}
+
+
+// OpenGL 1.3 deprecated functions
+inline void QOpenGLFunctions_4_4_Compatibility::glMultTransposeMatrixd(const GLdouble *m)
+{
+ d_1_3_Deprecated->MultTransposeMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultTransposeMatrixf(const GLfloat *m)
+{
+ d_1_3_Deprecated->MultTransposeMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLoadTransposeMatrixd(const GLdouble *m)
+{
+ d_1_3_Deprecated->LoadTransposeMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glLoadTransposeMatrixf(const GLfloat *m)
+{
+ d_1_3_Deprecated->LoadTransposeMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ d_1_3_Deprecated->MultiTexCoord4s(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ d_1_3_Deprecated->MultiTexCoord4i(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ d_1_3_Deprecated->MultiTexCoord4f(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ d_1_3_Deprecated->MultiTexCoord4d(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ d_1_3_Deprecated->MultiTexCoord3s(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
+{
+ d_1_3_Deprecated->MultiTexCoord3i(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ d_1_3_Deprecated->MultiTexCoord3f(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ d_1_3_Deprecated->MultiTexCoord3d(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2s(GLenum target, GLshort s, GLshort t)
+{
+ d_1_3_Deprecated->MultiTexCoord2s(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2i(GLenum target, GLint s, GLint t)
+{
+ d_1_3_Deprecated->MultiTexCoord2i(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t)
+{
+ d_1_3_Deprecated->MultiTexCoord2f(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
+{
+ d_1_3_Deprecated->MultiTexCoord2d(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1s(GLenum target, GLshort s)
+{
+ d_1_3_Deprecated->MultiTexCoord1s(target, s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1i(GLenum target, GLint s)
+{
+ d_1_3_Deprecated->MultiTexCoord1i(target, s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1f(GLenum target, GLfloat s)
+{
+ d_1_3_Deprecated->MultiTexCoord1f(target, s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoord1d(GLenum target, GLdouble s)
+{
+ d_1_3_Deprecated->MultiTexCoord1d(target, s);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glClientActiveTexture(GLenum texture)
+{
+ d_1_3_Deprecated->ClientActiveTexture(texture);
+}
+
+
+// OpenGL 1.4 deprecated functions
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3sv(const GLshort *v)
+{
+ d_1_4_Deprecated->WindowPos3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3s(GLshort x, GLshort y, GLshort z)
+{
+ d_1_4_Deprecated->WindowPos3s(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3iv(const GLint *v)
+{
+ d_1_4_Deprecated->WindowPos3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3i(GLint x, GLint y, GLint z)
+{
+ d_1_4_Deprecated->WindowPos3i(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3fv(const GLfloat *v)
+{
+ d_1_4_Deprecated->WindowPos3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_4_Deprecated->WindowPos3f(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3dv(const GLdouble *v)
+{
+ d_1_4_Deprecated->WindowPos3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_4_Deprecated->WindowPos3d(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2sv(const GLshort *v)
+{
+ d_1_4_Deprecated->WindowPos2sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2s(GLshort x, GLshort y)
+{
+ d_1_4_Deprecated->WindowPos2s(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2iv(const GLint *v)
+{
+ d_1_4_Deprecated->WindowPos2iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2i(GLint x, GLint y)
+{
+ d_1_4_Deprecated->WindowPos2i(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2fv(const GLfloat *v)
+{
+ d_1_4_Deprecated->WindowPos2fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2f(GLfloat x, GLfloat y)
+{
+ d_1_4_Deprecated->WindowPos2f(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2dv(const GLdouble *v)
+{
+ d_1_4_Deprecated->WindowPos2dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glWindowPos2d(GLdouble x, GLdouble y)
+{
+ d_1_4_Deprecated->WindowPos2d(x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_4_Deprecated->SecondaryColorPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3usv(const GLushort *v)
+{
+ d_1_4_Deprecated->SecondaryColor3usv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3us(GLushort red, GLushort green, GLushort blue)
+{
+ d_1_4_Deprecated->SecondaryColor3us(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3uiv(const GLuint *v)
+{
+ d_1_4_Deprecated->SecondaryColor3uiv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
+{
+ d_1_4_Deprecated->SecondaryColor3ui(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3ubv(const GLubyte *v)
+{
+ d_1_4_Deprecated->SecondaryColor3ubv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
+{
+ d_1_4_Deprecated->SecondaryColor3ub(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3sv(const GLshort *v)
+{
+ d_1_4_Deprecated->SecondaryColor3sv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3s(GLshort red, GLshort green, GLshort blue)
+{
+ d_1_4_Deprecated->SecondaryColor3s(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3iv(const GLint *v)
+{
+ d_1_4_Deprecated->SecondaryColor3iv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3i(GLint red, GLint green, GLint blue)
+{
+ d_1_4_Deprecated->SecondaryColor3i(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3fv(const GLfloat *v)
+{
+ d_1_4_Deprecated->SecondaryColor3fv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue)
+{
+ d_1_4_Deprecated->SecondaryColor3f(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3dv(const GLdouble *v)
+{
+ d_1_4_Deprecated->SecondaryColor3dv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
+{
+ d_1_4_Deprecated->SecondaryColor3d(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3bv(const GLbyte *v)
+{
+ d_1_4_Deprecated->SecondaryColor3bv(v);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
+{
+ d_1_4_Deprecated->SecondaryColor3b(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogCoordPointer(GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_4_Deprecated->FogCoordPointer(type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogCoorddv(const GLdouble *coord)
+{
+ d_1_4_Deprecated->FogCoorddv(coord);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogCoordd(GLdouble coord)
+{
+ d_1_4_Deprecated->FogCoordd(coord);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogCoordfv(const GLfloat *coord)
+{
+ d_1_4_Deprecated->FogCoordfv(coord);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glFogCoordf(GLfloat coord)
+{
+ d_1_4_Deprecated->FogCoordf(coord);
+}
+
+
+// OpenGL 1.5 deprecated functions
+
+// OpenGL 2.0 deprecated functions
+
+// OpenGL 2.1 deprecated functions
+
+// OpenGL 3.0 deprecated functions
+
+// OpenGL 3.1 deprecated functions
+
+// OpenGL 3.2 deprecated functions
+
+// OpenGL 3.3 deprecated functions
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
+{
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
+{
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
+{
+ d_3_3_Deprecated->ColorP4uiv(type, color);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorP4ui(GLenum type, GLuint color)
+{
+ d_3_3_Deprecated->ColorP4ui(type, color);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
+{
+ d_3_3_Deprecated->ColorP3uiv(type, color);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glColorP3ui(GLenum type, GLuint color)
+{
+ d_3_3_Deprecated->ColorP3ui(type, color);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->NormalP3ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
+{
+ d_3_3_Deprecated->VertexP4uiv(type, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexP4ui(GLenum type, GLuint value)
+{
+ d_3_3_Deprecated->VertexP4ui(type, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
+{
+ d_3_3_Deprecated->VertexP3uiv(type, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexP3ui(GLenum type, GLuint value)
+{
+ d_3_3_Deprecated->VertexP3ui(type, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
+{
+ d_3_3_Deprecated->VertexP2uiv(type, value);
+}
+
+inline void QOpenGLFunctions_4_4_Compatibility::glVertexP2ui(GLenum type, GLuint value)
+{
+ d_3_3_Deprecated->VertexP2ui(type, value);
+}
+
+
+// OpenGL 4.0 deprecated functions
+
+// OpenGL 4.1 deprecated functions
+
+// OpenGL 4.2 deprecated functions
+
+// OpenGL 4.3 deprecated functions
+
+// OpenGL 4.4 deprecated functions
+
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+
+#endif
diff --git a/src/gui/opengl/qopenglfunctions_4_4_core.cpp b/src/gui/opengl/qopenglfunctions_4_4_core.cpp
new file mode 100644
index 0000000000..f76130859d
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_4_core.cpp
@@ -0,0 +1,331 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#include "qopenglfunctions_4_4_core.h"
+#include "qopenglcontext.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QOpenGLFunctions_4_4_Core
+ \inmodule QtGui
+ \since 5.5
+ \wrapper
+ \brief The QOpenGLFunctions_4_4_Core class provides all functions for OpenGL 4.4 core profile.
+
+ This class is a wrapper for functions from OpenGL 4.4 core profile.
+ See reference pages on \l {http://www.opengl.org/sdk/docs/}{opengl.org}
+ for function documentation.
+
+ \sa QAbstractOpenGLFunctions
+*/
+
+QOpenGLFunctions_4_4_Core::QOpenGLFunctions_4_4_Core()
+ : QAbstractOpenGLFunctions()
+ , d_1_0_Core(0)
+ , d_1_1_Core(0)
+ , d_1_2_Core(0)
+ , d_1_3_Core(0)
+ , d_1_4_Core(0)
+ , d_1_5_Core(0)
+ , d_2_0_Core(0)
+ , d_2_1_Core(0)
+ , d_3_0_Core(0)
+ , d_3_1_Core(0)
+ , d_3_2_Core(0)
+ , d_3_3_Core(0)
+ , d_4_0_Core(0)
+ , d_4_1_Core(0)
+ , d_4_2_Core(0)
+ , d_4_3_Core(0)
+ , d_4_4_Core(0)
+{
+}
+
+QOpenGLFunctions_4_4_Core::~QOpenGLFunctions_4_4_Core()
+{
+ if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ delete d_1_0_Core;
+ }
+ if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ delete d_1_1_Core;
+ }
+ if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ delete d_1_2_Core;
+ }
+ if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ delete d_1_3_Core;
+ }
+ if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ delete d_1_4_Core;
+ }
+ if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ delete d_1_5_Core;
+ }
+ if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ delete d_2_0_Core;
+ }
+ if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ delete d_2_1_Core;
+ }
+ if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ delete d_3_0_Core;
+ }
+ if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ delete d_3_1_Core;
+ }
+ if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ delete d_3_2_Core;
+ }
+ if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ delete d_3_3_Core;
+ }
+ if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ delete d_4_0_Core;
+ }
+ if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ delete d_4_1_Core;
+ }
+ if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ delete d_4_2_Core;
+ }
+ if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ delete d_4_3_Core;
+ }
+ if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ delete d_4_4_Core;
+ }
+}
+
+bool QOpenGLFunctions_4_4_Core::initializeOpenGLFunctions()
+{
+ if ( isInitialized() )
+ return true;
+
+ QOpenGLContext* context = QOpenGLContext::currentContext();
+
+ // If owned by a context object make sure it is current.
+ // Also check that current context is capable of resolving all needed functions
+ if (((owningContext() && owningContext() == context) || !owningContext())
+ && QOpenGLFunctions_4_4_Core::isContextCompatible(context))
+ {
+ // Associate with private implementation, creating if necessary
+ // Function pointers in the backends are resolved at creation time
+ QOpenGLVersionFunctionsBackend* d = 0;
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
+ }
+ d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
+ }
+ d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
+ }
+ d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
+ }
+ d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
+ }
+ d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_5_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
+ }
+ d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
+ }
+ d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
+ }
+ d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
+ }
+ d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
+ }
+ d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
+ }
+ d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
+ }
+ d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
+ }
+ d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
+ }
+ d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
+ }
+ d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
+ }
+ d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
+ }
+ d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ QAbstractOpenGLFunctions::initializeOpenGLFunctions();
+ }
+ return isInitialized();
+}
+
+bool QOpenGLFunctions_4_4_Core::isContextCompatible(QOpenGLContext *context)
+{
+ Q_ASSERT(context);
+ QSurfaceFormat f = context->format();
+ const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
+ if (v < qMakePair(4, 4))
+ return false;
+
+ return true;
+}
+
+QOpenGLVersionProfile QOpenGLFunctions_4_4_Core::versionProfile()
+{
+ QOpenGLVersionProfile v;
+ v.setVersion(4, 4);
+ v.setProfile(QSurfaceFormat::CoreProfile);
+ return v;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions_4_4_core.h b/src/gui/opengl/qopenglfunctions_4_4_core.h
new file mode 100644
index 0000000000..e448d2a10e
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_4_core.h
@@ -0,0 +1,3413 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#ifndef QOPENGLVERSIONFUNCTIONS_4_4_CORE_H
+#define QOPENGLVERSIONFUNCTIONS_4_4_CORE_H
+
+#include <QtCore/qglobal.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+
+#include <QtGui/QOpenGLVersionFunctions>
+#include <QtGui/qopenglcontext.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QOpenGLFunctions_4_4_Core : public QAbstractOpenGLFunctions
+{
+public:
+ QOpenGLFunctions_4_4_Core();
+ ~QOpenGLFunctions_4_4_Core();
+
+ bool initializeOpenGLFunctions() Q_DECL_OVERRIDE;
+
+ // OpenGL 1.0 core functions
+ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glDepthRange(GLdouble nearVal, GLdouble farVal);
+ GLboolean glIsEnabled(GLenum cap);
+ void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
+ void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
+ void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+ const GLubyte * glGetString(GLenum name);
+ void glGetIntegerv(GLenum pname, GLint *data);
+ void glGetFloatv(GLenum pname, GLfloat *data);
+ GLenum glGetError();
+ void glGetDoublev(GLenum pname, GLdouble *data);
+ void glGetBooleanv(GLenum pname, GLboolean *data);
+ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+ void glReadBuffer(GLenum src);
+ void glPixelStorei(GLenum pname, GLint param);
+ void glPixelStoref(GLenum pname, GLfloat param);
+ void glDepthFunc(GLenum func);
+ void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+ void glStencilFunc(GLenum func, GLint ref, GLuint mask);
+ void glLogicOp(GLenum opcode);
+ void glBlendFunc(GLenum sfactor, GLenum dfactor);
+ void glFlush();
+ void glFinish();
+ void glEnable(GLenum cap);
+ void glDisable(GLenum cap);
+ void glDepthMask(GLboolean flag);
+ void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void glStencilMask(GLuint mask);
+ void glClearDepth(GLdouble depth);
+ void glClearStencil(GLint s);
+ void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glClear(GLbitfield mask);
+ void glDrawBuffer(GLenum buf);
+ void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glTexParameteri(GLenum target, GLenum pname, GLint param);
+ void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glPolygonMode(GLenum face, GLenum mode);
+ void glPointSize(GLfloat size);
+ void glLineWidth(GLfloat width);
+ void glHint(GLenum target, GLenum mode);
+ void glFrontFace(GLenum mode);
+ void glCullFace(GLenum mode);
+
+ // OpenGL 1.1 core functions
+ GLboolean glIsTexture(GLuint texture);
+ void glGenTextures(GLsizei n, GLuint *textures);
+ void glDeleteTextures(GLsizei n, const GLuint *textures);
+ void glBindTexture(GLenum target, GLuint texture);
+ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+ void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+ void glPolygonOffset(GLfloat factor, GLfloat units);
+ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
+ void glDrawArrays(GLenum mode, GLint first, GLsizei count);
+
+ // OpenGL 1.2 core functions
+ void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glBlendEquation(GLenum mode);
+ void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+
+ // OpenGL 1.3 core functions
+ void glGetCompressedTexImage(GLenum target, GLint level, void *img);
+ void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+ void glSampleCoverage(GLfloat value, GLboolean invert);
+ void glActiveTexture(GLenum texture);
+
+ // OpenGL 1.4 core functions
+ void glPointParameteriv(GLenum pname, const GLint *params);
+ void glPointParameteri(GLenum pname, GLint param);
+ void glPointParameterfv(GLenum pname, const GLfloat *params);
+ void glPointParameterf(GLenum pname, GLfloat param);
+ void glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount);
+ void glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+ void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+
+ // OpenGL 1.5 core functions
+ void glGetBufferPointerv(GLenum target, GLenum pname, void * *params);
+ void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ GLboolean glUnmapBuffer(GLenum target);
+ void * glMapBuffer(GLenum target, GLenum access);
+ void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data);
+ void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+ void glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+ GLboolean glIsBuffer(GLuint buffer);
+ void glGenBuffers(GLsizei n, GLuint *buffers);
+ void glDeleteBuffers(GLsizei n, const GLuint *buffers);
+ void glBindBuffer(GLenum target, GLuint buffer);
+ void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
+ void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params);
+ void glGetQueryiv(GLenum target, GLenum pname, GLint *params);
+ void glEndQuery(GLenum target);
+ void glBeginQuery(GLenum target, GLuint id);
+ GLboolean glIsQuery(GLuint id);
+ void glDeleteQueries(GLsizei n, const GLuint *ids);
+ void glGenQueries(GLsizei n, GLuint *ids);
+
+ // OpenGL 2.0 core functions
+ void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+ void glVertexAttrib4usv(GLuint index, const GLushort *v);
+ void glVertexAttrib4uiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4sv(GLuint index, const GLshort *v);
+ void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+ void glVertexAttrib4iv(GLuint index, const GLint *v);
+ void glVertexAttrib4fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glVertexAttrib4dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttrib4bv(GLuint index, const GLbyte *v);
+ void glVertexAttrib4Nusv(GLuint index, const GLushort *v);
+ void glVertexAttrib4Nuiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4Nubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+ void glVertexAttrib4Nsv(GLuint index, const GLshort *v);
+ void glVertexAttrib4Niv(GLuint index, const GLint *v);
+ void glVertexAttrib4Nbv(GLuint index, const GLbyte *v);
+ void glVertexAttrib3sv(GLuint index, const GLshort *v);
+ void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z);
+ void glVertexAttrib3fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+ void glVertexAttrib3dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttrib2sv(GLuint index, const GLshort *v);
+ void glVertexAttrib2s(GLuint index, GLshort x, GLshort y);
+ void glVertexAttrib2fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+ void glVertexAttrib2dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttrib1sv(GLuint index, const GLshort *v);
+ void glVertexAttrib1s(GLuint index, GLshort x);
+ void glVertexAttrib1fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib1f(GLuint index, GLfloat x);
+ void glVertexAttrib1dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib1d(GLuint index, GLdouble x);
+ void glValidateProgram(GLuint program);
+ void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniform4iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform3iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform2iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform1iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform4fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform3fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform2fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform1fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+ void glUniform2i(GLint location, GLint v0, GLint v1);
+ void glUniform1i(GLint location, GLint v0);
+ void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glUniform2f(GLint location, GLfloat v0, GLfloat v1);
+ void glUniform1f(GLint location, GLfloat v0);
+ void glUseProgram(GLuint program);
+ void glShaderSource(GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
+ void glLinkProgram(GLuint program);
+ GLboolean glIsShader(GLuint shader);
+ GLboolean glIsProgram(GLuint program);
+ void glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer);
+ void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params);
+ void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params);
+ void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params);
+ void glGetUniformiv(GLuint program, GLint location, GLint *params);
+ void glGetUniformfv(GLuint program, GLint location, GLfloat *params);
+ GLint glGetUniformLocation(GLuint program, const GLchar *name);
+ void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+ void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
+ void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetProgramiv(GLuint program, GLenum pname, GLint *params);
+ GLint glGetAttribLocation(GLuint program, const GLchar *name);
+ void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+ void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glEnableVertexAttribArray(GLuint index);
+ void glDisableVertexAttribArray(GLuint index);
+ void glDetachShader(GLuint program, GLuint shader);
+ void glDeleteShader(GLuint shader);
+ void glDeleteProgram(GLuint program);
+ GLuint glCreateShader(GLenum type);
+ GLuint glCreateProgram();
+ void glCompileShader(GLuint shader);
+ void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name);
+ void glAttachShader(GLuint program, GLuint shader);
+ void glStencilMaskSeparate(GLenum face, GLuint mask);
+ void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+ void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+ void glDrawBuffers(GLsizei n, const GLenum *bufs);
+ void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+
+ // OpenGL 2.1 core functions
+ void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+
+ // OpenGL 3.0 core functions
+ GLboolean glIsVertexArray(GLuint array);
+ void glGenVertexArrays(GLsizei n, GLuint *arrays);
+ void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
+ void glBindVertexArray(GLuint array);
+ void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
+ void * glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+ void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void glGenerateMipmap(GLenum target);
+ void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+ void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+ void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ GLenum glCheckFramebufferStatus(GLenum target);
+ void glGenFramebuffers(GLsizei n, GLuint *framebuffers);
+ void glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
+ void glBindFramebuffer(GLenum target, GLuint framebuffer);
+ GLboolean glIsFramebuffer(GLuint framebuffer);
+ void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+ void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
+ void glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
+ void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+ GLboolean glIsRenderbuffer(GLuint renderbuffer);
+ const GLubyte * glGetStringi(GLenum name, GLuint index);
+ void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+ void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
+ void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params);
+ void glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params);
+ void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);
+ void glTexParameterIiv(GLenum target, GLenum pname, const GLint *params);
+ void glUniform4uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform3uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform2uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform1uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glUniform2ui(GLint location, GLuint v0, GLuint v1);
+ void glUniform1ui(GLint location, GLuint v0);
+ GLint glGetFragDataLocation(GLuint program, const GLchar *name);
+ void glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name);
+ void glGetUniformuiv(GLuint program, GLint location, GLuint *params);
+ void glVertexAttribI4usv(GLuint index, const GLushort *v);
+ void glVertexAttribI4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttribI4sv(GLuint index, const GLshort *v);
+ void glVertexAttribI4bv(GLuint index, const GLbyte *v);
+ void glVertexAttribI4uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI3uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI2uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI1uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI4iv(GLuint index, const GLint *v);
+ void glVertexAttribI3iv(GLuint index, const GLint *v);
+ void glVertexAttribI2iv(GLuint index, const GLint *v);
+ void glVertexAttribI1iv(GLuint index, const GLint *v);
+ void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z);
+ void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y);
+ void glVertexAttribI1ui(GLuint index, GLuint x);
+ void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z);
+ void glVertexAttribI2i(GLuint index, GLint x, GLint y);
+ void glVertexAttribI1i(GLuint index, GLint x);
+ void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
+ void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
+ void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glEndConditionalRender();
+ void glBeginConditionalRender(GLuint id, GLenum mode);
+ void glClampColor(GLenum target, GLenum clamp);
+ void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+ void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
+ void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
+ void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glEndTransformFeedback();
+ void glBeginTransformFeedback(GLenum primitiveMode);
+ GLboolean glIsEnabledi(GLenum target, GLuint index);
+ void glDisablei(GLenum target, GLuint index);
+ void glEnablei(GLenum target, GLuint index);
+ void glGetIntegeri_v(GLenum target, GLuint index, GLint *data);
+ void glGetBooleani_v(GLenum target, GLuint index, GLboolean *data);
+ void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+
+ // OpenGL 3.1 core functions
+ void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+ void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+ void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+ GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
+ void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+ void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+ void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices);
+ void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+ void glPrimitiveRestartIndex(GLuint index);
+ void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer);
+ void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+ void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+
+ // OpenGL 3.2 core functions
+ void glSampleMaski(GLuint maskNumber, GLbitfield mask);
+ void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
+ void glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);
+ void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
+ void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
+ void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+ void glGetInteger64v(GLenum pname, GLint64 *data);
+ void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ void glDeleteSync(GLsync sync);
+ GLboolean glIsSync(GLsync sync);
+ GLsync glFenceSync(GLenum condition, GLbitfield flags);
+ void glProvokingVertex(GLenum mode);
+ void glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex);
+ void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
+ void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+ void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+
+ // OpenGL 3.3 core functions
+ void glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribDivisor(GLuint index, GLuint divisor);
+ void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params);
+ void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params);
+ void glQueryCounter(GLuint id, GLenum target);
+ void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params);
+ void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
+ void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params);
+ void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
+ void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param);
+ void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
+ void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
+ void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
+ void glBindSampler(GLuint unit, GLuint sampler);
+ GLboolean glIsSampler(GLuint sampler);
+ void glDeleteSamplers(GLsizei count, const GLuint *samplers);
+ void glGenSamplers(GLsizei count, GLuint *samplers);
+ GLint glGetFragDataIndex(GLuint program, const GLchar *name);
+ void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+
+ // OpenGL 4.0 core functions
+ void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params);
+ void glEndQueryIndexed(GLenum target, GLuint index);
+ void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id);
+ void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream);
+ void glDrawTransformFeedback(GLenum mode, GLuint id);
+ void glResumeTransformFeedback();
+ void glPauseTransformFeedback();
+ GLboolean glIsTransformFeedback(GLuint id);
+ void glGenTransformFeedbacks(GLsizei n, GLuint *ids);
+ void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
+ void glBindTransformFeedback(GLenum target, GLuint id);
+ void glPatchParameterfv(GLenum pname, const GLfloat *values);
+ void glPatchParameteri(GLenum pname, GLint value);
+ void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+ void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params);
+ void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices);
+ void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+ GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name);
+ GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name);
+ void glGetUniformdv(GLuint program, GLint location, GLdouble *params);
+ void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniform4dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform3dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform2dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform1dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);
+ void glUniform2d(GLint location, GLdouble x, GLdouble y);
+ void glUniform1d(GLint location, GLdouble x);
+ void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
+ void glDrawArraysIndirect(GLenum mode, const void *indirect);
+ void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+ void glBlendFunci(GLuint buf, GLenum src, GLenum dst);
+ void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+ void glBlendEquationi(GLuint buf, GLenum mode);
+ void glMinSampleShading(GLfloat value);
+
+ // OpenGL 4.1 core functions
+ void glGetDoublei_v(GLenum target, GLuint index, GLdouble *data);
+ void glGetFloati_v(GLenum target, GLuint index, GLfloat *data);
+ void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f);
+ void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v);
+ void glScissorIndexedv(GLuint index, const GLint *v);
+ void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+ void glScissorArrayv(GLuint first, GLsizei count, const GLint *v);
+ void glViewportIndexedfv(GLuint index, const GLfloat *v);
+ void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+ void glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v);
+ void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params);
+ void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glVertexAttribL4dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL3dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL2dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL1dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttribL1d(GLuint index, GLdouble x);
+ void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glValidateProgramPipeline(GLuint pipeline);
+ void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+ void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+ void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+ void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
+ void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);
+ void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+ void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
+ void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
+ void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform1d(GLuint program, GLint location, GLdouble v0);
+ void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
+ void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform1i(GLuint program, GLint location, GLint v0);
+ void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
+ GLboolean glIsProgramPipeline(GLuint pipeline);
+ void glGenProgramPipelines(GLsizei n, GLuint *pipelines);
+ void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
+ void glBindProgramPipeline(GLuint pipeline);
+ GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar* const *strings);
+ void glActiveShaderProgram(GLuint pipeline, GLuint program);
+ void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
+ void glProgramParameteri(GLuint program, GLenum pname, GLint value);
+ void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+ void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+ void glClearDepthf(GLfloat dd);
+ void glDepthRangef(GLfloat n, GLfloat f);
+ void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+ void glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+ void glReleaseShaderCompiler();
+
+ // OpenGL 4.2 core functions
+ void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
+ void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount);
+ void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+ void glMemoryBarrier(GLbitfield barriers);
+ void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+ void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
+ void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+ void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
+ void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
+ void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
+
+ // OpenGL 4.3 core functions
+ void glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label);
+ void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+ void glPopDebugGroup();
+ void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message);
+ GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+ void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
+ void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+ void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+ void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
+ void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
+ void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+ void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+ GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+ void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+ GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+ void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+ void glInvalidateBufferData(GLuint buffer);
+ void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length);
+ void glInvalidateTexImage(GLuint texture, GLint level);
+ void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+ void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
+ void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
+ void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+ void glDispatchComputeIndirect(GLintptr indirect);
+ void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+ void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+ void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+
+ // OpenGL 4.4 core functions
+ void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers);
+ void glBindTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
+ void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
+ void glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+ void glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
+ void glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
+
+private:
+ friend class QOpenGLContext;
+
+ static bool isContextCompatible(QOpenGLContext *context);
+ static QOpenGLVersionProfile versionProfile();
+
+ QOpenGLFunctions_1_0_CoreBackend* d_1_0_Core;
+ QOpenGLFunctions_1_1_CoreBackend* d_1_1_Core;
+ QOpenGLFunctions_1_2_CoreBackend* d_1_2_Core;
+ QOpenGLFunctions_1_3_CoreBackend* d_1_3_Core;
+ QOpenGLFunctions_1_4_CoreBackend* d_1_4_Core;
+ QOpenGLFunctions_1_5_CoreBackend* d_1_5_Core;
+ QOpenGLFunctions_2_0_CoreBackend* d_2_0_Core;
+ QOpenGLFunctions_2_1_CoreBackend* d_2_1_Core;
+ QOpenGLFunctions_3_0_CoreBackend* d_3_0_Core;
+ QOpenGLFunctions_3_1_CoreBackend* d_3_1_Core;
+ QOpenGLFunctions_3_2_CoreBackend* d_3_2_Core;
+ QOpenGLFunctions_3_3_CoreBackend* d_3_3_Core;
+ QOpenGLFunctions_4_0_CoreBackend* d_4_0_Core;
+ QOpenGLFunctions_4_1_CoreBackend* d_4_1_Core;
+ QOpenGLFunctions_4_2_CoreBackend* d_4_2_Core;
+ QOpenGLFunctions_4_3_CoreBackend* d_4_3_Core;
+ QOpenGLFunctions_4_4_CoreBackend* d_4_4_Core;
+};
+
+// OpenGL 1.0 core functions
+inline void QOpenGLFunctions_4_4_Core::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Viewport(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDepthRange(GLdouble nearVal, GLdouble farVal)
+{
+ d_1_0_Core->DepthRange(nearVal, farVal);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsEnabled(GLenum cap)
+{
+ return d_1_0_Core->IsEnabled(cap);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexLevelParameteriv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexLevelParameterfv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->GetTexImage(target, level, format, type, pixels);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_4_Core::glGetString(GLenum name)
+{
+ return d_1_0_Core->GetString(name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetIntegerv(GLenum pname, GLint *data)
+{
+ d_1_0_Core->GetIntegerv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetFloatv(GLenum pname, GLfloat *data)
+{
+ d_1_0_Core->GetFloatv(pname, data);
+}
+
+inline GLenum QOpenGLFunctions_4_4_Core::glGetError()
+{
+ return d_1_0_Core->GetError();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetDoublev(GLenum pname, GLdouble *data)
+{
+ d_1_0_Core->GetDoublev(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetBooleanv(GLenum pname, GLboolean *data)
+{
+ d_1_0_Core->GetBooleanv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->ReadPixels(x, y, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glReadBuffer(GLenum src)
+{
+ d_1_0_Core->ReadBuffer(src);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPixelStorei(GLenum pname, GLint param)
+{
+ d_1_0_Core->PixelStorei(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPixelStoref(GLenum pname, GLfloat param)
+{
+ d_1_0_Core->PixelStoref(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDepthFunc(GLenum func)
+{
+ d_1_0_Core->DepthFunc(func);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ d_1_0_Core->StencilOp(fail, zfail, zpass);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ d_1_0_Core->StencilFunc(func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glLogicOp(GLenum opcode)
+{
+ d_1_0_Core->LogicOp(opcode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ d_1_0_Core->BlendFunc(sfactor, dfactor);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFlush()
+{
+ d_1_0_Core->Flush();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFinish()
+{
+ d_1_0_Core->Finish();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEnable(GLenum cap)
+{
+ d_1_0_Core->Enable(cap);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDisable(GLenum cap)
+{
+ d_1_0_Core->Disable(cap);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDepthMask(GLboolean flag)
+{
+ d_1_0_Core->DepthMask(flag);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ d_1_0_Core->ColorMask(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glStencilMask(GLuint mask)
+{
+ d_1_0_Core->StencilMask(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearDepth(GLdouble depth)
+{
+ d_1_0_Core->ClearDepth(depth);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearStencil(GLint s)
+{
+ d_1_0_Core->ClearStencil(s);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Core->ClearColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClear(GLbitfield mask)
+{
+ d_1_0_Core->Clear(mask);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawBuffer(GLenum buf)
+{
+ d_1_0_Core->DrawBuffer(buf);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage1D(target, level, internalformat, width, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_0_Core->TexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_1_0_Core->TexParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Core->TexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ d_1_0_Core->TexParameterf(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Scissor(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPolygonMode(GLenum face, GLenum mode)
+{
+ d_1_0_Core->PolygonMode(face, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPointSize(GLfloat size)
+{
+ d_1_0_Core->PointSize(size);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glLineWidth(GLfloat width)
+{
+ d_1_0_Core->LineWidth(width);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glHint(GLenum target, GLenum mode)
+{
+ d_1_0_Core->Hint(target, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFrontFace(GLenum mode)
+{
+ d_1_0_Core->FrontFace(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCullFace(GLenum mode)
+{
+ d_1_0_Core->CullFace(mode);
+}
+
+
+// OpenGL 1.1 core functions
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsTexture(GLuint texture)
+{
+ return d_1_1_Core->IsTexture(texture);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenTextures(GLsizei n, GLuint *textures)
+{
+ d_1_1_Core->GenTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ d_1_1_Core->DeleteTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindTexture(GLenum target, GLuint texture)
+{
+ d_1_1_Core->BindTexture(target, texture);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage1D(target, level, xoffset, width, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_1_Core->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ d_1_1_Core->CopyTexSubImage1D(target, level, xoffset, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ d_1_1_Core->CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ d_1_1_Core->CopyTexImage1D(target, level, internalformat, x, y, width, border);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ d_1_1_Core->PolygonOffset(factor, units);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_1_Core->DrawElements(mode, count, type, indices);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ d_1_1_Core->DrawArrays(mode, first, count);
+}
+
+
+// OpenGL 1.2 core functions
+inline void QOpenGLFunctions_4_4_Core::glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_2_Core->BlendColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendEquation(GLenum mode)
+{
+ d_1_2_Core->BlendEquation(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_2_Core->CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_2_Core->DrawRangeElements(mode, start, end, count, type, indices);
+}
+
+
+// OpenGL 1.3 core functions
+inline void QOpenGLFunctions_4_4_Core::glGetCompressedTexImage(GLenum target, GLint level, void *img)
+{
+ d_1_3_Core->GetCompressedTexImage(target, level, img);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage1D(target, level, internalformat, width, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSampleCoverage(GLfloat value, GLboolean invert)
+{
+ d_1_3_Core->SampleCoverage(value, invert);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glActiveTexture(GLenum texture)
+{
+ d_1_3_Core->ActiveTexture(texture);
+}
+
+
+// OpenGL 1.4 core functions
+inline void QOpenGLFunctions_4_4_Core::glPointParameteriv(GLenum pname, const GLint *params)
+{
+ d_1_4_Core->PointParameteriv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPointParameteri(GLenum pname, GLint param)
+{
+ d_1_4_Core->PointParameteri(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPointParameterfv(GLenum pname, const GLfloat *params)
+{
+ d_1_4_Core->PointParameterfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPointParameterf(GLenum pname, GLfloat param)
+{
+ d_1_4_Core->PointParameterf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawElements(mode, count, type, indices, drawcount);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawArrays(mode, first, count, drawcount);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ d_1_4_Core->BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+
+// OpenGL 1.5 core functions
+inline void QOpenGLFunctions_4_4_Core::glGetBufferPointerv(GLenum target, GLenum pname, void * *params)
+{
+ d_1_5_Core->GetBufferPointerv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetBufferParameteriv(target, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glUnmapBuffer(GLenum target)
+{
+ return d_1_5_Core->UnmapBuffer(target);
+}
+
+inline void * QOpenGLFunctions_4_4_Core::glMapBuffer(GLenum target, GLenum access)
+{
+ return d_1_5_Core->MapBuffer(target, access);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
+{
+ d_1_5_Core->GetBufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
+{
+ d_1_5_Core->BufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
+{
+ d_1_5_Core->BufferData(target, size, data, usage);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsBuffer(GLuint buffer)
+{
+ return d_1_5_Core->IsBuffer(buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenBuffers(GLsizei n, GLuint *buffers)
+{
+ d_1_5_Core->GenBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteBuffers(GLsizei n, const GLuint *buffers)
+{
+ d_1_5_Core->DeleteBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindBuffer(GLenum target, GLuint buffer)
+{
+ d_1_5_Core->BindBuffer(target, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+{
+ d_1_5_Core->GetQueryObjectuiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryObjectiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEndQuery(GLenum target)
+{
+ d_1_5_Core->EndQuery(target);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBeginQuery(GLenum target, GLuint id)
+{
+ d_1_5_Core->BeginQuery(target, id);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsQuery(GLuint id)
+{
+ return d_1_5_Core->IsQuery(id);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteQueries(GLsizei n, const GLuint *ids)
+{
+ d_1_5_Core->DeleteQueries(n, ids);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenQueries(GLsizei n, GLuint *ids)
+{
+ d_1_5_Core->GenQueries(n, ids);
+}
+
+
+// OpenGL 2.0 core functions
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer)
+{
+ d_2_0_Core->VertexAttribPointer(index, size, type, normalized, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4usv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4uiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4iv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib4fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4bv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Niv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4Niv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib3sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib3sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib3fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib3fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib3dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib2sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib2sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
+{
+ d_2_0_Core->VertexAttrib2s(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib2fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib2fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
+{
+ d_2_0_Core->VertexAttrib2f(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib2dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_2_0_Core->VertexAttrib2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib1sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib1sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib1s(GLuint index, GLshort x)
+{
+ d_2_0_Core->VertexAttrib1s(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib1fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib1fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib1f(GLuint index, GLfloat x)
+{
+ d_2_0_Core->VertexAttrib1f(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib1dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttrib1d(GLuint index, GLdouble x)
+{
+ d_2_0_Core->VertexAttrib1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glValidateProgram(GLuint program)
+{
+ d_2_0_Core->ValidateProgram(program);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform4iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform3iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform2iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform1iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform4fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform3fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform2fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform1fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_2_0_Core->Uniform4i(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3i(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_2_0_Core->Uniform3i(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2i(GLint location, GLint v0, GLint v1)
+{
+ d_2_0_Core->Uniform2i(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1i(GLint location, GLint v0)
+{
+ d_2_0_Core->Uniform1i(location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_2_0_Core->Uniform4f(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_2_0_Core->Uniform3f(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2f(GLint location, GLfloat v0, GLfloat v1)
+{
+ d_2_0_Core->Uniform2f(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1f(GLint location, GLfloat v0)
+{
+ d_2_0_Core->Uniform1f(location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUseProgram(GLuint program)
+{
+ d_2_0_Core->UseProgram(program);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
+{
+ d_2_0_Core->ShaderSource(shader, count, string, length);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glLinkProgram(GLuint program)
+{
+ d_2_0_Core->LinkProgram(program);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsShader(GLuint shader)
+{
+ return d_2_0_Core->IsShader(shader);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsProgram(GLuint program)
+{
+ return d_2_0_Core->IsProgram(program);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer)
+{
+ d_2_0_Core->GetVertexAttribPointerv(index, pname, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetVertexAttribiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
+{
+ d_2_0_Core->GetVertexAttribfv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_2_0_Core->GetVertexAttribdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetUniformiv(GLuint program, GLint location, GLint *params)
+{
+ d_2_0_Core->GetUniformiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetUniformfv(GLuint program, GLint location, GLfloat *params)
+{
+ d_2_0_Core->GetUniformfv(program, location, params);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetUniformLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetUniformLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
+{
+ d_2_0_Core->GetShaderSource(shader, bufSize, length, source);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetShaderInfoLog(shader, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetShaderiv(shader, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetProgramInfoLog(program, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetProgramiv(program, pname, params);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetAttribLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetAttribLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
+{
+ d_2_0_Core->GetAttachedShaders(program, maxCount, count, shaders);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveUniform(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveAttrib(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEnableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->EnableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDisableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->DisableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDetachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->DetachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteShader(GLuint shader)
+{
+ d_2_0_Core->DeleteShader(shader);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteProgram(GLuint program)
+{
+ d_2_0_Core->DeleteProgram(program);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glCreateShader(GLenum type)
+{
+ return d_2_0_Core->CreateShader(type);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glCreateProgram()
+{
+ return d_2_0_Core->CreateProgram();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCompileShader(GLuint shader)
+{
+ d_2_0_Core->CompileShader(shader);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
+{
+ d_2_0_Core->BindAttribLocation(program, index, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glAttachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->AttachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ d_2_0_Core->StencilMaskSeparate(face, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ d_2_0_Core->StencilFuncSeparate(face, func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
+{
+ d_2_0_Core->StencilOpSeparate(face, sfail, dpfail, dppass);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawBuffers(GLsizei n, const GLenum *bufs)
+{
+ d_2_0_Core->DrawBuffers(n, bufs);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+{
+ d_2_0_Core->BlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+
+// OpenGL 2.1 core functions
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x3fv(location, count, transpose, value);
+}
+
+
+// OpenGL 3.0 core functions
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsVertexArray(GLuint array)
+{
+ return d_3_0_Core->IsVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenVertexArrays(GLsizei n, GLuint *arrays)
+{
+ d_3_0_Core->GenVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+{
+ d_3_0_Core->DeleteVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindVertexArray(GLuint array)
+{
+ d_3_0_Core->BindVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ d_3_0_Core->FlushMappedBufferRange(target, offset, length);
+}
+
+inline void * QOpenGLFunctions_4_4_Core::glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ return d_3_0_Core->MapBufferRange(target, offset, length, access);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ d_3_0_Core->FramebufferTextureLayer(target, attachment, texture, level, layer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ d_3_0_Core->BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenerateMipmap(GLenum target)
+{
+ d_3_0_Core->GenerateMipmap(target);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ d_3_0_Core->FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ d_3_0_Core->FramebufferTexture3D(target, attachment, textarget, texture, level, zoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture2D(target, attachment, textarget, texture, level);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture1D(target, attachment, textarget, texture, level);
+}
+
+inline GLenum QOpenGLFunctions_4_4_Core::glCheckFramebufferStatus(GLenum target)
+{
+ return d_3_0_Core->CheckFramebufferStatus(target);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ d_3_0_Core->GenFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
+{
+ d_3_0_Core->DeleteFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+ d_3_0_Core->BindFramebuffer(target, framebuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsFramebuffer(GLuint framebuffer)
+{
+ return d_3_0_Core->IsFramebuffer(framebuffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetRenderbufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorage(target, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ d_3_0_Core->GenRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
+{
+ d_3_0_Core->DeleteRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+ d_3_0_Core->BindRenderbuffer(target, renderbuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsRenderbuffer(GLuint renderbuffer)
+{
+ return d_3_0_Core->IsRenderbuffer(renderbuffer);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_4_Core::glGetStringi(GLenum name, GLuint index)
+{
+ return d_3_0_Core->GetStringi(name, index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+{
+ d_3_0_Core->ClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ d_3_0_Core->ClearBufferfv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ d_3_0_Core->ClearBufferuiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ d_3_0_Core->ClearBufferiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetTexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetTexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ d_3_0_Core->TexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_3_0_Core->TexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform4uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform3uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform2uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform1uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_3_0_Core->Uniform4ui(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_3_0_Core->Uniform3ui(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+ d_3_0_Core->Uniform2ui(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1ui(GLint location, GLuint v0)
+{
+ d_3_0_Core->Uniform1ui(location, v0);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetFragDataLocation(GLuint program, const GLchar *name)
+{
+ return d_3_0_Core->GetFragDataLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name)
+{
+ d_3_0_Core->BindFragDataLocation(program, color, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+{
+ d_3_0_Core->GetUniformuiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4usv(GLuint index, const GLushort *v)
+{
+ d_3_0_Core->VertexAttribI4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
+{
+ d_3_0_Core->VertexAttribI4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4sv(GLuint index, const GLshort *v)
+{
+ d_3_0_Core->VertexAttribI4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4bv(GLuint index, const GLbyte *v)
+{
+ d_3_0_Core->VertexAttribI4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI3uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI3uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI2uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI2uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI1uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI1uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI3iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI3iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI2iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI2iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI1iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI1iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
+{
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI1ui(GLuint index, GLuint x)
+{
+ d_3_0_Core->VertexAttribI1ui(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
+{
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI2i(GLuint index, GLint x, GLint y)
+{
+ d_3_0_Core->VertexAttribI2i(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribI1i(GLuint index, GLint x)
+{
+ d_3_0_Core->VertexAttribI1i(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetVertexAttribIuiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetVertexAttribIiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_3_0_Core->VertexAttribIPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEndConditionalRender()
+{
+ d_3_0_Core->EndConditionalRender();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBeginConditionalRender(GLuint id, GLenum mode)
+{
+ d_3_0_Core->BeginConditionalRender(id, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClampColor(GLenum target, GLenum clamp)
+{
+ d_3_0_Core->ClampColor(target, clamp);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ d_3_0_Core->GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const *varyings, GLenum bufferMode)
+{
+ d_3_0_Core->TransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+ d_3_0_Core->BindBufferBase(target, index, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_3_0_Core->BindBufferRange(target, index, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEndTransformFeedback()
+{
+ d_3_0_Core->EndTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBeginTransformFeedback(GLenum primitiveMode)
+{
+ d_3_0_Core->BeginTransformFeedback(primitiveMode);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsEnabledi(GLenum target, GLuint index)
+{
+ return d_3_0_Core->IsEnabledi(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDisablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Disablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEnablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Enablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
+{
+ d_3_0_Core->GetIntegeri_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetBooleani_v(GLenum target, GLuint index, GLboolean *data)
+{
+ d_3_0_Core->GetBooleani_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ d_3_0_Core->ColorMaski(index, r, g, b, a);
+}
+
+
+// OpenGL 3.1 core functions
+inline void QOpenGLFunctions_4_4_Core::glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+ d_3_1_Core->UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+{
+ d_3_1_Core->GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+{
+ return d_3_1_Core->GetUniformBlockIndex(program, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)
+{
+ d_3_1_Core->GetActiveUniformName(program, uniformIndex, bufSize, length, uniformName);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices)
+{
+ d_3_1_Core->GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ d_3_1_Core->CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPrimitiveRestartIndex(GLuint index)
+{
+ d_3_1_Core->PrimitiveRestartIndex(index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
+{
+ d_3_1_Core->TexBuffer(target, internalformat, buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount)
+{
+ d_3_1_Core->DrawElementsInstanced(mode, count, type, indices, instancecount);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
+{
+ d_3_1_Core->DrawArraysInstanced(mode, first, count, instancecount);
+}
+
+
+// OpenGL 3.2 core functions
+inline void QOpenGLFunctions_4_4_Core::glSampleMaski(GLuint maskNumber, GLbitfield mask)
+{
+ d_3_2_Core->SampleMaski(maskNumber, mask);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
+{
+ d_3_2_Core->GetMultisamplefv(pname, index, val);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ d_3_2_Core->FramebufferTexture(target, attachment, texture, level);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+ d_3_2_Core->GetBufferParameteri64v(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64i_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ d_3_2_Core->GetSynciv(sync, pname, bufSize, length, values);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetInteger64v(GLenum pname, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64v(pname, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ d_3_2_Core->WaitSync(sync, flags, timeout);
+}
+
+inline GLenum QOpenGLFunctions_4_4_Core::glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ return d_3_2_Core->ClientWaitSync(sync, flags, timeout);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteSync(GLsync sync)
+{
+ d_3_2_Core->DeleteSync(sync);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsSync(GLsync sync)
+{
+ return d_3_2_Core->IsSync(sync);
+}
+
+inline GLsync QOpenGLFunctions_4_4_Core::glFenceSync(GLenum condition, GLbitfield flags)
+{
+ return d_3_2_Core->FenceSync(condition, flags);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProvokingVertex(GLenum mode)
+{
+ d_3_2_Core->ProvokingVertex(mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex)
+{
+ d_3_2_Core->MultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsBaseVertex(mode, count, type, indices, basevertex);
+}
+
+
+// OpenGL 3.3 core functions
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP4uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP4ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP3uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP3ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP2uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP2ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP1uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP1ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ d_3_3_Core->VertexAttribDivisor(index, divisor);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
+{
+ d_3_3_Core->GetQueryObjectui64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
+{
+ d_3_3_Core->GetQueryObjecti64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glQueryCounter(GLuint id, GLenum target)
+{
+ d_3_3_Core->QueryCounter(id, target);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
+{
+ d_3_3_Core->GetSamplerParameterIuiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+{
+ d_3_3_Core->GetSamplerParameterfv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameterIiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameteriv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param)
+{
+ d_3_3_Core->SamplerParameterIuiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameterIiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+{
+ d_3_3_Core->SamplerParameterfv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+ d_3_3_Core->SamplerParameterf(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameteriv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+ d_3_3_Core->SamplerParameteri(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindSampler(GLuint unit, GLuint sampler)
+{
+ d_3_3_Core->BindSampler(unit, sampler);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsSampler(GLuint sampler)
+{
+ return d_3_3_Core->IsSampler(sampler);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteSamplers(GLsizei count, const GLuint *samplers)
+{
+ d_3_3_Core->DeleteSamplers(count, samplers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenSamplers(GLsizei count, GLuint *samplers)
+{
+ d_3_3_Core->GenSamplers(count, samplers);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetFragDataIndex(GLuint program, const GLchar *name)
+{
+ return d_3_3_Core->GetFragDataIndex(program, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)
+{
+ d_3_3_Core->BindFragDataLocationIndexed(program, colorNumber, index, name);
+}
+
+
+// OpenGL 4.0 core functions
+inline void QOpenGLFunctions_4_4_Core::glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params)
+{
+ d_4_0_Core->GetQueryIndexediv(target, index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glEndQueryIndexed(GLenum target, GLuint index)
+{
+ d_4_0_Core->EndQueryIndexed(target, index);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBeginQueryIndexed(GLenum target, GLuint index, GLuint id)
+{
+ d_4_0_Core->BeginQueryIndexed(target, index, id);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream)
+{
+ d_4_0_Core->DrawTransformFeedbackStream(mode, id, stream);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawTransformFeedback(GLenum mode, GLuint id)
+{
+ d_4_0_Core->DrawTransformFeedback(mode, id);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glResumeTransformFeedback()
+{
+ d_4_0_Core->ResumeTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPauseTransformFeedback()
+{
+ d_4_0_Core->PauseTransformFeedback();
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsTransformFeedback(GLuint id)
+{
+ return d_4_0_Core->IsTransformFeedback(id);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ d_4_0_Core->GenTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+ d_4_0_Core->DeleteTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindTransformFeedback(GLenum target, GLuint id)
+{
+ d_4_0_Core->BindTransformFeedback(target, id);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPatchParameterfv(GLenum pname, const GLfloat *values)
+{
+ d_4_0_Core->PatchParameterfv(pname, values);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPatchParameteri(GLenum pname, GLint value)
+{
+ d_4_0_Core->PatchParameteri(pname, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetProgramStageiv(program, shadertype, pname, values);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params)
+{
+ d_4_0_Core->GetUniformSubroutineuiv(shadertype, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices)
+{
+ d_4_0_Core->UniformSubroutinesuiv(shadertype, count, indices);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetActiveSubroutineUniformiv(program, shadertype, index, pname, values);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineIndex(program, shadertype, name);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineUniformLocation(program, shadertype, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetUniformdv(GLuint program, GLint location, GLdouble *params)
+{
+ d_4_0_Core->GetUniformdv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform4dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform3dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform2dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform1dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_0_Core->Uniform4d(location, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_0_Core->Uniform3d(location, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform2d(GLint location, GLdouble x, GLdouble y)
+{
+ d_4_0_Core->Uniform2d(location, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUniform1d(GLint location, GLdouble x)
+{
+ d_4_0_Core->Uniform1d(location, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
+{
+ d_4_0_Core->DrawElementsIndirect(mode, type, indirect);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawArraysIndirect(GLenum mode, const void *indirect)
+{
+ d_4_0_Core->DrawArraysIndirect(mode, indirect);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+{
+ d_4_0_Core->BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendFunci(GLuint buf, GLenum src, GLenum dst)
+{
+ d_4_0_Core->BlendFunci(buf, src, dst);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
+{
+ d_4_0_Core->BlendEquationSeparatei(buf, modeRGB, modeAlpha);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBlendEquationi(GLuint buf, GLenum mode)
+{
+ d_4_0_Core->BlendEquationi(buf, mode);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMinSampleShading(GLfloat value)
+{
+ d_4_0_Core->MinSampleShading(value);
+}
+
+
+// OpenGL 4.1 core functions
+inline void QOpenGLFunctions_4_4_Core::glGetDoublei_v(GLenum target, GLuint index, GLdouble *data)
+{
+ d_4_1_Core->GetDoublei_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetFloati_v(GLenum target, GLuint index, GLfloat *data)
+{
+ d_4_1_Core->GetFloati_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f)
+{
+ d_4_1_Core->DepthRangeIndexed(index, n, f);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v)
+{
+ d_4_1_Core->DepthRangeArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glScissorIndexedv(GLuint index, const GLint *v)
+{
+ d_4_1_Core->ScissorIndexedv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)
+{
+ d_4_1_Core->ScissorIndexed(index, left, bottom, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glScissorArrayv(GLuint first, GLsizei count, const GLint *v)
+{
+ d_4_1_Core->ScissorArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glViewportIndexedfv(GLuint index, const GLfloat *v)
+{
+ d_4_1_Core->ViewportIndexedfv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+{
+ d_4_1_Core->ViewportIndexedf(index, x, y, w, h);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
+{
+ d_4_1_Core->ViewportArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_4_1_Core->GetVertexAttribLdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_4_1_Core->VertexAttribLPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL4dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL3dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL2dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL1dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_1_Core->VertexAttribL4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_1_Core->VertexAttribL3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_4_1_Core->VertexAttribL2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribL1d(GLuint index, GLdouble x)
+{
+ d_4_1_Core->VertexAttribL1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_4_1_Core->GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glValidateProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->ValidateProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform4uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_4_1_Core->ProgramUniform4ui(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform4dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)
+{
+ d_4_1_Core->ProgramUniform4d(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform4fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_4_1_Core->ProgramUniform4f(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform4iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_4_1_Core->ProgramUniform4i(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform3uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_4_1_Core->ProgramUniform3ui(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform3dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)
+{
+ d_4_1_Core->ProgramUniform3d(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform3fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_4_1_Core->ProgramUniform3f(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform3iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_4_1_Core->ProgramUniform3i(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform2uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
+{
+ d_4_1_Core->ProgramUniform2ui(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform2dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1)
+{
+ d_4_1_Core->ProgramUniform2d(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform2fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
+{
+ d_4_1_Core->ProgramUniform2f(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform2iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
+{
+ d_4_1_Core->ProgramUniform2i(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform1uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
+{
+ d_4_1_Core->ProgramUniform1ui(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform1dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1d(GLuint program, GLint location, GLdouble v0)
+{
+ d_4_1_Core->ProgramUniform1d(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform1fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1f(GLuint program, GLint location, GLfloat v0)
+{
+ d_4_1_Core->ProgramUniform1f(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform1iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramUniform1i(GLuint program, GLint location, GLint v0)
+{
+ d_4_1_Core->ProgramUniform1i(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
+{
+ d_4_1_Core->GetProgramPipelineiv(pipeline, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_4_Core::glIsProgramPipeline(GLuint pipeline)
+{
+ return d_4_1_Core->IsProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGenProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ d_4_1_Core->GenProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
+{
+ d_4_1_Core->DeleteProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->BindProgramPipeline(pipeline);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
+{
+ return d_4_1_Core->CreateShaderProgramv(type, count, strings);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glActiveShaderProgram(GLuint pipeline, GLuint program)
+{
+ d_4_1_Core->ActiveShaderProgram(pipeline, program);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+{
+ d_4_1_Core->UseProgramStages(pipeline, stages, program);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+ d_4_1_Core->ProgramParameteri(program, pname, value);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ProgramBinary(program, binaryFormat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
+{
+ d_4_1_Core->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearDepthf(GLfloat dd)
+{
+ d_4_1_Core->ClearDepthf(dd);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDepthRangef(GLfloat n, GLfloat f)
+{
+ d_4_1_Core->DepthRangef(n, f);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ d_4_1_Core->GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ShaderBinary(count, shaders, binaryformat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glReleaseShaderCompiler()
+{
+ d_4_1_Core->ReleaseShaderCompiler();
+}
+
+
+// OpenGL 4.2 core functions
+inline void QOpenGLFunctions_4_4_Core::glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackStreamInstanced(mode, id, stream, instancecount);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackInstanced(mode, id, instancecount);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_2_Core->TexStorage3D(target, levels, internalformat, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_2_Core->TexStorage2D(target, levels, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
+{
+ d_4_2_Core->TexStorage1D(target, levels, internalformat, width);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMemoryBarrier(GLbitfield barriers)
+{
+ d_4_2_Core->MemoryBarrier(barriers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
+{
+ d_4_2_Core->BindImageTexture(unit, texture, level, layered, layer, access, format);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)
+{
+ d_4_2_Core->GetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
+{
+ d_4_2_Core->GetInternalformativ(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, instancecount, basevertex, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseInstance(mode, count, type, indices, instancecount, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance);
+}
+
+
+// OpenGL 4.3 core functions
+inline void QOpenGLFunctions_4_4_Core::glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectPtrLabel(ptr, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectPtrLabel(ptr, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectLabel(identifier, name, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectLabel(identifier, name, length, label);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPopDebugGroup()
+{
+ d_4_3_Core->PopDebugGroup();
+}
+
+inline void QOpenGLFunctions_4_4_Core::glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message)
+{
+ d_4_3_Core->PushDebugGroup(source, id, length, message);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
+{
+ return d_4_3_Core->GetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, messageLog);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
+{
+ d_4_3_Core->DebugMessageCallback(callback, userParam);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
+{
+ d_4_3_Core->DebugMessageInsert(source, type, id, severity, length, buf);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
+{
+ d_4_3_Core->DebugMessageControl(source, type, severity, count, ids, enabled);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexBindingDivisor(GLuint bindingindex, GLuint divisor)
+{
+ d_4_3_Core->VertexBindingDivisor(bindingindex, divisor);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribBinding(GLuint attribindex, GLuint bindingindex)
+{
+ d_4_3_Core->VertexAttribBinding(attribindex, bindingindex);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribLFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribIFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+{
+ d_4_3_Core->BindVertexBuffer(bindingindex, buffer, offset, stride);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
+{
+ d_4_3_Core->TextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_4_3_Core->TexBufferRange(target, internalformat, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)
+{
+ d_4_3_Core->ShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocationIndex(program, programInterface, name);
+}
+
+inline GLint QOpenGLFunctions_4_4_Core::glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocation(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)
+{
+ d_4_3_Core->GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
+{
+ d_4_3_Core->GetProgramResourceName(program, programInterface, index, bufSize, length, name);
+}
+
+inline GLuint QOpenGLFunctions_4_4_Core::glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceIndex(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetProgramInterfaceiv(program, programInterface, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawElementsIndirect(mode, type, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawArraysIndirect(mode, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_3_Core->InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ d_4_3_Core->InvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glInvalidateBufferData(GLuint buffer)
+{
+ d_4_3_Core->InvalidateBufferData(buffer);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
+{
+ d_4_3_Core->InvalidateBufferSubData(buffer, offset, length);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glInvalidateTexImage(GLuint texture, GLint level)
+{
+ d_4_3_Core->InvalidateTexImage(texture, level);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_3_Core->InvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)
+{
+ d_4_3_Core->GetInternalformati64v(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetFramebufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_4_3_Core->FramebufferParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
+{
+ d_4_3_Core->CopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDispatchComputeIndirect(GLintptr indirect)
+{
+ d_4_3_Core->DispatchComputeIndirect(indirect);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
+{
+ d_4_3_Core->DispatchCompute(num_groups_x, num_groups_y, num_groups_z);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferSubData(target, internalformat, offset, size, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferData(target, internalformat, format, type, data);
+}
+
+
+// OpenGL 4.4 core functions
+inline void QOpenGLFunctions_4_4_Core::glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
+{
+ d_4_4_Core->BindVertexBuffers(first, count, buffers, offsets, strides);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindImageTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
+{
+ d_4_4_Core->BindSamplers(first, count, samplers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)
+{
+ d_4_4_Core->BindBuffersRange(target, first, count, buffers, offsets, sizes);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers)
+{
+ d_4_4_Core->BindBuffersBase(target, first, count, buffers);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexImage(texture, level, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_4_Core::glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)
+{
+ d_4_4_Core->BufferStorage(target, size, data, flags);
+}
+
+
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+
+#endif
diff --git a/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp
new file mode 100644
index 0000000000..5c2d987085
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp
@@ -0,0 +1,438 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#include "qopenglfunctions_4_5_compatibility.h"
+#include "qopenglcontext.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QOpenGLFunctions_4_5_Compatibility
+ \inmodule QtGui
+ \since 5.5
+ \wrapper
+ \brief The QOpenGLFunctions_4_5_Compatibility class provides all functions for OpenGL 4.5 compatibility profile.
+
+ This class is a wrapper for functions from OpenGL 4.5 compatibility profile.
+ See reference pages on \l {http://www.opengl.org/sdk/docs/}{opengl.org}
+ for function documentation.
+
+ \sa QAbstractOpenGLFunctions
+*/
+
+QOpenGLFunctions_4_5_Compatibility::QOpenGLFunctions_4_5_Compatibility()
+ : QAbstractOpenGLFunctions()
+ , d_1_0_Core(0)
+ , d_1_1_Core(0)
+ , d_1_2_Core(0)
+ , d_1_3_Core(0)
+ , d_1_4_Core(0)
+ , d_1_5_Core(0)
+ , d_2_0_Core(0)
+ , d_2_1_Core(0)
+ , d_3_0_Core(0)
+ , d_3_1_Core(0)
+ , d_3_2_Core(0)
+ , d_3_3_Core(0)
+ , d_4_0_Core(0)
+ , d_4_1_Core(0)
+ , d_4_2_Core(0)
+ , d_4_3_Core(0)
+ , d_4_4_Core(0)
+ , d_4_5_Core(0)
+ , d_1_0_Deprecated(0)
+ , d_1_1_Deprecated(0)
+ , d_1_2_Deprecated(0)
+ , d_1_3_Deprecated(0)
+ , d_1_4_Deprecated(0)
+ , d_3_3_Deprecated(0)
+ , d_4_5_Deprecated(0)
+{
+}
+
+QOpenGLFunctions_4_5_Compatibility::~QOpenGLFunctions_4_5_Compatibility()
+{
+ if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ delete d_1_0_Core;
+ }
+ if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ delete d_1_1_Core;
+ }
+ if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ delete d_1_2_Core;
+ }
+ if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ delete d_1_3_Core;
+ }
+ if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ delete d_1_4_Core;
+ }
+ if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ delete d_1_5_Core;
+ }
+ if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ delete d_2_0_Core;
+ }
+ if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ delete d_2_1_Core;
+ }
+ if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ delete d_3_0_Core;
+ }
+ if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ delete d_3_1_Core;
+ }
+ if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ delete d_3_2_Core;
+ }
+ if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ delete d_3_3_Core;
+ }
+ if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ delete d_4_0_Core;
+ }
+ if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ delete d_4_1_Core;
+ }
+ if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ delete d_4_2_Core;
+ }
+ if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ delete d_4_3_Core;
+ }
+ if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ delete d_4_4_Core;
+ }
+ if (d_4_5_Core && !d_4_5_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_5_Core->context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
+ delete d_4_5_Core;
+ }
+ if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
+ delete d_1_0_Deprecated;
+ }
+ if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
+ delete d_1_1_Deprecated;
+ }
+ if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
+ delete d_1_2_Deprecated;
+ }
+ if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
+ delete d_1_3_Deprecated;
+ }
+ if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
+ delete d_1_4_Deprecated;
+ }
+ if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ delete d_3_3_Deprecated;
+ }
+ if (d_4_5_Deprecated && !d_4_5_Deprecated->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_5_Deprecated->context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus());
+ delete d_4_5_Deprecated;
+ }
+}
+
+bool QOpenGLFunctions_4_5_Compatibility::initializeOpenGLFunctions()
+{
+ if ( isInitialized() )
+ return true;
+
+ QOpenGLContext* context = QOpenGLContext::currentContext();
+
+ // If owned by a context object make sure it is current.
+ // Also check that current context is capable of resolving all needed functions
+ if (((owningContext() && owningContext() == context) || !owningContext())
+ && QOpenGLFunctions_4_5_Compatibility::isContextCompatible(context))
+ {
+ // Associate with private implementation, creating if necessary
+ // Function pointers in the backends are resolved at creation time
+ QOpenGLVersionFunctionsBackend* d = 0;
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
+ }
+ d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
+ }
+ d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
+ }
+ d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
+ }
+ d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
+ }
+ d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_5_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
+ }
+ d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
+ }
+ d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
+ }
+ d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
+ }
+ d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
+ }
+ d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
+ }
+ d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
+ }
+ d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
+ }
+ d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
+ }
+ d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
+ }
+ d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
+ }
+ d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
+ }
+ d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_5_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus(), d);
+ }
+ d_4_5_Core = static_cast<QOpenGLFunctions_4_5_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
+ }
+ d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
+ }
+ d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_5_DeprecatedBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus(), d);
+ }
+ d_4_5_Deprecated = static_cast<QOpenGLFunctions_4_5_DeprecatedBackend*>(d);
+ d->refs.ref();
+
+ QAbstractOpenGLFunctions::initializeOpenGLFunctions();
+ }
+ return isInitialized();
+}
+
+bool QOpenGLFunctions_4_5_Compatibility::isContextCompatible(QOpenGLContext *context)
+{
+ Q_ASSERT(context);
+ QSurfaceFormat f = context->format();
+ const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
+ if (v < qMakePair(4, 5))
+ return false;
+
+ if (f.profile() == QSurfaceFormat::CoreProfile)
+ return false;
+
+ return true;
+}
+
+QOpenGLVersionProfile QOpenGLFunctions_4_5_Compatibility::versionProfile()
+{
+ QOpenGLVersionProfile v;
+ v.setVersion(4, 5);
+ v.setProfile(QSurfaceFormat::CompatibilityProfile);
+ return v;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions_4_5_compatibility.h b/src/gui/opengl/qopenglfunctions_4_5_compatibility.h
new file mode 100644
index 0000000000..5540cf6433
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_5_compatibility.h
@@ -0,0 +1,6677 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#ifndef QOPENGLVERSIONFUNCTIONS_4_5_COMPATIBILITY_H
+#define QOPENGLVERSIONFUNCTIONS_4_5_COMPATIBILITY_H
+
+#include <QtCore/qglobal.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+
+#include <QtGui/QOpenGLVersionFunctions>
+#include <QtGui/qopenglcontext.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QOpenGLFunctions_4_5_Compatibility : public QAbstractOpenGLFunctions
+{
+public:
+ QOpenGLFunctions_4_5_Compatibility();
+ ~QOpenGLFunctions_4_5_Compatibility();
+
+ bool initializeOpenGLFunctions() Q_DECL_OVERRIDE;
+
+ // OpenGL 1.0 core functions
+ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glDepthRange(GLdouble nearVal, GLdouble farVal);
+ GLboolean glIsEnabled(GLenum cap);
+ void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
+ void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
+ void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+ const GLubyte * glGetString(GLenum name);
+ void glGetIntegerv(GLenum pname, GLint *data);
+ void glGetFloatv(GLenum pname, GLfloat *data);
+ GLenum glGetError();
+ void glGetDoublev(GLenum pname, GLdouble *data);
+ void glGetBooleanv(GLenum pname, GLboolean *data);
+ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+ void glReadBuffer(GLenum src);
+ void glPixelStorei(GLenum pname, GLint param);
+ void glPixelStoref(GLenum pname, GLfloat param);
+ void glDepthFunc(GLenum func);
+ void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+ void glStencilFunc(GLenum func, GLint ref, GLuint mask);
+ void glLogicOp(GLenum opcode);
+ void glBlendFunc(GLenum sfactor, GLenum dfactor);
+ void glFlush();
+ void glFinish();
+ void glEnable(GLenum cap);
+ void glDisable(GLenum cap);
+ void glDepthMask(GLboolean flag);
+ void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void glStencilMask(GLuint mask);
+ void glClearDepth(GLdouble depth);
+ void glClearStencil(GLint s);
+ void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glClear(GLbitfield mask);
+ void glDrawBuffer(GLenum buf);
+ void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glTexParameteri(GLenum target, GLenum pname, GLint param);
+ void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glPolygonMode(GLenum face, GLenum mode);
+ void glPointSize(GLfloat size);
+ void glLineWidth(GLfloat width);
+ void glHint(GLenum target, GLenum mode);
+ void glFrontFace(GLenum mode);
+ void glCullFace(GLenum mode);
+
+ // OpenGL 1.1 core functions
+ GLboolean glIsTexture(GLuint texture);
+ void glGenTextures(GLsizei n, GLuint *textures);
+ void glDeleteTextures(GLsizei n, const GLuint *textures);
+ void glBindTexture(GLenum target, GLuint texture);
+ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+ void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+ void glPolygonOffset(GLfloat factor, GLfloat units);
+ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
+ void glDrawArrays(GLenum mode, GLint first, GLsizei count);
+
+ // OpenGL 1.2 core functions
+ void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glBlendEquation(GLenum mode);
+ void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+
+ // OpenGL 1.3 core functions
+ void glGetCompressedTexImage(GLenum target, GLint level, void *img);
+ void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+ void glSampleCoverage(GLfloat value, GLboolean invert);
+ void glActiveTexture(GLenum texture);
+
+ // OpenGL 1.4 core functions
+ void glPointParameteriv(GLenum pname, const GLint *params);
+ void glPointParameteri(GLenum pname, GLint param);
+ void glPointParameterfv(GLenum pname, const GLfloat *params);
+ void glPointParameterf(GLenum pname, GLfloat param);
+ void glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount);
+ void glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+ void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+
+ // OpenGL 1.5 core functions
+ void glGetBufferPointerv(GLenum target, GLenum pname, void * *params);
+ void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ GLboolean glUnmapBuffer(GLenum target);
+ void * glMapBuffer(GLenum target, GLenum access);
+ void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data);
+ void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+ void glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+ GLboolean glIsBuffer(GLuint buffer);
+ void glGenBuffers(GLsizei n, GLuint *buffers);
+ void glDeleteBuffers(GLsizei n, const GLuint *buffers);
+ void glBindBuffer(GLenum target, GLuint buffer);
+ void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
+ void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params);
+ void glGetQueryiv(GLenum target, GLenum pname, GLint *params);
+ void glEndQuery(GLenum target);
+ void glBeginQuery(GLenum target, GLuint id);
+ GLboolean glIsQuery(GLuint id);
+ void glDeleteQueries(GLsizei n, const GLuint *ids);
+ void glGenQueries(GLsizei n, GLuint *ids);
+
+ // OpenGL 2.0 core functions
+ void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+ void glVertexAttrib4usv(GLuint index, const GLushort *v);
+ void glVertexAttrib4uiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4sv(GLuint index, const GLshort *v);
+ void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+ void glVertexAttrib4iv(GLuint index, const GLint *v);
+ void glVertexAttrib4fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glVertexAttrib4dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttrib4bv(GLuint index, const GLbyte *v);
+ void glVertexAttrib4Nusv(GLuint index, const GLushort *v);
+ void glVertexAttrib4Nuiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4Nubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+ void glVertexAttrib4Nsv(GLuint index, const GLshort *v);
+ void glVertexAttrib4Niv(GLuint index, const GLint *v);
+ void glVertexAttrib4Nbv(GLuint index, const GLbyte *v);
+ void glVertexAttrib3sv(GLuint index, const GLshort *v);
+ void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z);
+ void glVertexAttrib3fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+ void glVertexAttrib3dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttrib2sv(GLuint index, const GLshort *v);
+ void glVertexAttrib2s(GLuint index, GLshort x, GLshort y);
+ void glVertexAttrib2fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+ void glVertexAttrib2dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttrib1sv(GLuint index, const GLshort *v);
+ void glVertexAttrib1s(GLuint index, GLshort x);
+ void glVertexAttrib1fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib1f(GLuint index, GLfloat x);
+ void glVertexAttrib1dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib1d(GLuint index, GLdouble x);
+ void glValidateProgram(GLuint program);
+ void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniform4iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform3iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform2iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform1iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform4fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform3fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform2fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform1fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+ void glUniform2i(GLint location, GLint v0, GLint v1);
+ void glUniform1i(GLint location, GLint v0);
+ void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glUniform2f(GLint location, GLfloat v0, GLfloat v1);
+ void glUniform1f(GLint location, GLfloat v0);
+ void glUseProgram(GLuint program);
+ void glShaderSource(GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
+ void glLinkProgram(GLuint program);
+ GLboolean glIsShader(GLuint shader);
+ GLboolean glIsProgram(GLuint program);
+ void glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer);
+ void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params);
+ void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params);
+ void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params);
+ void glGetUniformiv(GLuint program, GLint location, GLint *params);
+ void glGetUniformfv(GLuint program, GLint location, GLfloat *params);
+ GLint glGetUniformLocation(GLuint program, const GLchar *name);
+ void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+ void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
+ void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetProgramiv(GLuint program, GLenum pname, GLint *params);
+ GLint glGetAttribLocation(GLuint program, const GLchar *name);
+ void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+ void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glEnableVertexAttribArray(GLuint index);
+ void glDisableVertexAttribArray(GLuint index);
+ void glDetachShader(GLuint program, GLuint shader);
+ void glDeleteShader(GLuint shader);
+ void glDeleteProgram(GLuint program);
+ GLuint glCreateShader(GLenum type);
+ GLuint glCreateProgram();
+ void glCompileShader(GLuint shader);
+ void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name);
+ void glAttachShader(GLuint program, GLuint shader);
+ void glStencilMaskSeparate(GLenum face, GLuint mask);
+ void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+ void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+ void glDrawBuffers(GLsizei n, const GLenum *bufs);
+ void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+
+ // OpenGL 2.1 core functions
+ void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+
+ // OpenGL 3.0 core functions
+ GLboolean glIsVertexArray(GLuint array);
+ void glGenVertexArrays(GLsizei n, GLuint *arrays);
+ void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
+ void glBindVertexArray(GLuint array);
+ void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
+ void * glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+ void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void glGenerateMipmap(GLenum target);
+ void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+ void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+ void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ GLenum glCheckFramebufferStatus(GLenum target);
+ void glGenFramebuffers(GLsizei n, GLuint *framebuffers);
+ void glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
+ void glBindFramebuffer(GLenum target, GLuint framebuffer);
+ GLboolean glIsFramebuffer(GLuint framebuffer);
+ void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+ void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
+ void glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
+ void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+ GLboolean glIsRenderbuffer(GLuint renderbuffer);
+ const GLubyte * glGetStringi(GLenum name, GLuint index);
+ void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+ void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
+ void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params);
+ void glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params);
+ void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);
+ void glTexParameterIiv(GLenum target, GLenum pname, const GLint *params);
+ void glUniform4uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform3uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform2uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform1uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glUniform2ui(GLint location, GLuint v0, GLuint v1);
+ void glUniform1ui(GLint location, GLuint v0);
+ GLint glGetFragDataLocation(GLuint program, const GLchar *name);
+ void glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name);
+ void glGetUniformuiv(GLuint program, GLint location, GLuint *params);
+ void glVertexAttribI4usv(GLuint index, const GLushort *v);
+ void glVertexAttribI4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttribI4sv(GLuint index, const GLshort *v);
+ void glVertexAttribI4bv(GLuint index, const GLbyte *v);
+ void glVertexAttribI4uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI3uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI2uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI1uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI4iv(GLuint index, const GLint *v);
+ void glVertexAttribI3iv(GLuint index, const GLint *v);
+ void glVertexAttribI2iv(GLuint index, const GLint *v);
+ void glVertexAttribI1iv(GLuint index, const GLint *v);
+ void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z);
+ void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y);
+ void glVertexAttribI1ui(GLuint index, GLuint x);
+ void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z);
+ void glVertexAttribI2i(GLuint index, GLint x, GLint y);
+ void glVertexAttribI1i(GLuint index, GLint x);
+ void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
+ void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
+ void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glEndConditionalRender();
+ void glBeginConditionalRender(GLuint id, GLenum mode);
+ void glClampColor(GLenum target, GLenum clamp);
+ void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+ void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
+ void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
+ void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glEndTransformFeedback();
+ void glBeginTransformFeedback(GLenum primitiveMode);
+ GLboolean glIsEnabledi(GLenum target, GLuint index);
+ void glDisablei(GLenum target, GLuint index);
+ void glEnablei(GLenum target, GLuint index);
+ void glGetIntegeri_v(GLenum target, GLuint index, GLint *data);
+ void glGetBooleani_v(GLenum target, GLuint index, GLboolean *data);
+ void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+
+ // OpenGL 3.1 core functions
+ void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+ void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+ void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+ GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
+ void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+ void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+ void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices);
+ void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+ void glPrimitiveRestartIndex(GLuint index);
+ void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer);
+ void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+ void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+
+ // OpenGL 3.2 core functions
+ void glSampleMaski(GLuint maskNumber, GLbitfield mask);
+ void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
+ void glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);
+ void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
+ void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
+ void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+ void glGetInteger64v(GLenum pname, GLint64 *data);
+ void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ void glDeleteSync(GLsync sync);
+ GLboolean glIsSync(GLsync sync);
+ GLsync glFenceSync(GLenum condition, GLbitfield flags);
+ void glProvokingVertex(GLenum mode);
+ void glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex);
+ void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
+ void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+ void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+
+ // OpenGL 3.3 core functions
+ void glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribDivisor(GLuint index, GLuint divisor);
+ void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params);
+ void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params);
+ void glQueryCounter(GLuint id, GLenum target);
+ void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params);
+ void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
+ void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params);
+ void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
+ void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param);
+ void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
+ void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
+ void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
+ void glBindSampler(GLuint unit, GLuint sampler);
+ GLboolean glIsSampler(GLuint sampler);
+ void glDeleteSamplers(GLsizei count, const GLuint *samplers);
+ void glGenSamplers(GLsizei count, GLuint *samplers);
+ GLint glGetFragDataIndex(GLuint program, const GLchar *name);
+ void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+
+ // OpenGL 4.0 core functions
+ void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params);
+ void glEndQueryIndexed(GLenum target, GLuint index);
+ void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id);
+ void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream);
+ void glDrawTransformFeedback(GLenum mode, GLuint id);
+ void glResumeTransformFeedback();
+ void glPauseTransformFeedback();
+ GLboolean glIsTransformFeedback(GLuint id);
+ void glGenTransformFeedbacks(GLsizei n, GLuint *ids);
+ void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
+ void glBindTransformFeedback(GLenum target, GLuint id);
+ void glPatchParameterfv(GLenum pname, const GLfloat *values);
+ void glPatchParameteri(GLenum pname, GLint value);
+ void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+ void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params);
+ void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices);
+ void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+ GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name);
+ GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name);
+ void glGetUniformdv(GLuint program, GLint location, GLdouble *params);
+ void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniform4dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform3dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform2dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform1dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);
+ void glUniform2d(GLint location, GLdouble x, GLdouble y);
+ void glUniform1d(GLint location, GLdouble x);
+ void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
+ void glDrawArraysIndirect(GLenum mode, const void *indirect);
+ void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+ void glBlendFunci(GLuint buf, GLenum src, GLenum dst);
+ void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+ void glBlendEquationi(GLuint buf, GLenum mode);
+ void glMinSampleShading(GLfloat value);
+
+ // OpenGL 4.1 core functions
+ void glGetDoublei_v(GLenum target, GLuint index, GLdouble *data);
+ void glGetFloati_v(GLenum target, GLuint index, GLfloat *data);
+ void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f);
+ void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v);
+ void glScissorIndexedv(GLuint index, const GLint *v);
+ void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+ void glScissorArrayv(GLuint first, GLsizei count, const GLint *v);
+ void glViewportIndexedfv(GLuint index, const GLfloat *v);
+ void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+ void glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v);
+ void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params);
+ void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glVertexAttribL4dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL3dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL2dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL1dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttribL1d(GLuint index, GLdouble x);
+ void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glValidateProgramPipeline(GLuint pipeline);
+ void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+ void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+ void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+ void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
+ void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);
+ void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+ void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
+ void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
+ void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform1d(GLuint program, GLint location, GLdouble v0);
+ void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
+ void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform1i(GLuint program, GLint location, GLint v0);
+ void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
+ GLboolean glIsProgramPipeline(GLuint pipeline);
+ void glGenProgramPipelines(GLsizei n, GLuint *pipelines);
+ void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
+ void glBindProgramPipeline(GLuint pipeline);
+ GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar* const *strings);
+ void glActiveShaderProgram(GLuint pipeline, GLuint program);
+ void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
+ void glProgramParameteri(GLuint program, GLenum pname, GLint value);
+ void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+ void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+ void glClearDepthf(GLfloat dd);
+ void glDepthRangef(GLfloat n, GLfloat f);
+ void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+ void glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+ void glReleaseShaderCompiler();
+
+ // OpenGL 4.2 core functions
+ void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
+ void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount);
+ void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+ void glMemoryBarrier(GLbitfield barriers);
+ void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+ void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
+ void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+ void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
+ void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
+ void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
+
+ // OpenGL 4.3 core functions
+ void glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label);
+ void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+ void glPopDebugGroup();
+ void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message);
+ GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+ void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
+ void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+ void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+ void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
+ void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
+ void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+ void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+ GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+ void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+ GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+ void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+ void glInvalidateBufferData(GLuint buffer);
+ void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length);
+ void glInvalidateTexImage(GLuint texture, GLint level);
+ void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+ void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
+ void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
+ void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+ void glDispatchComputeIndirect(GLintptr indirect);
+ void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+ void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+ void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+
+ // OpenGL 4.4 core functions
+ void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers);
+ void glBindTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
+ void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
+ void glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+ void glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
+ void glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
+
+ // OpenGL 4.5 core functions
+ void glTextureBarrier();
+ void glReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+ void glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+ void glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params);
+ void glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+ void glGetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+ void glGetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void glGetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels);
+ GLenum glGetGraphicsResetStatus();
+ void glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
+ void glGetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void glMemoryBarrierByRegion(GLbitfield barriers);
+ void glCreateQueries(GLenum target, GLsizei n, GLuint *ids);
+ void glCreateProgramPipelines(GLsizei n, GLuint *pipelines);
+ void glCreateSamplers(GLsizei n, GLuint *samplers);
+ void glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
+ void glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param);
+ void glGetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param);
+ void glVertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor);
+ void glVertexArrayAttribLFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexArrayAttribIFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexArrayAttribFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+ void glVertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void glVertexArrayVertexBuffer(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void glVertexArrayElementBuffer(GLuint vaobj, GLuint buffer);
+ void glEnableVertexArrayAttrib(GLuint vaobj, GLuint index);
+ void glDisableVertexArrayAttrib(GLuint vaobj, GLuint index);
+ void glCreateVertexArrays(GLsizei n, GLuint *arrays);
+ void glGetTextureParameteriv(GLuint texture, GLenum pname, GLint *params);
+ void glGetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params);
+ void glGetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params);
+ void glGetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params);
+ void glGetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint *params);
+ void glGetTextureLevelParameterfv(GLuint texture, GLint level, GLenum pname, GLfloat *params);
+ void glGetCompressedTextureImage(GLuint texture, GLint level, GLsizei bufSize, void *pixels);
+ void glGetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void glBindTextureUnit(GLuint unit, GLuint texture);
+ void glGenerateTextureMipmap(GLuint texture);
+ void glTextureParameteriv(GLuint texture, GLenum pname, const GLint *param);
+ void glTextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params);
+ void glTextureParameterIiv(GLuint texture, GLenum pname, const GLint *params);
+ void glTextureParameteri(GLuint texture, GLenum pname, GLint param);
+ void glTextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param);
+ void glTextureParameterf(GLuint texture, GLenum pname, GLfloat param);
+ void glCopyTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void glCompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void glTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void glTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void glTextureStorage3DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTextureStorage2DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
+ void glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
+ void glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer);
+ void glCreateTextures(GLenum target, GLsizei n, GLuint *textures);
+ void glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params);
+ void glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void glNamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+ void glCreateRenderbuffers(GLsizei n, GLuint *renderbuffers);
+ void glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
+ void glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param);
+ GLenum glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target);
+ void glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil);
+ void glClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void glClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void glClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
+ void glInvalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glInvalidateNamedFramebufferData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
+ void glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum src);
+ void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs);
+ void glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);
+ void glNamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void glNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+ void glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param);
+ void glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void glCreateFramebuffers(GLsizei n, GLuint *framebuffers);
+ void glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, void *data);
+ void glGetNamedBufferPointerv(GLuint buffer, GLenum pname, void * *params);
+ void glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params);
+ void glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params);
+ void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length);
+ GLboolean glUnmapNamedBuffer(GLuint buffer);
+ void * glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
+ void * glMapNamedBuffer(GLuint buffer, GLenum access);
+ void glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
+ void glClearNamedBufferData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+ void glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
+ void glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, const void *data);
+ void glNamedBufferData(GLuint buffer, GLsizei size, const void *data, GLenum usage);
+ void glNamedBufferStorage(GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
+ void glCreateBuffers(GLsizei n, GLuint *buffers);
+ void glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
+ void glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param);
+ void glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param);
+ void glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
+ void glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer);
+ void glCreateTransformFeedbacks(GLsizei n, GLuint *ids);
+ void glClipControl(GLenum origin, GLenum depth);
+
+ // OpenGL 1.0 deprecated functions
+ void glTranslatef(GLfloat x, GLfloat y, GLfloat z);
+ void glTranslated(GLdouble x, GLdouble y, GLdouble z);
+ void glScalef(GLfloat x, GLfloat y, GLfloat z);
+ void glScaled(GLdouble x, GLdouble y, GLdouble z);
+ void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+ void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+ void glPushMatrix();
+ void glPopMatrix();
+ void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+ void glMultMatrixd(const GLdouble *m);
+ void glMultMatrixf(const GLfloat *m);
+ void glMatrixMode(GLenum mode);
+ void glLoadMatrixd(const GLdouble *m);
+ void glLoadMatrixf(const GLfloat *m);
+ void glLoadIdentity();
+ void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+ GLboolean glIsList(GLuint list);
+ void glGetTexGeniv(GLenum coord, GLenum pname, GLint *params);
+ void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params);
+ void glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params);
+ void glGetTexEnviv(GLenum target, GLenum pname, GLint *params);
+ void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetPolygonStipple(GLubyte *mask);
+ void glGetPixelMapusv(GLenum map, GLushort *values);
+ void glGetPixelMapuiv(GLenum map, GLuint *values);
+ void glGetPixelMapfv(GLenum map, GLfloat *values);
+ void glGetMaterialiv(GLenum face, GLenum pname, GLint *params);
+ void glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
+ void glGetMapiv(GLenum target, GLenum query, GLint *v);
+ void glGetMapfv(GLenum target, GLenum query, GLfloat *v);
+ void glGetMapdv(GLenum target, GLenum query, GLdouble *v);
+ void glGetLightiv(GLenum light, GLenum pname, GLint *params);
+ void glGetLightfv(GLenum light, GLenum pname, GLfloat *params);
+ void glGetClipPlane(GLenum plane, GLdouble *equation);
+ void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+ void glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values);
+ void glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values);
+ void glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values);
+ void glPixelTransferi(GLenum pname, GLint param);
+ void glPixelTransferf(GLenum pname, GLfloat param);
+ void glPixelZoom(GLfloat xfactor, GLfloat yfactor);
+ void glAlphaFunc(GLenum func, GLfloat ref);
+ void glEvalPoint2(GLint i, GLint j);
+ void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+ void glEvalPoint1(GLint i);
+ void glEvalMesh1(GLenum mode, GLint i1, GLint i2);
+ void glEvalCoord2fv(const GLfloat *u);
+ void glEvalCoord2f(GLfloat u, GLfloat v);
+ void glEvalCoord2dv(const GLdouble *u);
+ void glEvalCoord2d(GLdouble u, GLdouble v);
+ void glEvalCoord1fv(const GLfloat *u);
+ void glEvalCoord1f(GLfloat u);
+ void glEvalCoord1dv(const GLdouble *u);
+ void glEvalCoord1d(GLdouble u);
+ void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+ void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+ void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);
+ void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);
+ void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+ void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+ void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+ void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+ void glPushAttrib(GLbitfield mask);
+ void glPopAttrib();
+ void glAccum(GLenum op, GLfloat value);
+ void glIndexMask(GLuint mask);
+ void glClearIndex(GLfloat c);
+ void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glPushName(GLuint name);
+ void glPopName();
+ void glPassThrough(GLfloat token);
+ void glLoadName(GLuint name);
+ void glInitNames();
+ GLint glRenderMode(GLenum mode);
+ void glSelectBuffer(GLsizei size, GLuint *buffer);
+ void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer);
+ void glTexGeniv(GLenum coord, GLenum pname, const GLint *params);
+ void glTexGeni(GLenum coord, GLenum pname, GLint param);
+ void glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params);
+ void glTexGenf(GLenum coord, GLenum pname, GLfloat param);
+ void glTexGendv(GLenum coord, GLenum pname, const GLdouble *params);
+ void glTexGend(GLenum coord, GLenum pname, GLdouble param);
+ void glTexEnviv(GLenum target, GLenum pname, const GLint *params);
+ void glTexEnvi(GLenum target, GLenum pname, GLint param);
+ void glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glTexEnvf(GLenum target, GLenum pname, GLfloat param);
+ void glShadeModel(GLenum mode);
+ void glPolygonStipple(const GLubyte *mask);
+ void glMaterialiv(GLenum face, GLenum pname, const GLint *params);
+ void glMateriali(GLenum face, GLenum pname, GLint param);
+ void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
+ void glMaterialf(GLenum face, GLenum pname, GLfloat param);
+ void glLineStipple(GLint factor, GLushort pattern);
+ void glLightModeliv(GLenum pname, const GLint *params);
+ void glLightModeli(GLenum pname, GLint param);
+ void glLightModelfv(GLenum pname, const GLfloat *params);
+ void glLightModelf(GLenum pname, GLfloat param);
+ void glLightiv(GLenum light, GLenum pname, const GLint *params);
+ void glLighti(GLenum light, GLenum pname, GLint param);
+ void glLightfv(GLenum light, GLenum pname, const GLfloat *params);
+ void glLightf(GLenum light, GLenum pname, GLfloat param);
+ void glFogiv(GLenum pname, const GLint *params);
+ void glFogi(GLenum pname, GLint param);
+ void glFogfv(GLenum pname, const GLfloat *params);
+ void glFogf(GLenum pname, GLfloat param);
+ void glColorMaterial(GLenum face, GLenum mode);
+ void glClipPlane(GLenum plane, const GLdouble *equation);
+ void glVertex4sv(const GLshort *v);
+ void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);
+ void glVertex4iv(const GLint *v);
+ void glVertex4i(GLint x, GLint y, GLint z, GLint w);
+ void glVertex4fv(const GLfloat *v);
+ void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glVertex4dv(const GLdouble *v);
+ void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertex3sv(const GLshort *v);
+ void glVertex3s(GLshort x, GLshort y, GLshort z);
+ void glVertex3iv(const GLint *v);
+ void glVertex3i(GLint x, GLint y, GLint z);
+ void glVertex3fv(const GLfloat *v);
+ void glVertex3f(GLfloat x, GLfloat y, GLfloat z);
+ void glVertex3dv(const GLdouble *v);
+ void glVertex3d(GLdouble x, GLdouble y, GLdouble z);
+ void glVertex2sv(const GLshort *v);
+ void glVertex2s(GLshort x, GLshort y);
+ void glVertex2iv(const GLint *v);
+ void glVertex2i(GLint x, GLint y);
+ void glVertex2fv(const GLfloat *v);
+ void glVertex2f(GLfloat x, GLfloat y);
+ void glVertex2dv(const GLdouble *v);
+ void glVertex2d(GLdouble x, GLdouble y);
+ void glTexCoord4sv(const GLshort *v);
+ void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);
+ void glTexCoord4iv(const GLint *v);
+ void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);
+ void glTexCoord4fv(const GLfloat *v);
+ void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+ void glTexCoord4dv(const GLdouble *v);
+ void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+ void glTexCoord3sv(const GLshort *v);
+ void glTexCoord3s(GLshort s, GLshort t, GLshort r);
+ void glTexCoord3iv(const GLint *v);
+ void glTexCoord3i(GLint s, GLint t, GLint r);
+ void glTexCoord3fv(const GLfloat *v);
+ void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);
+ void glTexCoord3dv(const GLdouble *v);
+ void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);
+ void glTexCoord2sv(const GLshort *v);
+ void glTexCoord2s(GLshort s, GLshort t);
+ void glTexCoord2iv(const GLint *v);
+ void glTexCoord2i(GLint s, GLint t);
+ void glTexCoord2fv(const GLfloat *v);
+ void glTexCoord2f(GLfloat s, GLfloat t);
+ void glTexCoord2dv(const GLdouble *v);
+ void glTexCoord2d(GLdouble s, GLdouble t);
+ void glTexCoord1sv(const GLshort *v);
+ void glTexCoord1s(GLshort s);
+ void glTexCoord1iv(const GLint *v);
+ void glTexCoord1i(GLint s);
+ void glTexCoord1fv(const GLfloat *v);
+ void glTexCoord1f(GLfloat s);
+ void glTexCoord1dv(const GLdouble *v);
+ void glTexCoord1d(GLdouble s);
+ void glRectsv(const GLshort *v1, const GLshort *v2);
+ void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+ void glRectiv(const GLint *v1, const GLint *v2);
+ void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);
+ void glRectfv(const GLfloat *v1, const GLfloat *v2);
+ void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+ void glRectdv(const GLdouble *v1, const GLdouble *v2);
+ void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+ void glRasterPos4sv(const GLshort *v);
+ void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);
+ void glRasterPos4iv(const GLint *v);
+ void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);
+ void glRasterPos4fv(const GLfloat *v);
+ void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glRasterPos4dv(const GLdouble *v);
+ void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glRasterPos3sv(const GLshort *v);
+ void glRasterPos3s(GLshort x, GLshort y, GLshort z);
+ void glRasterPos3iv(const GLint *v);
+ void glRasterPos3i(GLint x, GLint y, GLint z);
+ void glRasterPos3fv(const GLfloat *v);
+ void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);
+ void glRasterPos3dv(const GLdouble *v);
+ void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);
+ void glRasterPos2sv(const GLshort *v);
+ void glRasterPos2s(GLshort x, GLshort y);
+ void glRasterPos2iv(const GLint *v);
+ void glRasterPos2i(GLint x, GLint y);
+ void glRasterPos2fv(const GLfloat *v);
+ void glRasterPos2f(GLfloat x, GLfloat y);
+ void glRasterPos2dv(const GLdouble *v);
+ void glRasterPos2d(GLdouble x, GLdouble y);
+ void glNormal3sv(const GLshort *v);
+ void glNormal3s(GLshort nx, GLshort ny, GLshort nz);
+ void glNormal3iv(const GLint *v);
+ void glNormal3i(GLint nx, GLint ny, GLint nz);
+ void glNormal3fv(const GLfloat *v);
+ void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
+ void glNormal3dv(const GLdouble *v);
+ void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);
+ void glNormal3bv(const GLbyte *v);
+ void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz);
+ void glIndexsv(const GLshort *c);
+ void glIndexs(GLshort c);
+ void glIndexiv(const GLint *c);
+ void glIndexi(GLint c);
+ void glIndexfv(const GLfloat *c);
+ void glIndexf(GLfloat c);
+ void glIndexdv(const GLdouble *c);
+ void glIndexd(GLdouble c);
+ void glEnd();
+ void glEdgeFlagv(const GLboolean *flag);
+ void glEdgeFlag(GLboolean flag);
+ void glColor4usv(const GLushort *v);
+ void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+ void glColor4uiv(const GLuint *v);
+ void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+ void glColor4ubv(const GLubyte *v);
+ void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+ void glColor4sv(const GLshort *v);
+ void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+ void glColor4iv(const GLint *v);
+ void glColor4i(GLint red, GLint green, GLint blue, GLint alpha);
+ void glColor4fv(const GLfloat *v);
+ void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glColor4dv(const GLdouble *v);
+ void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+ void glColor4bv(const GLbyte *v);
+ void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+ void glColor3usv(const GLushort *v);
+ void glColor3us(GLushort red, GLushort green, GLushort blue);
+ void glColor3uiv(const GLuint *v);
+ void glColor3ui(GLuint red, GLuint green, GLuint blue);
+ void glColor3ubv(const GLubyte *v);
+ void glColor3ub(GLubyte red, GLubyte green, GLubyte blue);
+ void glColor3sv(const GLshort *v);
+ void glColor3s(GLshort red, GLshort green, GLshort blue);
+ void glColor3iv(const GLint *v);
+ void glColor3i(GLint red, GLint green, GLint blue);
+ void glColor3fv(const GLfloat *v);
+ void glColor3f(GLfloat red, GLfloat green, GLfloat blue);
+ void glColor3dv(const GLdouble *v);
+ void glColor3d(GLdouble red, GLdouble green, GLdouble blue);
+ void glColor3bv(const GLbyte *v);
+ void glColor3b(GLbyte red, GLbyte green, GLbyte blue);
+ void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+ void glBegin(GLenum mode);
+ void glListBase(GLuint base);
+ GLuint glGenLists(GLsizei range);
+ void glDeleteLists(GLuint list, GLsizei range);
+ void glCallLists(GLsizei n, GLenum type, const void *lists);
+ void glCallList(GLuint list);
+ void glEndList();
+ void glNewList(GLuint list, GLenum mode);
+
+ // OpenGL 1.1 deprecated functions
+ void glPushClientAttrib(GLbitfield mask);
+ void glPopClientAttrib();
+ void glIndexubv(const GLubyte *c);
+ void glIndexub(GLubyte c);
+ void glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities);
+ GLboolean glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences);
+ void glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glNormalPointer(GLenum type, GLsizei stride, const void *pointer);
+ void glInterleavedArrays(GLenum format, GLsizei stride, const void *pointer);
+ void glGetPointerv(GLenum pname, void * *params);
+ void glIndexPointer(GLenum type, GLsizei stride, const void *pointer);
+ void glEnableClientState(GLenum array);
+ void glEdgeFlagPointer(GLsizei stride, const void *pointer);
+ void glDisableClientState(GLenum array);
+ void glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glArrayElement(GLint i);
+
+ // OpenGL 1.2 deprecated functions
+ void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
+ void glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+ void glGetColorTable(GLenum target, GLenum format, GLenum type, void *table);
+ void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
+ void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+ void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
+ void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
+ void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);
+ void glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glConvolutionParameteri(GLenum target, GLenum pname, GLint params);
+ void glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+ void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, void *image);
+ void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
+ void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
+ void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+ void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+ void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+ void glMinmax(GLenum target, GLenum internalformat, GLboolean sink);
+ void glResetHistogram(GLenum target);
+ void glResetMinmax(GLenum target);
+
+ // OpenGL 1.3 deprecated functions
+ void glMultTransposeMatrixd(const GLdouble *m);
+ void glMultTransposeMatrixf(const GLfloat *m);
+ void glLoadTransposeMatrixd(const GLdouble *m);
+ void glLoadTransposeMatrixf(const GLfloat *m);
+ void glMultiTexCoord4sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+ void glMultiTexCoord4iv(GLenum target, const GLint *v);
+ void glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q);
+ void glMultiTexCoord4fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+ void glMultiTexCoord4dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+ void glMultiTexCoord3sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r);
+ void glMultiTexCoord3iv(GLenum target, const GLint *v);
+ void glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r);
+ void glMultiTexCoord3fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+ void glMultiTexCoord3dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+ void glMultiTexCoord2sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord2s(GLenum target, GLshort s, GLshort t);
+ void glMultiTexCoord2iv(GLenum target, const GLint *v);
+ void glMultiTexCoord2i(GLenum target, GLint s, GLint t);
+ void glMultiTexCoord2fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t);
+ void glMultiTexCoord2dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t);
+ void glMultiTexCoord1sv(GLenum target, const GLshort *v);
+ void glMultiTexCoord1s(GLenum target, GLshort s);
+ void glMultiTexCoord1iv(GLenum target, const GLint *v);
+ void glMultiTexCoord1i(GLenum target, GLint s);
+ void glMultiTexCoord1fv(GLenum target, const GLfloat *v);
+ void glMultiTexCoord1f(GLenum target, GLfloat s);
+ void glMultiTexCoord1dv(GLenum target, const GLdouble *v);
+ void glMultiTexCoord1d(GLenum target, GLdouble s);
+ void glClientActiveTexture(GLenum texture);
+
+ // OpenGL 1.4 deprecated functions
+ void glWindowPos3sv(const GLshort *v);
+ void glWindowPos3s(GLshort x, GLshort y, GLshort z);
+ void glWindowPos3iv(const GLint *v);
+ void glWindowPos3i(GLint x, GLint y, GLint z);
+ void glWindowPos3fv(const GLfloat *v);
+ void glWindowPos3f(GLfloat x, GLfloat y, GLfloat z);
+ void glWindowPos3dv(const GLdouble *v);
+ void glWindowPos3d(GLdouble x, GLdouble y, GLdouble z);
+ void glWindowPos2sv(const GLshort *v);
+ void glWindowPos2s(GLshort x, GLshort y);
+ void glWindowPos2iv(const GLint *v);
+ void glWindowPos2i(GLint x, GLint y);
+ void glWindowPos2fv(const GLfloat *v);
+ void glWindowPos2f(GLfloat x, GLfloat y);
+ void glWindowPos2dv(const GLdouble *v);
+ void glWindowPos2d(GLdouble x, GLdouble y);
+ void glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glSecondaryColor3usv(const GLushort *v);
+ void glSecondaryColor3us(GLushort red, GLushort green, GLushort blue);
+ void glSecondaryColor3uiv(const GLuint *v);
+ void glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue);
+ void glSecondaryColor3ubv(const GLubyte *v);
+ void glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue);
+ void glSecondaryColor3sv(const GLshort *v);
+ void glSecondaryColor3s(GLshort red, GLshort green, GLshort blue);
+ void glSecondaryColor3iv(const GLint *v);
+ void glSecondaryColor3i(GLint red, GLint green, GLint blue);
+ void glSecondaryColor3fv(const GLfloat *v);
+ void glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue);
+ void glSecondaryColor3dv(const GLdouble *v);
+ void glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue);
+ void glSecondaryColor3bv(const GLbyte *v);
+ void glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue);
+ void glFogCoordPointer(GLenum type, GLsizei stride, const void *pointer);
+ void glFogCoorddv(const GLdouble *coord);
+ void glFogCoordd(GLdouble coord);
+ void glFogCoordfv(const GLfloat *coord);
+ void glFogCoordf(GLfloat coord);
+
+ // OpenGL 1.5 deprecated functions
+
+ // OpenGL 2.0 deprecated functions
+
+ // OpenGL 2.1 deprecated functions
+
+ // OpenGL 3.0 deprecated functions
+
+ // OpenGL 3.1 deprecated functions
+
+ // OpenGL 3.2 deprecated functions
+
+ // OpenGL 3.3 deprecated functions
+ void glSecondaryColorP3uiv(GLenum type, const GLuint *color);
+ void glSecondaryColorP3ui(GLenum type, GLuint color);
+ void glColorP4uiv(GLenum type, const GLuint *color);
+ void glColorP4ui(GLenum type, GLuint color);
+ void glColorP3uiv(GLenum type, const GLuint *color);
+ void glColorP3ui(GLenum type, GLuint color);
+ void glNormalP3uiv(GLenum type, const GLuint *coords);
+ void glNormalP3ui(GLenum type, GLuint coords);
+ void glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords);
+ void glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords);
+ void glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords);
+ void glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords);
+ void glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords);
+ void glTexCoordP4uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP4ui(GLenum type, GLuint coords);
+ void glTexCoordP3uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP3ui(GLenum type, GLuint coords);
+ void glTexCoordP2uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP2ui(GLenum type, GLuint coords);
+ void glTexCoordP1uiv(GLenum type, const GLuint *coords);
+ void glTexCoordP1ui(GLenum type, GLuint coords);
+ void glVertexP4uiv(GLenum type, const GLuint *value);
+ void glVertexP4ui(GLenum type, GLuint value);
+ void glVertexP3uiv(GLenum type, const GLuint *value);
+ void glVertexP3ui(GLenum type, GLuint value);
+ void glVertexP2uiv(GLenum type, const GLuint *value);
+ void glVertexP2ui(GLenum type, GLuint value);
+
+ // OpenGL 4.0 deprecated functions
+
+ // OpenGL 4.1 deprecated functions
+
+ // OpenGL 4.2 deprecated functions
+
+ // OpenGL 4.3 deprecated functions
+
+ // OpenGL 4.4 deprecated functions
+
+ // OpenGL 4.5 deprecated functions
+ void glGetnMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
+ void glGetnHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
+ void glGetnSeparableFilter(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
+ void glGetnConvolutionFilter(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
+ void glGetnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
+ void glGetnPolygonStipple(GLsizei bufSize, GLubyte *pattern);
+ void glGetnPixelMapusv(GLenum map, GLsizei bufSize, GLushort *values);
+ void glGetnPixelMapuiv(GLenum map, GLsizei bufSize, GLuint *values);
+ void glGetnPixelMapfv(GLenum map, GLsizei bufSize, GLfloat *values);
+ void glGetnMapiv(GLenum target, GLenum query, GLsizei bufSize, GLint *v);
+ void glGetnMapfv(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
+ void glGetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
+
+private:
+ friend class QOpenGLContext;
+
+ static bool isContextCompatible(QOpenGLContext *context);
+ static QOpenGLVersionProfile versionProfile();
+
+ QOpenGLFunctions_1_0_CoreBackend* d_1_0_Core;
+ QOpenGLFunctions_1_1_CoreBackend* d_1_1_Core;
+ QOpenGLFunctions_1_2_CoreBackend* d_1_2_Core;
+ QOpenGLFunctions_1_3_CoreBackend* d_1_3_Core;
+ QOpenGLFunctions_1_4_CoreBackend* d_1_4_Core;
+ QOpenGLFunctions_1_5_CoreBackend* d_1_5_Core;
+ QOpenGLFunctions_2_0_CoreBackend* d_2_0_Core;
+ QOpenGLFunctions_2_1_CoreBackend* d_2_1_Core;
+ QOpenGLFunctions_3_0_CoreBackend* d_3_0_Core;
+ QOpenGLFunctions_3_1_CoreBackend* d_3_1_Core;
+ QOpenGLFunctions_3_2_CoreBackend* d_3_2_Core;
+ QOpenGLFunctions_3_3_CoreBackend* d_3_3_Core;
+ QOpenGLFunctions_4_0_CoreBackend* d_4_0_Core;
+ QOpenGLFunctions_4_1_CoreBackend* d_4_1_Core;
+ QOpenGLFunctions_4_2_CoreBackend* d_4_2_Core;
+ QOpenGLFunctions_4_3_CoreBackend* d_4_3_Core;
+ QOpenGLFunctions_4_4_CoreBackend* d_4_4_Core;
+ QOpenGLFunctions_4_5_CoreBackend* d_4_5_Core;
+ QOpenGLFunctions_1_0_DeprecatedBackend* d_1_0_Deprecated;
+ QOpenGLFunctions_1_1_DeprecatedBackend* d_1_1_Deprecated;
+ QOpenGLFunctions_1_2_DeprecatedBackend* d_1_2_Deprecated;
+ QOpenGLFunctions_1_3_DeprecatedBackend* d_1_3_Deprecated;
+ QOpenGLFunctions_1_4_DeprecatedBackend* d_1_4_Deprecated;
+ QOpenGLFunctions_3_3_DeprecatedBackend* d_3_3_Deprecated;
+ QOpenGLFunctions_4_5_DeprecatedBackend* d_4_5_Deprecated;
+};
+
+// OpenGL 1.0 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Viewport(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDepthRange(GLdouble nearVal, GLdouble farVal)
+{
+ d_1_0_Core->DepthRange(nearVal, farVal);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsEnabled(GLenum cap)
+{
+ return d_1_0_Core->IsEnabled(cap);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexLevelParameteriv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexLevelParameterfv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->GetTexImage(target, level, format, type, pixels);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_5_Compatibility::glGetString(GLenum name)
+{
+ return d_1_0_Core->GetString(name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetIntegerv(GLenum pname, GLint *data)
+{
+ d_1_0_Core->GetIntegerv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetFloatv(GLenum pname, GLfloat *data)
+{
+ d_1_0_Core->GetFloatv(pname, data);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Compatibility::glGetError()
+{
+ return d_1_0_Core->GetError();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetDoublev(GLenum pname, GLdouble *data)
+{
+ d_1_0_Core->GetDoublev(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetBooleanv(GLenum pname, GLboolean *data)
+{
+ d_1_0_Core->GetBooleanv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->ReadPixels(x, y, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glReadBuffer(GLenum src)
+{
+ d_1_0_Core->ReadBuffer(src);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelStorei(GLenum pname, GLint param)
+{
+ d_1_0_Core->PixelStorei(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelStoref(GLenum pname, GLfloat param)
+{
+ d_1_0_Core->PixelStoref(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDepthFunc(GLenum func)
+{
+ d_1_0_Core->DepthFunc(func);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ d_1_0_Core->StencilOp(fail, zfail, zpass);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ d_1_0_Core->StencilFunc(func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLogicOp(GLenum opcode)
+{
+ d_1_0_Core->LogicOp(opcode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ d_1_0_Core->BlendFunc(sfactor, dfactor);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFlush()
+{
+ d_1_0_Core->Flush();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFinish()
+{
+ d_1_0_Core->Finish();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEnable(GLenum cap)
+{
+ d_1_0_Core->Enable(cap);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDisable(GLenum cap)
+{
+ d_1_0_Core->Disable(cap);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDepthMask(GLboolean flag)
+{
+ d_1_0_Core->DepthMask(flag);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ d_1_0_Core->ColorMask(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glStencilMask(GLuint mask)
+{
+ d_1_0_Core->StencilMask(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearDepth(GLdouble depth)
+{
+ d_1_0_Core->ClearDepth(depth);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearStencil(GLint s)
+{
+ d_1_0_Core->ClearStencil(s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Core->ClearColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClear(GLbitfield mask)
+{
+ d_1_0_Core->Clear(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawBuffer(GLenum buf)
+{
+ d_1_0_Core->DrawBuffer(buf);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage1D(target, level, internalformat, width, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_0_Core->TexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_1_0_Core->TexParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Core->TexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ d_1_0_Core->TexParameterf(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Scissor(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPolygonMode(GLenum face, GLenum mode)
+{
+ d_1_0_Core->PolygonMode(face, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPointSize(GLfloat size)
+{
+ d_1_0_Core->PointSize(size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLineWidth(GLfloat width)
+{
+ d_1_0_Core->LineWidth(width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glHint(GLenum target, GLenum mode)
+{
+ d_1_0_Core->Hint(target, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFrontFace(GLenum mode)
+{
+ d_1_0_Core->FrontFace(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCullFace(GLenum mode)
+{
+ d_1_0_Core->CullFace(mode);
+}
+
+
+// OpenGL 1.1 core functions
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsTexture(GLuint texture)
+{
+ return d_1_1_Core->IsTexture(texture);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenTextures(GLsizei n, GLuint *textures)
+{
+ d_1_1_Core->GenTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ d_1_1_Core->DeleteTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindTexture(GLenum target, GLuint texture)
+{
+ d_1_1_Core->BindTexture(target, texture);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage1D(target, level, xoffset, width, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_1_Core->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ d_1_1_Core->CopyTexSubImage1D(target, level, xoffset, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ d_1_1_Core->CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ d_1_1_Core->CopyTexImage1D(target, level, internalformat, x, y, width, border);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ d_1_1_Core->PolygonOffset(factor, units);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_1_Core->DrawElements(mode, count, type, indices);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ d_1_1_Core->DrawArrays(mode, first, count);
+}
+
+
+// OpenGL 1.2 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_2_Core->BlendColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendEquation(GLenum mode)
+{
+ d_1_2_Core->BlendEquation(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_2_Core->CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_2_Core->DrawRangeElements(mode, start, end, count, type, indices);
+}
+
+
+// OpenGL 1.3 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glGetCompressedTexImage(GLenum target, GLint level, void *img)
+{
+ d_1_3_Core->GetCompressedTexImage(target, level, img);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage1D(target, level, internalformat, width, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSampleCoverage(GLfloat value, GLboolean invert)
+{
+ d_1_3_Core->SampleCoverage(value, invert);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glActiveTexture(GLenum texture)
+{
+ d_1_3_Core->ActiveTexture(texture);
+}
+
+
+// OpenGL 1.4 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glPointParameteriv(GLenum pname, const GLint *params)
+{
+ d_1_4_Core->PointParameteriv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPointParameteri(GLenum pname, GLint param)
+{
+ d_1_4_Core->PointParameteri(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPointParameterfv(GLenum pname, const GLfloat *params)
+{
+ d_1_4_Core->PointParameterfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPointParameterf(GLenum pname, GLfloat param)
+{
+ d_1_4_Core->PointParameterf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawElements(mode, count, type, indices, drawcount);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawArrays(mode, first, count, drawcount);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ d_1_4_Core->BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+
+// OpenGL 1.5 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glGetBufferPointerv(GLenum target, GLenum pname, void * *params)
+{
+ d_1_5_Core->GetBufferPointerv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetBufferParameteriv(target, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glUnmapBuffer(GLenum target)
+{
+ return d_1_5_Core->UnmapBuffer(target);
+}
+
+inline void * QOpenGLFunctions_4_5_Compatibility::glMapBuffer(GLenum target, GLenum access)
+{
+ return d_1_5_Core->MapBuffer(target, access);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
+{
+ d_1_5_Core->GetBufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
+{
+ d_1_5_Core->BufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
+{
+ d_1_5_Core->BufferData(target, size, data, usage);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsBuffer(GLuint buffer)
+{
+ return d_1_5_Core->IsBuffer(buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenBuffers(GLsizei n, GLuint *buffers)
+{
+ d_1_5_Core->GenBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteBuffers(GLsizei n, const GLuint *buffers)
+{
+ d_1_5_Core->DeleteBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindBuffer(GLenum target, GLuint buffer)
+{
+ d_1_5_Core->BindBuffer(target, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+{
+ d_1_5_Core->GetQueryObjectuiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryObjectiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEndQuery(GLenum target)
+{
+ d_1_5_Core->EndQuery(target);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBeginQuery(GLenum target, GLuint id)
+{
+ d_1_5_Core->BeginQuery(target, id);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsQuery(GLuint id)
+{
+ return d_1_5_Core->IsQuery(id);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteQueries(GLsizei n, const GLuint *ids)
+{
+ d_1_5_Core->DeleteQueries(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenQueries(GLsizei n, GLuint *ids)
+{
+ d_1_5_Core->GenQueries(n, ids);
+}
+
+
+// OpenGL 2.0 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer)
+{
+ d_2_0_Core->VertexAttribPointer(index, size, type, normalized, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4usv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4uiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4iv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib4fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4bv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Niv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4Niv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib3sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib3sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib3fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib3fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib3dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib2sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib2sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
+{
+ d_2_0_Core->VertexAttrib2s(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib2fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib2fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
+{
+ d_2_0_Core->VertexAttrib2f(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib2dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_2_0_Core->VertexAttrib2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib1sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib1sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib1s(GLuint index, GLshort x)
+{
+ d_2_0_Core->VertexAttrib1s(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib1fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib1fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib1f(GLuint index, GLfloat x)
+{
+ d_2_0_Core->VertexAttrib1f(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib1dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttrib1d(GLuint index, GLdouble x)
+{
+ d_2_0_Core->VertexAttrib1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glValidateProgram(GLuint program)
+{
+ d_2_0_Core->ValidateProgram(program);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform4iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform3iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform2iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform1iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform4fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform3fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform2fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform1fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_2_0_Core->Uniform4i(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3i(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_2_0_Core->Uniform3i(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2i(GLint location, GLint v0, GLint v1)
+{
+ d_2_0_Core->Uniform2i(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1i(GLint location, GLint v0)
+{
+ d_2_0_Core->Uniform1i(location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_2_0_Core->Uniform4f(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_2_0_Core->Uniform3f(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2f(GLint location, GLfloat v0, GLfloat v1)
+{
+ d_2_0_Core->Uniform2f(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1f(GLint location, GLfloat v0)
+{
+ d_2_0_Core->Uniform1f(location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUseProgram(GLuint program)
+{
+ d_2_0_Core->UseProgram(program);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
+{
+ d_2_0_Core->ShaderSource(shader, count, string, length);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLinkProgram(GLuint program)
+{
+ d_2_0_Core->LinkProgram(program);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsShader(GLuint shader)
+{
+ return d_2_0_Core->IsShader(shader);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsProgram(GLuint program)
+{
+ return d_2_0_Core->IsProgram(program);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer)
+{
+ d_2_0_Core->GetVertexAttribPointerv(index, pname, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetVertexAttribiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
+{
+ d_2_0_Core->GetVertexAttribfv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_2_0_Core->GetVertexAttribdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetUniformiv(GLuint program, GLint location, GLint *params)
+{
+ d_2_0_Core->GetUniformiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetUniformfv(GLuint program, GLint location, GLfloat *params)
+{
+ d_2_0_Core->GetUniformfv(program, location, params);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetUniformLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetUniformLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
+{
+ d_2_0_Core->GetShaderSource(shader, bufSize, length, source);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetShaderInfoLog(shader, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetShaderiv(shader, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetProgramInfoLog(program, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetProgramiv(program, pname, params);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetAttribLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetAttribLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
+{
+ d_2_0_Core->GetAttachedShaders(program, maxCount, count, shaders);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveUniform(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveAttrib(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEnableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->EnableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDisableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->DisableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDetachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->DetachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteShader(GLuint shader)
+{
+ d_2_0_Core->DeleteShader(shader);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteProgram(GLuint program)
+{
+ d_2_0_Core->DeleteProgram(program);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glCreateShader(GLenum type)
+{
+ return d_2_0_Core->CreateShader(type);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glCreateProgram()
+{
+ return d_2_0_Core->CreateProgram();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompileShader(GLuint shader)
+{
+ d_2_0_Core->CompileShader(shader);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
+{
+ d_2_0_Core->BindAttribLocation(program, index, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glAttachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->AttachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ d_2_0_Core->StencilMaskSeparate(face, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ d_2_0_Core->StencilFuncSeparate(face, func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
+{
+ d_2_0_Core->StencilOpSeparate(face, sfail, dpfail, dppass);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawBuffers(GLsizei n, const GLenum *bufs)
+{
+ d_2_0_Core->DrawBuffers(n, bufs);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+{
+ d_2_0_Core->BlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+
+// OpenGL 2.1 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x3fv(location, count, transpose, value);
+}
+
+
+// OpenGL 3.0 core functions
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsVertexArray(GLuint array)
+{
+ return d_3_0_Core->IsVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenVertexArrays(GLsizei n, GLuint *arrays)
+{
+ d_3_0_Core->GenVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+{
+ d_3_0_Core->DeleteVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindVertexArray(GLuint array)
+{
+ d_3_0_Core->BindVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ d_3_0_Core->FlushMappedBufferRange(target, offset, length);
+}
+
+inline void * QOpenGLFunctions_4_5_Compatibility::glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ return d_3_0_Core->MapBufferRange(target, offset, length, access);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ d_3_0_Core->FramebufferTextureLayer(target, attachment, texture, level, layer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ d_3_0_Core->BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenerateMipmap(GLenum target)
+{
+ d_3_0_Core->GenerateMipmap(target);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ d_3_0_Core->FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ d_3_0_Core->FramebufferTexture3D(target, attachment, textarget, texture, level, zoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture2D(target, attachment, textarget, texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture1D(target, attachment, textarget, texture, level);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Compatibility::glCheckFramebufferStatus(GLenum target)
+{
+ return d_3_0_Core->CheckFramebufferStatus(target);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ d_3_0_Core->GenFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
+{
+ d_3_0_Core->DeleteFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+ d_3_0_Core->BindFramebuffer(target, framebuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsFramebuffer(GLuint framebuffer)
+{
+ return d_3_0_Core->IsFramebuffer(framebuffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetRenderbufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorage(target, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ d_3_0_Core->GenRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
+{
+ d_3_0_Core->DeleteRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+ d_3_0_Core->BindRenderbuffer(target, renderbuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsRenderbuffer(GLuint renderbuffer)
+{
+ return d_3_0_Core->IsRenderbuffer(renderbuffer);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_5_Compatibility::glGetStringi(GLenum name, GLuint index)
+{
+ return d_3_0_Core->GetStringi(name, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+{
+ d_3_0_Core->ClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ d_3_0_Core->ClearBufferfv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ d_3_0_Core->ClearBufferuiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ d_3_0_Core->ClearBufferiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetTexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetTexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ d_3_0_Core->TexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_3_0_Core->TexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform4uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform3uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform2uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform1uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_3_0_Core->Uniform4ui(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_3_0_Core->Uniform3ui(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+ d_3_0_Core->Uniform2ui(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1ui(GLint location, GLuint v0)
+{
+ d_3_0_Core->Uniform1ui(location, v0);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetFragDataLocation(GLuint program, const GLchar *name)
+{
+ return d_3_0_Core->GetFragDataLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name)
+{
+ d_3_0_Core->BindFragDataLocation(program, color, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+{
+ d_3_0_Core->GetUniformuiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4usv(GLuint index, const GLushort *v)
+{
+ d_3_0_Core->VertexAttribI4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
+{
+ d_3_0_Core->VertexAttribI4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4sv(GLuint index, const GLshort *v)
+{
+ d_3_0_Core->VertexAttribI4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4bv(GLuint index, const GLbyte *v)
+{
+ d_3_0_Core->VertexAttribI4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI3uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI3uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI2uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI2uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI1uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI1uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI3iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI3iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI2iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI2iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI1iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI1iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
+{
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI1ui(GLuint index, GLuint x)
+{
+ d_3_0_Core->VertexAttribI1ui(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
+{
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI2i(GLuint index, GLint x, GLint y)
+{
+ d_3_0_Core->VertexAttribI2i(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribI1i(GLuint index, GLint x)
+{
+ d_3_0_Core->VertexAttribI1i(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetVertexAttribIuiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetVertexAttribIiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_3_0_Core->VertexAttribIPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEndConditionalRender()
+{
+ d_3_0_Core->EndConditionalRender();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBeginConditionalRender(GLuint id, GLenum mode)
+{
+ d_3_0_Core->BeginConditionalRender(id, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClampColor(GLenum target, GLenum clamp)
+{
+ d_3_0_Core->ClampColor(target, clamp);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ d_3_0_Core->GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const *varyings, GLenum bufferMode)
+{
+ d_3_0_Core->TransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+ d_3_0_Core->BindBufferBase(target, index, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_3_0_Core->BindBufferRange(target, index, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEndTransformFeedback()
+{
+ d_3_0_Core->EndTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBeginTransformFeedback(GLenum primitiveMode)
+{
+ d_3_0_Core->BeginTransformFeedback(primitiveMode);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsEnabledi(GLenum target, GLuint index)
+{
+ return d_3_0_Core->IsEnabledi(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDisablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Disablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEnablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Enablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
+{
+ d_3_0_Core->GetIntegeri_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetBooleani_v(GLenum target, GLuint index, GLboolean *data)
+{
+ d_3_0_Core->GetBooleani_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ d_3_0_Core->ColorMaski(index, r, g, b, a);
+}
+
+
+// OpenGL 3.1 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+ d_3_1_Core->UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+{
+ d_3_1_Core->GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+{
+ return d_3_1_Core->GetUniformBlockIndex(program, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)
+{
+ d_3_1_Core->GetActiveUniformName(program, uniformIndex, bufSize, length, uniformName);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices)
+{
+ d_3_1_Core->GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ d_3_1_Core->CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPrimitiveRestartIndex(GLuint index)
+{
+ d_3_1_Core->PrimitiveRestartIndex(index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
+{
+ d_3_1_Core->TexBuffer(target, internalformat, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount)
+{
+ d_3_1_Core->DrawElementsInstanced(mode, count, type, indices, instancecount);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
+{
+ d_3_1_Core->DrawArraysInstanced(mode, first, count, instancecount);
+}
+
+
+// OpenGL 3.2 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glSampleMaski(GLuint maskNumber, GLbitfield mask)
+{
+ d_3_2_Core->SampleMaski(maskNumber, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
+{
+ d_3_2_Core->GetMultisamplefv(pname, index, val);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ d_3_2_Core->FramebufferTexture(target, attachment, texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+ d_3_2_Core->GetBufferParameteri64v(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64i_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ d_3_2_Core->GetSynciv(sync, pname, bufSize, length, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetInteger64v(GLenum pname, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64v(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ d_3_2_Core->WaitSync(sync, flags, timeout);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Compatibility::glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ return d_3_2_Core->ClientWaitSync(sync, flags, timeout);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteSync(GLsync sync)
+{
+ d_3_2_Core->DeleteSync(sync);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsSync(GLsync sync)
+{
+ return d_3_2_Core->IsSync(sync);
+}
+
+inline GLsync QOpenGLFunctions_4_5_Compatibility::glFenceSync(GLenum condition, GLbitfield flags)
+{
+ return d_3_2_Core->FenceSync(condition, flags);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProvokingVertex(GLenum mode)
+{
+ d_3_2_Core->ProvokingVertex(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex)
+{
+ d_3_2_Core->MultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsBaseVertex(mode, count, type, indices, basevertex);
+}
+
+
+// OpenGL 3.3 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP4uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP4ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP3uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP3ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP2uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP2ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP1uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP1ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ d_3_3_Core->VertexAttribDivisor(index, divisor);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
+{
+ d_3_3_Core->GetQueryObjectui64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
+{
+ d_3_3_Core->GetQueryObjecti64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glQueryCounter(GLuint id, GLenum target)
+{
+ d_3_3_Core->QueryCounter(id, target);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
+{
+ d_3_3_Core->GetSamplerParameterIuiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+{
+ d_3_3_Core->GetSamplerParameterfv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameterIiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameteriv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param)
+{
+ d_3_3_Core->SamplerParameterIuiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameterIiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+{
+ d_3_3_Core->SamplerParameterfv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+ d_3_3_Core->SamplerParameterf(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameteriv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+ d_3_3_Core->SamplerParameteri(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindSampler(GLuint unit, GLuint sampler)
+{
+ d_3_3_Core->BindSampler(unit, sampler);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsSampler(GLuint sampler)
+{
+ return d_3_3_Core->IsSampler(sampler);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteSamplers(GLsizei count, const GLuint *samplers)
+{
+ d_3_3_Core->DeleteSamplers(count, samplers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenSamplers(GLsizei count, GLuint *samplers)
+{
+ d_3_3_Core->GenSamplers(count, samplers);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetFragDataIndex(GLuint program, const GLchar *name)
+{
+ return d_3_3_Core->GetFragDataIndex(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)
+{
+ d_3_3_Core->BindFragDataLocationIndexed(program, colorNumber, index, name);
+}
+
+
+// OpenGL 4.0 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params)
+{
+ d_4_0_Core->GetQueryIndexediv(target, index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEndQueryIndexed(GLenum target, GLuint index)
+{
+ d_4_0_Core->EndQueryIndexed(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBeginQueryIndexed(GLenum target, GLuint index, GLuint id)
+{
+ d_4_0_Core->BeginQueryIndexed(target, index, id);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream)
+{
+ d_4_0_Core->DrawTransformFeedbackStream(mode, id, stream);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawTransformFeedback(GLenum mode, GLuint id)
+{
+ d_4_0_Core->DrawTransformFeedback(mode, id);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glResumeTransformFeedback()
+{
+ d_4_0_Core->ResumeTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPauseTransformFeedback()
+{
+ d_4_0_Core->PauseTransformFeedback();
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsTransformFeedback(GLuint id)
+{
+ return d_4_0_Core->IsTransformFeedback(id);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ d_4_0_Core->GenTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+ d_4_0_Core->DeleteTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindTransformFeedback(GLenum target, GLuint id)
+{
+ d_4_0_Core->BindTransformFeedback(target, id);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPatchParameterfv(GLenum pname, const GLfloat *values)
+{
+ d_4_0_Core->PatchParameterfv(pname, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPatchParameteri(GLenum pname, GLint value)
+{
+ d_4_0_Core->PatchParameteri(pname, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetProgramStageiv(program, shadertype, pname, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params)
+{
+ d_4_0_Core->GetUniformSubroutineuiv(shadertype, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices)
+{
+ d_4_0_Core->UniformSubroutinesuiv(shadertype, count, indices);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetActiveSubroutineUniformiv(program, shadertype, index, pname, values);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineIndex(program, shadertype, name);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineUniformLocation(program, shadertype, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetUniformdv(GLuint program, GLint location, GLdouble *params)
+{
+ d_4_0_Core->GetUniformdv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform4dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform3dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform2dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform1dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_0_Core->Uniform4d(location, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_0_Core->Uniform3d(location, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform2d(GLint location, GLdouble x, GLdouble y)
+{
+ d_4_0_Core->Uniform2d(location, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUniform1d(GLint location, GLdouble x)
+{
+ d_4_0_Core->Uniform1d(location, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
+{
+ d_4_0_Core->DrawElementsIndirect(mode, type, indirect);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawArraysIndirect(GLenum mode, const void *indirect)
+{
+ d_4_0_Core->DrawArraysIndirect(mode, indirect);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+{
+ d_4_0_Core->BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendFunci(GLuint buf, GLenum src, GLenum dst)
+{
+ d_4_0_Core->BlendFunci(buf, src, dst);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
+{
+ d_4_0_Core->BlendEquationSeparatei(buf, modeRGB, modeAlpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlendEquationi(GLuint buf, GLenum mode)
+{
+ d_4_0_Core->BlendEquationi(buf, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMinSampleShading(GLfloat value)
+{
+ d_4_0_Core->MinSampleShading(value);
+}
+
+
+// OpenGL 4.1 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glGetDoublei_v(GLenum target, GLuint index, GLdouble *data)
+{
+ d_4_1_Core->GetDoublei_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetFloati_v(GLenum target, GLuint index, GLfloat *data)
+{
+ d_4_1_Core->GetFloati_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f)
+{
+ d_4_1_Core->DepthRangeIndexed(index, n, f);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v)
+{
+ d_4_1_Core->DepthRangeArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glScissorIndexedv(GLuint index, const GLint *v)
+{
+ d_4_1_Core->ScissorIndexedv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)
+{
+ d_4_1_Core->ScissorIndexed(index, left, bottom, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glScissorArrayv(GLuint first, GLsizei count, const GLint *v)
+{
+ d_4_1_Core->ScissorArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glViewportIndexedfv(GLuint index, const GLfloat *v)
+{
+ d_4_1_Core->ViewportIndexedfv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+{
+ d_4_1_Core->ViewportIndexedf(index, x, y, w, h);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
+{
+ d_4_1_Core->ViewportArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_4_1_Core->GetVertexAttribLdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_4_1_Core->VertexAttribLPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL4dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL3dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL2dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL1dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_1_Core->VertexAttribL4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_1_Core->VertexAttribL3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_4_1_Core->VertexAttribL2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribL1d(GLuint index, GLdouble x)
+{
+ d_4_1_Core->VertexAttribL1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_4_1_Core->GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glValidateProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->ValidateProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform4uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_4_1_Core->ProgramUniform4ui(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform4dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)
+{
+ d_4_1_Core->ProgramUniform4d(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform4fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_4_1_Core->ProgramUniform4f(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform4iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_4_1_Core->ProgramUniform4i(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform3uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_4_1_Core->ProgramUniform3ui(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform3dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)
+{
+ d_4_1_Core->ProgramUniform3d(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform3fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_4_1_Core->ProgramUniform3f(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform3iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_4_1_Core->ProgramUniform3i(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform2uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
+{
+ d_4_1_Core->ProgramUniform2ui(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform2dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1)
+{
+ d_4_1_Core->ProgramUniform2d(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform2fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
+{
+ d_4_1_Core->ProgramUniform2f(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform2iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
+{
+ d_4_1_Core->ProgramUniform2i(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform1uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
+{
+ d_4_1_Core->ProgramUniform1ui(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform1dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1d(GLuint program, GLint location, GLdouble v0)
+{
+ d_4_1_Core->ProgramUniform1d(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform1fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1f(GLuint program, GLint location, GLfloat v0)
+{
+ d_4_1_Core->ProgramUniform1f(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform1iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramUniform1i(GLuint program, GLint location, GLint v0)
+{
+ d_4_1_Core->ProgramUniform1i(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
+{
+ d_4_1_Core->GetProgramPipelineiv(pipeline, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsProgramPipeline(GLuint pipeline)
+{
+ return d_4_1_Core->IsProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ d_4_1_Core->GenProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
+{
+ d_4_1_Core->DeleteProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->BindProgramPipeline(pipeline);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
+{
+ return d_4_1_Core->CreateShaderProgramv(type, count, strings);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glActiveShaderProgram(GLuint pipeline, GLuint program)
+{
+ d_4_1_Core->ActiveShaderProgram(pipeline, program);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+{
+ d_4_1_Core->UseProgramStages(pipeline, stages, program);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+ d_4_1_Core->ProgramParameteri(program, pname, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ProgramBinary(program, binaryFormat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
+{
+ d_4_1_Core->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearDepthf(GLfloat dd)
+{
+ d_4_1_Core->ClearDepthf(dd);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDepthRangef(GLfloat n, GLfloat f)
+{
+ d_4_1_Core->DepthRangef(n, f);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ d_4_1_Core->GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ShaderBinary(count, shaders, binaryformat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glReleaseShaderCompiler()
+{
+ d_4_1_Core->ReleaseShaderCompiler();
+}
+
+
+// OpenGL 4.2 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackStreamInstanced(mode, id, stream, instancecount);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackInstanced(mode, id, instancecount);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_2_Core->TexStorage3D(target, levels, internalformat, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_2_Core->TexStorage2D(target, levels, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
+{
+ d_4_2_Core->TexStorage1D(target, levels, internalformat, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMemoryBarrier(GLbitfield barriers)
+{
+ d_4_2_Core->MemoryBarrier(barriers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
+{
+ d_4_2_Core->BindImageTexture(unit, texture, level, layered, layer, access, format);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)
+{
+ d_4_2_Core->GetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
+{
+ d_4_2_Core->GetInternalformativ(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, instancecount, basevertex, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseInstance(mode, count, type, indices, instancecount, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance);
+}
+
+
+// OpenGL 4.3 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectPtrLabel(ptr, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectPtrLabel(ptr, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectLabel(identifier, name, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectLabel(identifier, name, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPopDebugGroup()
+{
+ d_4_3_Core->PopDebugGroup();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message)
+{
+ d_4_3_Core->PushDebugGroup(source, id, length, message);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
+{
+ return d_4_3_Core->GetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, messageLog);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
+{
+ d_4_3_Core->DebugMessageCallback(callback, userParam);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
+{
+ d_4_3_Core->DebugMessageInsert(source, type, id, severity, length, buf);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
+{
+ d_4_3_Core->DebugMessageControl(source, type, severity, count, ids, enabled);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexBindingDivisor(GLuint bindingindex, GLuint divisor)
+{
+ d_4_3_Core->VertexBindingDivisor(bindingindex, divisor);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribBinding(GLuint attribindex, GLuint bindingindex)
+{
+ d_4_3_Core->VertexAttribBinding(attribindex, bindingindex);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribLFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribIFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+{
+ d_4_3_Core->BindVertexBuffer(bindingindex, buffer, offset, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
+{
+ d_4_3_Core->TextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_4_3_Core->TexBufferRange(target, internalformat, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)
+{
+ d_4_3_Core->ShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocationIndex(program, programInterface, name);
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocation(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)
+{
+ d_4_3_Core->GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
+{
+ d_4_3_Core->GetProgramResourceName(program, programInterface, index, bufSize, length, name);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceIndex(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetProgramInterfaceiv(program, programInterface, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawElementsIndirect(mode, type, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawArraysIndirect(mode, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_3_Core->InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ d_4_3_Core->InvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateBufferData(GLuint buffer)
+{
+ d_4_3_Core->InvalidateBufferData(buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
+{
+ d_4_3_Core->InvalidateBufferSubData(buffer, offset, length);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateTexImage(GLuint texture, GLint level)
+{
+ d_4_3_Core->InvalidateTexImage(texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_3_Core->InvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)
+{
+ d_4_3_Core->GetInternalformati64v(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetFramebufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_4_3_Core->FramebufferParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
+{
+ d_4_3_Core->CopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDispatchComputeIndirect(GLintptr indirect)
+{
+ d_4_3_Core->DispatchComputeIndirect(indirect);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
+{
+ d_4_3_Core->DispatchCompute(num_groups_x, num_groups_y, num_groups_z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferSubData(target, internalformat, offset, size, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferData(target, internalformat, format, type, data);
+}
+
+
+// OpenGL 4.4 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
+{
+ d_4_4_Core->BindVertexBuffers(first, count, buffers, offsets, strides);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindImageTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
+{
+ d_4_4_Core->BindSamplers(first, count, samplers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)
+{
+ d_4_4_Core->BindBuffersRange(target, first, count, buffers, offsets, sizes);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers)
+{
+ d_4_4_Core->BindBuffersBase(target, first, count, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexImage(texture, level, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)
+{
+ d_4_4_Core->BufferStorage(target, size, data, flags);
+}
+
+
+// OpenGL 4.5 core functions
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureBarrier()
+{
+ d_4_5_Core->TextureBarrier();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)
+{
+ d_4_5_Core->ReadnPixels(x, y, width, height, format, type, bufSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params)
+{
+ d_4_5_Core->GetnUniformuiv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params)
+{
+ d_4_5_Core->GetnUniformiv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
+{
+ d_4_5_Core->GetnUniformfv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params)
+{
+ d_4_5_Core->GetnUniformdv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetnTexImage(target, level, format, type, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetnCompressedTexImage(target, lod, bufSize, pixels);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Compatibility::glGetGraphicsResetStatus()
+{
+ return d_4_5_Core->GetGraphicsResetStatus();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMemoryBarrierByRegion(GLbitfield barriers)
+{
+ d_4_5_Core->MemoryBarrierByRegion(barriers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateQueries(GLenum target, GLsizei n, GLuint *ids)
+{
+ d_4_5_Core->CreateQueries(target, n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ d_4_5_Core->CreateProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateSamplers(GLsizei n, GLuint *samplers)
+{
+ d_4_5_Core->CreateSamplers(n, samplers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)
+{
+ d_4_5_Core->GetVertexArrayIndexed64iv(vaobj, index, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetVertexArrayIndexediv(vaobj, index, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetVertexArrayiv(vaobj, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor)
+{
+ d_4_5_Core->VertexArrayBindingDivisor(vaobj, bindingindex, divisor);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayAttribLFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_5_Core->VertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayAttribIFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_5_Core->VertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayAttribFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
+{
+ d_4_5_Core->VertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex)
+{
+ d_4_5_Core->VertexArrayAttribBinding(vaobj, attribindex, bindingindex);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
+{
+ d_4_5_Core->VertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayVertexBuffer(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+{
+ d_4_5_Core->VertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
+{
+ d_4_5_Core->VertexArrayElementBuffer(vaobj, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEnableVertexArrayAttrib(GLuint vaobj, GLuint index)
+{
+ d_4_5_Core->EnableVertexArrayAttrib(vaobj, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDisableVertexArrayAttrib(GLuint vaobj, GLuint index)
+{
+ d_4_5_Core->DisableVertexArrayAttrib(vaobj, index);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateVertexArrays(GLsizei n, GLuint *arrays)
+{
+ d_4_5_Core->CreateVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetTextureParameteriv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
+{
+ d_4_5_Core->GetTextureParameterIuiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetTextureParameterIiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
+{
+ d_4_5_Core->GetTextureParameterfv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetTextureLevelParameteriv(texture, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureLevelParameterfv(GLuint texture, GLint level, GLenum pname, GLfloat *params)
+{
+ d_4_5_Core->GetTextureLevelParameterfv(texture, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetCompressedTextureImage(GLuint texture, GLint level, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetCompressedTextureImage(texture, level, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetTextureImage(texture, level, format, type, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBindTextureUnit(GLuint unit, GLuint texture)
+{
+ d_4_5_Core->BindTextureUnit(unit, texture);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGenerateTextureMipmap(GLuint texture)
+{
+ d_4_5_Core->GenerateTextureMipmap(texture);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureParameteriv(GLuint texture, GLenum pname, const GLint *param)
+{
+ d_4_5_Core->TextureParameteriv(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
+{
+ d_4_5_Core->TextureParameterIuiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
+{
+ d_4_5_Core->TextureParameterIiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureParameteri(GLuint texture, GLenum pname, GLint param)
+{
+ d_4_5_Core->TextureParameteri(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param)
+{
+ d_4_5_Core->TextureParameterfv(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureParameterf(GLuint texture, GLenum pname, GLfloat param)
+{
+ d_4_5_Core->TextureParameterf(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->CopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->CopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ d_4_5_Core->CopyTextureSubImage1D(texture, level, xoffset, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_4_5_Core->CompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_4_5_Core->CompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_4_5_Core->CompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
+{
+ d_4_5_Core->TextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_4_5_Core->TextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
+{
+ d_4_5_Core->TextureSubImage1D(texture, level, xoffset, width, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureStorage3DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_4_5_Core->TextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureStorage2DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_4_5_Core->TextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_5_Core->TextureStorage3D(texture, levels, internalformat, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->TextureStorage2D(texture, levels, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width)
+{
+ d_4_5_Core->TextureStorage1D(texture, levels, internalformat, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size)
+{
+ d_4_5_Core->TextureBufferRange(texture, internalformat, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer)
+{
+ d_4_5_Core->TextureBuffer(texture, internalformat, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateTextures(GLenum target, GLsizei n, GLuint *textures)
+{
+ d_4_5_Core->CreateTextures(target, n, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetNamedRenderbufferParameteriv(renderbuffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->NamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->NamedRenderbufferStorage(renderbuffer, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ d_4_5_Core->CreateRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetNamedFramebufferParameteriv(framebuffer, pname, param);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Compatibility::glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
+{
+ return d_4_5_Core->CheckNamedFramebufferStatus(framebuffer, target);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ d_4_5_Core->BlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil)
+{
+ d_4_5_Core->ClearNamedFramebufferfi(framebuffer, buffer, depth, stencil);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ d_4_5_Core->ClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ d_4_5_Core->ClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ d_4_5_Core->ClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->InvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInvalidateNamedFramebufferData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments)
+{
+ d_4_5_Core->InvalidateNamedFramebufferData(framebuffer, numAttachments, attachments);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
+{
+ d_4_5_Core->NamedFramebufferReadBuffer(framebuffer, src);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs)
+{
+ d_4_5_Core->NamedFramebufferDrawBuffers(framebuffer, n, bufs);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
+{
+ d_4_5_Core->NamedFramebufferDrawBuffer(framebuffer, buf);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ d_4_5_Core->NamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level)
+{
+ d_4_5_Core->NamedFramebufferTexture(framebuffer, attachment, texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param)
+{
+ d_4_5_Core->NamedFramebufferParameteri(framebuffer, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ d_4_5_Core->NamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ d_4_5_Core->CreateFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, void *data)
+{
+ d_4_5_Core->GetNamedBufferSubData(buffer, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedBufferPointerv(GLuint buffer, GLenum pname, void * *params)
+{
+ d_4_5_Core->GetNamedBufferPointerv(buffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params)
+{
+ d_4_5_Core->GetNamedBufferParameteri64v(buffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetNamedBufferParameteriv(buffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length)
+{
+ d_4_5_Core->FlushMappedNamedBufferRange(buffer, offset, length);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glUnmapNamedBuffer(GLuint buffer)
+{
+ return d_4_5_Core->UnmapNamedBuffer(buffer);
+}
+
+inline void * QOpenGLFunctions_4_5_Compatibility::glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access)
+{
+ return d_4_5_Core->MapNamedBufferRange(buffer, offset, length, access);
+}
+
+inline void * QOpenGLFunctions_4_5_Compatibility::glMapNamedBuffer(GLuint buffer, GLenum access)
+{
+ return d_4_5_Core->MapNamedBuffer(buffer, access);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data)
+{
+ d_4_5_Core->ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearNamedBufferData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data)
+{
+ d_4_5_Core->ClearNamedBufferData(buffer, internalformat, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size)
+{
+ d_4_5_Core->CopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, const void *data)
+{
+ d_4_5_Core->NamedBufferSubData(buffer, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedBufferData(GLuint buffer, GLsizei size, const void *data, GLenum usage)
+{
+ d_4_5_Core->NamedBufferData(buffer, size, data, usage);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNamedBufferStorage(GLuint buffer, GLsizei size, const void *data, GLbitfield flags)
+{
+ d_4_5_Core->NamedBufferStorage(buffer, size, data, flags);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateBuffers(GLsizei n, GLuint *buffers)
+{
+ d_4_5_Core->CreateBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)
+{
+ d_4_5_Core->GetTransformFeedbacki64_v(xfb, pname, index, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param)
+{
+ d_4_5_Core->GetTransformFeedbacki_v(xfb, pname, index, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetTransformFeedbackiv(xfb, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size)
+{
+ d_4_5_Core->TransformFeedbackBufferRange(xfb, index, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
+{
+ d_4_5_Core->TransformFeedbackBufferBase(xfb, index, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCreateTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ d_4_5_Core->CreateTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClipControl(GLenum origin, GLenum depth)
+{
+ d_4_5_Core->ClipControl(origin, depth);
+}
+
+
+// OpenGL 1.0 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glTranslatef(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Translatef(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTranslated(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Translated(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glScalef(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Scalef(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glScaled(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Scaled(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Rotatef(angle, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Rotated(angle, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPushMatrix()
+{
+ d_1_0_Deprecated->PushMatrix();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPopMatrix()
+{
+ d_1_0_Deprecated->PopMatrix();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ d_1_0_Deprecated->Ortho(left, right, bottom, top, zNear, zFar);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultMatrixd(const GLdouble *m)
+{
+ d_1_0_Deprecated->MultMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultMatrixf(const GLfloat *m)
+{
+ d_1_0_Deprecated->MultMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMatrixMode(GLenum mode)
+{
+ d_1_0_Deprecated->MatrixMode(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLoadMatrixd(const GLdouble *m)
+{
+ d_1_0_Deprecated->LoadMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLoadMatrixf(const GLfloat *m)
+{
+ d_1_0_Deprecated->LoadMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLoadIdentity()
+{
+ d_1_0_Deprecated->LoadIdentity();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
+{
+ d_1_0_Deprecated->Frustum(left, right, bottom, top, zNear, zFar);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glIsList(GLuint list)
+{
+ return d_1_0_Deprecated->IsList(list);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetTexGeniv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetTexGenfv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
+{
+ d_1_0_Deprecated->GetTexGendv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexEnviv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetTexEnviv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetTexEnvfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetPolygonStipple(GLubyte *mask)
+{
+ d_1_0_Deprecated->GetPolygonStipple(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetPixelMapusv(GLenum map, GLushort *values)
+{
+ d_1_0_Deprecated->GetPixelMapusv(map, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetPixelMapuiv(GLenum map, GLuint *values)
+{
+ d_1_0_Deprecated->GetPixelMapuiv(map, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetPixelMapfv(GLenum map, GLfloat *values)
+{
+ d_1_0_Deprecated->GetPixelMapfv(map, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMaterialiv(GLenum face, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetMaterialiv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetMaterialfv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMapiv(GLenum target, GLenum query, GLint *v)
+{
+ d_1_0_Deprecated->GetMapiv(target, query, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMapfv(GLenum target, GLenum query, GLfloat *v)
+{
+ d_1_0_Deprecated->GetMapfv(target, query, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMapdv(GLenum target, GLenum query, GLdouble *v)
+{
+ d_1_0_Deprecated->GetMapdv(target, query, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetLightiv(GLenum light, GLenum pname, GLint *params)
+{
+ d_1_0_Deprecated->GetLightiv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
+{
+ d_1_0_Deprecated->GetLightfv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetClipPlane(GLenum plane, GLdouble *equation)
+{
+ d_1_0_Deprecated->GetClipPlane(plane, equation);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Deprecated->DrawPixels(width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
+{
+ d_1_0_Deprecated->CopyPixels(x, y, width, height, type);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
+{
+ d_1_0_Deprecated->PixelMapusv(map, mapsize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
+{
+ d_1_0_Deprecated->PixelMapuiv(map, mapsize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
+{
+ d_1_0_Deprecated->PixelMapfv(map, mapsize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelTransferi(GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->PixelTransferi(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelTransferf(GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->PixelTransferf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPixelZoom(GLfloat xfactor, GLfloat yfactor)
+{
+ d_1_0_Deprecated->PixelZoom(xfactor, yfactor);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glAlphaFunc(GLenum func, GLfloat ref)
+{
+ d_1_0_Deprecated->AlphaFunc(func, ref);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalPoint2(GLint i, GLint j)
+{
+ d_1_0_Deprecated->EvalPoint2(i, j);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+{
+ d_1_0_Deprecated->EvalMesh2(mode, i1, i2, j1, j2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalPoint1(GLint i)
+{
+ d_1_0_Deprecated->EvalPoint1(i);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalMesh1(GLenum mode, GLint i1, GLint i2)
+{
+ d_1_0_Deprecated->EvalMesh1(mode, i1, i2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord2fv(const GLfloat *u)
+{
+ d_1_0_Deprecated->EvalCoord2fv(u);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord2f(GLfloat u, GLfloat v)
+{
+ d_1_0_Deprecated->EvalCoord2f(u, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord2dv(const GLdouble *u)
+{
+ d_1_0_Deprecated->EvalCoord2dv(u);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord2d(GLdouble u, GLdouble v)
+{
+ d_1_0_Deprecated->EvalCoord2d(u, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord1fv(const GLfloat *u)
+{
+ d_1_0_Deprecated->EvalCoord1fv(u);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord1f(GLfloat u)
+{
+ d_1_0_Deprecated->EvalCoord1f(u);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord1dv(const GLdouble *u)
+{
+ d_1_0_Deprecated->EvalCoord1dv(u);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEvalCoord1d(GLdouble u)
+{
+ d_1_0_Deprecated->EvalCoord1d(u);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
+{
+ d_1_0_Deprecated->MapGrid2f(un, u1, u2, vn, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
+{
+ d_1_0_Deprecated->MapGrid2d(un, u1, u2, vn, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
+{
+ d_1_0_Deprecated->MapGrid1f(un, u1, u2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
+{
+ d_1_0_Deprecated->MapGrid1d(un, u1, u2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
+{
+ d_1_0_Deprecated->Map2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
+{
+ d_1_0_Deprecated->Map2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
+{
+ d_1_0_Deprecated->Map1f(target, u1, u2, stride, order, points);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
+{
+ d_1_0_Deprecated->Map1d(target, u1, u2, stride, order, points);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPushAttrib(GLbitfield mask)
+{
+ d_1_0_Deprecated->PushAttrib(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPopAttrib()
+{
+ d_1_0_Deprecated->PopAttrib();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glAccum(GLenum op, GLfloat value)
+{
+ d_1_0_Deprecated->Accum(op, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexMask(GLuint mask)
+{
+ d_1_0_Deprecated->IndexMask(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearIndex(GLfloat c)
+{
+ d_1_0_Deprecated->ClearIndex(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Deprecated->ClearAccum(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPushName(GLuint name)
+{
+ d_1_0_Deprecated->PushName(name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPopName()
+{
+ d_1_0_Deprecated->PopName();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPassThrough(GLfloat token)
+{
+ d_1_0_Deprecated->PassThrough(token);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLoadName(GLuint name)
+{
+ d_1_0_Deprecated->LoadName(name);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInitNames()
+{
+ d_1_0_Deprecated->InitNames();
+}
+
+inline GLint QOpenGLFunctions_4_5_Compatibility::glRenderMode(GLenum mode)
+{
+ return d_1_0_Deprecated->RenderMode(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSelectBuffer(GLsizei size, GLuint *buffer)
+{
+ d_1_0_Deprecated->SelectBuffer(size, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
+{
+ d_1_0_Deprecated->FeedbackBuffer(size, type, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexGeniv(GLenum coord, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->TexGeniv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexGeni(GLenum coord, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->TexGeni(coord, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->TexGenfv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexGenf(GLenum coord, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->TexGenf(coord, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
+{
+ d_1_0_Deprecated->TexGendv(coord, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexGend(GLenum coord, GLenum pname, GLdouble param)
+{
+ d_1_0_Deprecated->TexGend(coord, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexEnviv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->TexEnviv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexEnvi(GLenum target, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->TexEnvi(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->TexEnvfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexEnvf(GLenum target, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->TexEnvf(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glShadeModel(GLenum mode)
+{
+ d_1_0_Deprecated->ShadeModel(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPolygonStipple(const GLubyte *mask)
+{
+ d_1_0_Deprecated->PolygonStipple(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMaterialiv(GLenum face, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->Materialiv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMateriali(GLenum face, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->Materiali(face, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->Materialfv(face, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMaterialf(GLenum face, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->Materialf(face, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLineStipple(GLint factor, GLushort pattern)
+{
+ d_1_0_Deprecated->LineStipple(factor, pattern);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightModeliv(GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->LightModeliv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightModeli(GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->LightModeli(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightModelfv(GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->LightModelfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightModelf(GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->LightModelf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightiv(GLenum light, GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->Lightiv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLighti(GLenum light, GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->Lighti(light, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightfv(GLenum light, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->Lightfv(light, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLightf(GLenum light, GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->Lightf(light, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogiv(GLenum pname, const GLint *params)
+{
+ d_1_0_Deprecated->Fogiv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogi(GLenum pname, GLint param)
+{
+ d_1_0_Deprecated->Fogi(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogfv(GLenum pname, const GLfloat *params)
+{
+ d_1_0_Deprecated->Fogfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogf(GLenum pname, GLfloat param)
+{
+ d_1_0_Deprecated->Fogf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorMaterial(GLenum face, GLenum mode)
+{
+ d_1_0_Deprecated->ColorMaterial(face, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClipPlane(GLenum plane, const GLdouble *equation)
+{
+ d_1_0_Deprecated->ClipPlane(plane, equation);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Vertex4sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_1_0_Deprecated->Vertex4s(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4iv(const GLint *v)
+{
+ d_1_0_Deprecated->Vertex4iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4i(GLint x, GLint y, GLint z, GLint w)
+{
+ d_1_0_Deprecated->Vertex4i(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Vertex4fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_1_0_Deprecated->Vertex4f(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Vertex4dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_1_0_Deprecated->Vertex4d(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Vertex3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3s(GLshort x, GLshort y, GLshort z)
+{
+ d_1_0_Deprecated->Vertex3s(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3iv(const GLint *v)
+{
+ d_1_0_Deprecated->Vertex3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3i(GLint x, GLint y, GLint z)
+{
+ d_1_0_Deprecated->Vertex3i(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Vertex3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->Vertex3f(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Vertex3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->Vertex3d(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Vertex2sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2s(GLshort x, GLshort y)
+{
+ d_1_0_Deprecated->Vertex2s(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2iv(const GLint *v)
+{
+ d_1_0_Deprecated->Vertex2iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2i(GLint x, GLint y)
+{
+ d_1_0_Deprecated->Vertex2i(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Vertex2fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2f(GLfloat x, GLfloat y)
+{
+ d_1_0_Deprecated->Vertex2f(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Vertex2dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertex2d(GLdouble x, GLdouble y)
+{
+ d_1_0_Deprecated->Vertex2d(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord4sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ d_1_0_Deprecated->TexCoord4s(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord4iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
+{
+ d_1_0_Deprecated->TexCoord4i(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord4fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ d_1_0_Deprecated->TexCoord4f(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord4dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ d_1_0_Deprecated->TexCoord4d(s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3s(GLshort s, GLshort t, GLshort r)
+{
+ d_1_0_Deprecated->TexCoord3s(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3i(GLint s, GLint t, GLint r)
+{
+ d_1_0_Deprecated->TexCoord3i(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
+{
+ d_1_0_Deprecated->TexCoord3f(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
+{
+ d_1_0_Deprecated->TexCoord3d(s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord2sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2s(GLshort s, GLshort t)
+{
+ d_1_0_Deprecated->TexCoord2s(s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord2iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2i(GLint s, GLint t)
+{
+ d_1_0_Deprecated->TexCoord2i(s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord2fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2f(GLfloat s, GLfloat t)
+{
+ d_1_0_Deprecated->TexCoord2f(s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord2dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord2d(GLdouble s, GLdouble t)
+{
+ d_1_0_Deprecated->TexCoord2d(s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1sv(const GLshort *v)
+{
+ d_1_0_Deprecated->TexCoord1sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1s(GLshort s)
+{
+ d_1_0_Deprecated->TexCoord1s(s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1iv(const GLint *v)
+{
+ d_1_0_Deprecated->TexCoord1iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1i(GLint s)
+{
+ d_1_0_Deprecated->TexCoord1i(s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->TexCoord1fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1f(GLfloat s)
+{
+ d_1_0_Deprecated->TexCoord1f(s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->TexCoord1dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoord1d(GLdouble s)
+{
+ d_1_0_Deprecated->TexCoord1d(s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRectsv(const GLshort *v1, const GLshort *v2)
+{
+ d_1_0_Deprecated->Rectsv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+{
+ d_1_0_Deprecated->Rects(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRectiv(const GLint *v1, const GLint *v2)
+{
+ d_1_0_Deprecated->Rectiv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
+{
+ d_1_0_Deprecated->Recti(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRectfv(const GLfloat *v1, const GLfloat *v2)
+{
+ d_1_0_Deprecated->Rectfv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+{
+ d_1_0_Deprecated->Rectf(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRectdv(const GLdouble *v1, const GLdouble *v2)
+{
+ d_1_0_Deprecated->Rectdv(v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ d_1_0_Deprecated->Rectd(x1, y1, x2, y2);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->RasterPos4sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_1_0_Deprecated->RasterPos4s(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4iv(const GLint *v)
+{
+ d_1_0_Deprecated->RasterPos4iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
+{
+ d_1_0_Deprecated->RasterPos4i(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->RasterPos4fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_1_0_Deprecated->RasterPos4f(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->RasterPos4dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_1_0_Deprecated->RasterPos4d(x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->RasterPos3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3s(GLshort x, GLshort y, GLshort z)
+{
+ d_1_0_Deprecated->RasterPos3s(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3iv(const GLint *v)
+{
+ d_1_0_Deprecated->RasterPos3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3i(GLint x, GLint y, GLint z)
+{
+ d_1_0_Deprecated->RasterPos3i(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->RasterPos3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_0_Deprecated->RasterPos3f(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->RasterPos3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_0_Deprecated->RasterPos3d(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2sv(const GLshort *v)
+{
+ d_1_0_Deprecated->RasterPos2sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2s(GLshort x, GLshort y)
+{
+ d_1_0_Deprecated->RasterPos2s(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2iv(const GLint *v)
+{
+ d_1_0_Deprecated->RasterPos2iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2i(GLint x, GLint y)
+{
+ d_1_0_Deprecated->RasterPos2i(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->RasterPos2fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2f(GLfloat x, GLfloat y)
+{
+ d_1_0_Deprecated->RasterPos2f(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->RasterPos2dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glRasterPos2d(GLdouble x, GLdouble y)
+{
+ d_1_0_Deprecated->RasterPos2d(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Normal3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3s(GLshort nx, GLshort ny, GLshort nz)
+{
+ d_1_0_Deprecated->Normal3s(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3iv(const GLint *v)
+{
+ d_1_0_Deprecated->Normal3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3i(GLint nx, GLint ny, GLint nz)
+{
+ d_1_0_Deprecated->Normal3i(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Normal3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
+{
+ d_1_0_Deprecated->Normal3f(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Normal3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
+{
+ d_1_0_Deprecated->Normal3d(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3bv(const GLbyte *v)
+{
+ d_1_0_Deprecated->Normal3bv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
+{
+ d_1_0_Deprecated->Normal3b(nx, ny, nz);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexsv(const GLshort *c)
+{
+ d_1_0_Deprecated->Indexsv(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexs(GLshort c)
+{
+ d_1_0_Deprecated->Indexs(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexiv(const GLint *c)
+{
+ d_1_0_Deprecated->Indexiv(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexi(GLint c)
+{
+ d_1_0_Deprecated->Indexi(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexfv(const GLfloat *c)
+{
+ d_1_0_Deprecated->Indexfv(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexf(GLfloat c)
+{
+ d_1_0_Deprecated->Indexf(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexdv(const GLdouble *c)
+{
+ d_1_0_Deprecated->Indexdv(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexd(GLdouble c)
+{
+ d_1_0_Deprecated->Indexd(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEnd()
+{
+ d_1_0_Deprecated->End();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEdgeFlagv(const GLboolean *flag)
+{
+ d_1_0_Deprecated->EdgeFlagv(flag);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEdgeFlag(GLboolean flag)
+{
+ d_1_0_Deprecated->EdgeFlag(flag);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4usv(const GLushort *v)
+{
+ d_1_0_Deprecated->Color4usv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
+{
+ d_1_0_Deprecated->Color4us(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4uiv(const GLuint *v)
+{
+ d_1_0_Deprecated->Color4uiv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ d_1_0_Deprecated->Color4ui(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4ubv(const GLubyte *v)
+{
+ d_1_0_Deprecated->Color4ubv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+{
+ d_1_0_Deprecated->Color4ub(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Color4sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
+{
+ d_1_0_Deprecated->Color4s(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4iv(const GLint *v)
+{
+ d_1_0_Deprecated->Color4iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ d_1_0_Deprecated->Color4i(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Color4fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Deprecated->Color4f(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Color4dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
+{
+ d_1_0_Deprecated->Color4d(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4bv(const GLbyte *v)
+{
+ d_1_0_Deprecated->Color4bv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
+{
+ d_1_0_Deprecated->Color4b(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3usv(const GLushort *v)
+{
+ d_1_0_Deprecated->Color3usv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3us(GLushort red, GLushort green, GLushort blue)
+{
+ d_1_0_Deprecated->Color3us(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3uiv(const GLuint *v)
+{
+ d_1_0_Deprecated->Color3uiv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3ui(GLuint red, GLuint green, GLuint blue)
+{
+ d_1_0_Deprecated->Color3ui(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3ubv(const GLubyte *v)
+{
+ d_1_0_Deprecated->Color3ubv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
+{
+ d_1_0_Deprecated->Color3ub(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3sv(const GLshort *v)
+{
+ d_1_0_Deprecated->Color3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3s(GLshort red, GLshort green, GLshort blue)
+{
+ d_1_0_Deprecated->Color3s(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3iv(const GLint *v)
+{
+ d_1_0_Deprecated->Color3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3i(GLint red, GLint green, GLint blue)
+{
+ d_1_0_Deprecated->Color3i(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3fv(const GLfloat *v)
+{
+ d_1_0_Deprecated->Color3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3f(GLfloat red, GLfloat green, GLfloat blue)
+{
+ d_1_0_Deprecated->Color3f(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3dv(const GLdouble *v)
+{
+ d_1_0_Deprecated->Color3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3d(GLdouble red, GLdouble green, GLdouble blue)
+{
+ d_1_0_Deprecated->Color3d(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3bv(const GLbyte *v)
+{
+ d_1_0_Deprecated->Color3bv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColor3b(GLbyte red, GLbyte green, GLbyte blue)
+{
+ d_1_0_Deprecated->Color3b(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
+{
+ d_1_0_Deprecated->Bitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glBegin(GLenum mode)
+{
+ d_1_0_Deprecated->Begin(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glListBase(GLuint base)
+{
+ d_1_0_Deprecated->ListBase(base);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Compatibility::glGenLists(GLsizei range)
+{
+ return d_1_0_Deprecated->GenLists(range);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDeleteLists(GLuint list, GLsizei range)
+{
+ d_1_0_Deprecated->DeleteLists(list, range);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCallLists(GLsizei n, GLenum type, const void *lists)
+{
+ d_1_0_Deprecated->CallLists(n, type, lists);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCallList(GLuint list)
+{
+ d_1_0_Deprecated->CallList(list);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEndList()
+{
+ d_1_0_Deprecated->EndList();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNewList(GLuint list, GLenum mode)
+{
+ d_1_0_Deprecated->NewList(list, mode);
+}
+
+
+// OpenGL 1.1 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glPushClientAttrib(GLbitfield mask)
+{
+ d_1_1_Deprecated->PushClientAttrib(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPopClientAttrib()
+{
+ d_1_1_Deprecated->PopClientAttrib();
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexubv(const GLubyte *c)
+{
+ d_1_1_Deprecated->Indexubv(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexub(GLubyte c)
+{
+ d_1_1_Deprecated->Indexub(c);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities)
+{
+ d_1_1_Deprecated->PrioritizeTextures(n, textures, priorities);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Compatibility::glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
+{
+ return d_1_1_Deprecated->AreTexturesResident(n, textures, residences);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->VertexPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->TexCoordPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormalPointer(GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->NormalPointer(type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glInterleavedArrays(GLenum format, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->InterleavedArrays(format, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetPointerv(GLenum pname, void * *params)
+{
+ d_1_1_Deprecated->GetPointerv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glIndexPointer(GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->IndexPointer(type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEnableClientState(GLenum array)
+{
+ d_1_1_Deprecated->EnableClientState(array);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glEdgeFlagPointer(GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->EdgeFlagPointer(stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glDisableClientState(GLenum array)
+{
+ d_1_1_Deprecated->DisableClientState(array);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_1_Deprecated->ColorPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glArrayElement(GLint i)
+{
+ d_1_1_Deprecated->ArrayElement(i);
+}
+
+
+// OpenGL 1.2 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table)
+{
+ d_1_2_Deprecated->ColorTable(target, internalformat, width, format, type, table);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_2_Deprecated->ColorTableParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_2_Deprecated->ColorTableParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ d_1_2_Deprecated->CopyColorTable(target, internalformat, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetColorTable(GLenum target, GLenum format, GLenum type, void *table)
+{
+ d_1_2_Deprecated->GetColorTable(target, format, type, table);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetColorTableParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetColorTableParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data)
+{
+ d_1_2_Deprecated->ColorSubTable(target, start, count, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
+{
+ d_1_2_Deprecated->CopyColorSubTable(target, start, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image)
+{
+ d_1_2_Deprecated->ConvolutionFilter1D(target, internalformat, width, format, type, image);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image)
+{
+ d_1_2_Deprecated->ConvolutionFilter2D(target, internalformat, width, height, format, type, image);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
+{
+ d_1_2_Deprecated->ConvolutionParameterf(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_2_Deprecated->ConvolutionParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
+{
+ d_1_2_Deprecated->ConvolutionParameteri(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_2_Deprecated->ConvolutionParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+{
+ d_1_2_Deprecated->CopyConvolutionFilter1D(target, internalformat, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_2_Deprecated->CopyConvolutionFilter2D(target, internalformat, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, void *image)
+{
+ d_1_2_Deprecated->GetConvolutionFilter(target, format, type, image);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetConvolutionParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetConvolutionParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetSeparableFilter(GLenum target, GLenum format, GLenum type, void *row, void *column, void *span)
+{
+ d_1_2_Deprecated->GetSeparableFilter(target, format, type, row, column, span);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column)
+{
+ d_1_2_Deprecated->SeparableFilter2D(target, internalformat, width, height, format, type, row, column);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values)
+{
+ d_1_2_Deprecated->GetHistogram(target, reset, format, type, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetHistogramParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetHistogramParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, void *values)
+{
+ d_1_2_Deprecated->GetMinmax(target, reset, format, type, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_2_Deprecated->GetMinmaxParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_2_Deprecated->GetMinmaxParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
+{
+ d_1_2_Deprecated->Histogram(target, width, internalformat, sink);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
+{
+ d_1_2_Deprecated->Minmax(target, internalformat, sink);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glResetHistogram(GLenum target)
+{
+ d_1_2_Deprecated->ResetHistogram(target);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glResetMinmax(GLenum target)
+{
+ d_1_2_Deprecated->ResetMinmax(target);
+}
+
+
+// OpenGL 1.3 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glMultTransposeMatrixd(const GLdouble *m)
+{
+ d_1_3_Deprecated->MultTransposeMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultTransposeMatrixf(const GLfloat *m)
+{
+ d_1_3_Deprecated->MultTransposeMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLoadTransposeMatrixd(const GLdouble *m)
+{
+ d_1_3_Deprecated->LoadTransposeMatrixd(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glLoadTransposeMatrixf(const GLfloat *m)
+{
+ d_1_3_Deprecated->LoadTransposeMatrixf(m);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ d_1_3_Deprecated->MultiTexCoord4s(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ d_1_3_Deprecated->MultiTexCoord4i(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ d_1_3_Deprecated->MultiTexCoord4f(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord4dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ d_1_3_Deprecated->MultiTexCoord4d(target, s, t, r, q);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ d_1_3_Deprecated->MultiTexCoord3s(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
+{
+ d_1_3_Deprecated->MultiTexCoord3i(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ d_1_3_Deprecated->MultiTexCoord3f(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord3dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ d_1_3_Deprecated->MultiTexCoord3d(target, s, t, r);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2s(GLenum target, GLshort s, GLshort t)
+{
+ d_1_3_Deprecated->MultiTexCoord2s(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2i(GLenum target, GLint s, GLint t)
+{
+ d_1_3_Deprecated->MultiTexCoord2i(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t)
+{
+ d_1_3_Deprecated->MultiTexCoord2f(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord2dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
+{
+ d_1_3_Deprecated->MultiTexCoord2d(target, s, t);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1sv(GLenum target, const GLshort *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1sv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1s(GLenum target, GLshort s)
+{
+ d_1_3_Deprecated->MultiTexCoord1s(target, s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1iv(GLenum target, const GLint *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1iv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1i(GLenum target, GLint s)
+{
+ d_1_3_Deprecated->MultiTexCoord1i(target, s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1fv(GLenum target, const GLfloat *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1fv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1f(GLenum target, GLfloat s)
+{
+ d_1_3_Deprecated->MultiTexCoord1f(target, s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1dv(GLenum target, const GLdouble *v)
+{
+ d_1_3_Deprecated->MultiTexCoord1dv(target, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoord1d(GLenum target, GLdouble s)
+{
+ d_1_3_Deprecated->MultiTexCoord1d(target, s);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glClientActiveTexture(GLenum texture)
+{
+ d_1_3_Deprecated->ClientActiveTexture(texture);
+}
+
+
+// OpenGL 1.4 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3sv(const GLshort *v)
+{
+ d_1_4_Deprecated->WindowPos3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3s(GLshort x, GLshort y, GLshort z)
+{
+ d_1_4_Deprecated->WindowPos3s(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3iv(const GLint *v)
+{
+ d_1_4_Deprecated->WindowPos3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3i(GLint x, GLint y, GLint z)
+{
+ d_1_4_Deprecated->WindowPos3i(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3fv(const GLfloat *v)
+{
+ d_1_4_Deprecated->WindowPos3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3f(GLfloat x, GLfloat y, GLfloat z)
+{
+ d_1_4_Deprecated->WindowPos3f(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3dv(const GLdouble *v)
+{
+ d_1_4_Deprecated->WindowPos3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos3d(GLdouble x, GLdouble y, GLdouble z)
+{
+ d_1_4_Deprecated->WindowPos3d(x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2sv(const GLshort *v)
+{
+ d_1_4_Deprecated->WindowPos2sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2s(GLshort x, GLshort y)
+{
+ d_1_4_Deprecated->WindowPos2s(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2iv(const GLint *v)
+{
+ d_1_4_Deprecated->WindowPos2iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2i(GLint x, GLint y)
+{
+ d_1_4_Deprecated->WindowPos2i(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2fv(const GLfloat *v)
+{
+ d_1_4_Deprecated->WindowPos2fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2f(GLfloat x, GLfloat y)
+{
+ d_1_4_Deprecated->WindowPos2f(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2dv(const GLdouble *v)
+{
+ d_1_4_Deprecated->WindowPos2dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glWindowPos2d(GLdouble x, GLdouble y)
+{
+ d_1_4_Deprecated->WindowPos2d(x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_4_Deprecated->SecondaryColorPointer(size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3usv(const GLushort *v)
+{
+ d_1_4_Deprecated->SecondaryColor3usv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3us(GLushort red, GLushort green, GLushort blue)
+{
+ d_1_4_Deprecated->SecondaryColor3us(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3uiv(const GLuint *v)
+{
+ d_1_4_Deprecated->SecondaryColor3uiv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
+{
+ d_1_4_Deprecated->SecondaryColor3ui(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3ubv(const GLubyte *v)
+{
+ d_1_4_Deprecated->SecondaryColor3ubv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
+{
+ d_1_4_Deprecated->SecondaryColor3ub(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3sv(const GLshort *v)
+{
+ d_1_4_Deprecated->SecondaryColor3sv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3s(GLshort red, GLshort green, GLshort blue)
+{
+ d_1_4_Deprecated->SecondaryColor3s(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3iv(const GLint *v)
+{
+ d_1_4_Deprecated->SecondaryColor3iv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3i(GLint red, GLint green, GLint blue)
+{
+ d_1_4_Deprecated->SecondaryColor3i(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3fv(const GLfloat *v)
+{
+ d_1_4_Deprecated->SecondaryColor3fv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue)
+{
+ d_1_4_Deprecated->SecondaryColor3f(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3dv(const GLdouble *v)
+{
+ d_1_4_Deprecated->SecondaryColor3dv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
+{
+ d_1_4_Deprecated->SecondaryColor3d(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3bv(const GLbyte *v)
+{
+ d_1_4_Deprecated->SecondaryColor3bv(v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
+{
+ d_1_4_Deprecated->SecondaryColor3b(red, green, blue);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogCoordPointer(GLenum type, GLsizei stride, const void *pointer)
+{
+ d_1_4_Deprecated->FogCoordPointer(type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogCoorddv(const GLdouble *coord)
+{
+ d_1_4_Deprecated->FogCoorddv(coord);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogCoordd(GLdouble coord)
+{
+ d_1_4_Deprecated->FogCoordd(coord);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogCoordfv(const GLfloat *coord)
+{
+ d_1_4_Deprecated->FogCoordfv(coord);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glFogCoordf(GLfloat coord)
+{
+ d_1_4_Deprecated->FogCoordf(coord);
+}
+
+
+// OpenGL 1.5 deprecated functions
+
+// OpenGL 2.0 deprecated functions
+
+// OpenGL 2.1 deprecated functions
+
+// OpenGL 3.0 deprecated functions
+
+// OpenGL 3.1 deprecated functions
+
+// OpenGL 3.2 deprecated functions
+
+// OpenGL 3.3 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColorP3uiv(GLenum type, const GLuint *color)
+{
+ d_3_3_Deprecated->SecondaryColorP3uiv(type, color);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glSecondaryColorP3ui(GLenum type, GLuint color)
+{
+ d_3_3_Deprecated->SecondaryColorP3ui(type, color);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorP4uiv(GLenum type, const GLuint *color)
+{
+ d_3_3_Deprecated->ColorP4uiv(type, color);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorP4ui(GLenum type, GLuint color)
+{
+ d_3_3_Deprecated->ColorP4ui(type, color);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorP3uiv(GLenum type, const GLuint *color)
+{
+ d_3_3_Deprecated->ColorP3uiv(type, color);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glColorP3ui(GLenum type, GLuint color)
+{
+ d_3_3_Deprecated->ColorP3ui(type, color);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormalP3uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->NormalP3uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glNormalP3ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->NormalP3ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP4uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP4ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP3uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP3ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP2uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP2ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP1uiv(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->MultiTexCoordP1ui(texture, type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP4uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP4uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP4ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP4ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP3uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP3uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP3ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP3ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP2uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP2uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP2ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP2ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP1uiv(GLenum type, const GLuint *coords)
+{
+ d_3_3_Deprecated->TexCoordP1uiv(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glTexCoordP1ui(GLenum type, GLuint coords)
+{
+ d_3_3_Deprecated->TexCoordP1ui(type, coords);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexP4uiv(GLenum type, const GLuint *value)
+{
+ d_3_3_Deprecated->VertexP4uiv(type, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexP4ui(GLenum type, GLuint value)
+{
+ d_3_3_Deprecated->VertexP4ui(type, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexP3uiv(GLenum type, const GLuint *value)
+{
+ d_3_3_Deprecated->VertexP3uiv(type, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexP3ui(GLenum type, GLuint value)
+{
+ d_3_3_Deprecated->VertexP3ui(type, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexP2uiv(GLenum type, const GLuint *value)
+{
+ d_3_3_Deprecated->VertexP2uiv(type, value);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glVertexP2ui(GLenum type, GLuint value)
+{
+ d_3_3_Deprecated->VertexP2ui(type, value);
+}
+
+
+// OpenGL 4.0 deprecated functions
+
+// OpenGL 4.1 deprecated functions
+
+// OpenGL 4.2 deprecated functions
+
+// OpenGL 4.3 deprecated functions
+
+// OpenGL 4.4 deprecated functions
+
+// OpenGL 4.5 deprecated functions
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values)
+{
+ d_4_5_Deprecated->GetnMinmax(target, reset, format, type, bufSize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values)
+{
+ d_4_5_Deprecated->GetnHistogram(target, reset, format, type, bufSize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnSeparableFilter(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span)
+{
+ d_4_5_Deprecated->GetnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize, column, span);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnConvolutionFilter(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image)
+{
+ d_4_5_Deprecated->GetnConvolutionFilter(target, format, type, bufSize, image);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table)
+{
+ d_4_5_Deprecated->GetnColorTable(target, format, type, bufSize, table);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnPolygonStipple(GLsizei bufSize, GLubyte *pattern)
+{
+ d_4_5_Deprecated->GetnPolygonStipple(bufSize, pattern);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnPixelMapusv(GLenum map, GLsizei bufSize, GLushort *values)
+{
+ d_4_5_Deprecated->GetnPixelMapusv(map, bufSize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnPixelMapuiv(GLenum map, GLsizei bufSize, GLuint *values)
+{
+ d_4_5_Deprecated->GetnPixelMapuiv(map, bufSize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnPixelMapfv(GLenum map, GLsizei bufSize, GLfloat *values)
+{
+ d_4_5_Deprecated->GetnPixelMapfv(map, bufSize, values);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnMapiv(GLenum target, GLenum query, GLsizei bufSize, GLint *v)
+{
+ d_4_5_Deprecated->GetnMapiv(target, query, bufSize, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnMapfv(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)
+{
+ d_4_5_Deprecated->GetnMapfv(target, query, bufSize, v);
+}
+
+inline void QOpenGLFunctions_4_5_Compatibility::glGetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)
+{
+ d_4_5_Deprecated->GetnMapdv(target, query, bufSize, v);
+}
+
+
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+
+#endif
diff --git a/src/gui/opengl/qopenglfunctions_4_5_core.cpp b/src/gui/opengl/qopenglfunctions_4_5_core.cpp
new file mode 100644
index 0000000000..ce57ec51f2
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_5_core.cpp
@@ -0,0 +1,344 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#include "qopenglfunctions_4_5_core.h"
+#include "qopenglcontext.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QOpenGLFunctions_4_5_Core
+ \inmodule QtGui
+ \since 5.5
+ \wrapper
+ \brief The QOpenGLFunctions_4_5_Core class provides all functions for OpenGL 4.5 core profile.
+
+ This class is a wrapper for functions from OpenGL 4.5 core profile.
+ See reference pages on \l {http://www.opengl.org/sdk/docs/}{opengl.org}
+ for function documentation.
+
+ \sa QAbstractOpenGLFunctions
+*/
+
+QOpenGLFunctions_4_5_Core::QOpenGLFunctions_4_5_Core()
+ : QAbstractOpenGLFunctions()
+ , d_1_0_Core(0)
+ , d_1_1_Core(0)
+ , d_1_2_Core(0)
+ , d_1_3_Core(0)
+ , d_1_4_Core(0)
+ , d_1_5_Core(0)
+ , d_2_0_Core(0)
+ , d_2_1_Core(0)
+ , d_3_0_Core(0)
+ , d_3_1_Core(0)
+ , d_3_2_Core(0)
+ , d_3_3_Core(0)
+ , d_4_0_Core(0)
+ , d_4_1_Core(0)
+ , d_4_2_Core(0)
+ , d_4_3_Core(0)
+ , d_4_4_Core(0)
+ , d_4_5_Core(0)
+{
+}
+
+QOpenGLFunctions_4_5_Core::~QOpenGLFunctions_4_5_Core()
+{
+ if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ delete d_1_0_Core;
+ }
+ if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ delete d_1_1_Core;
+ }
+ if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ delete d_1_2_Core;
+ }
+ if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ delete d_1_3_Core;
+ }
+ if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ delete d_1_4_Core;
+ }
+ if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ delete d_1_5_Core;
+ }
+ if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ delete d_2_0_Core;
+ }
+ if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ delete d_2_1_Core;
+ }
+ if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ delete d_3_0_Core;
+ }
+ if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ delete d_3_1_Core;
+ }
+ if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ delete d_3_2_Core;
+ }
+ if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ delete d_3_3_Core;
+ }
+ if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ delete d_4_0_Core;
+ }
+ if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ delete d_4_1_Core;
+ }
+ if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ delete d_4_2_Core;
+ }
+ if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ delete d_4_3_Core;
+ }
+ if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ delete d_4_4_Core;
+ }
+ if (d_4_5_Core && !d_4_5_Core->refs.deref()) {
+ QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_5_Core->context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
+ delete d_4_5_Core;
+ }
+}
+
+bool QOpenGLFunctions_4_5_Core::initializeOpenGLFunctions()
+{
+ if ( isInitialized() )
+ return true;
+
+ QOpenGLContext* context = QOpenGLContext::currentContext();
+
+ // If owned by a context object make sure it is current.
+ // Also check that current context is capable of resolving all needed functions
+ if (((owningContext() && owningContext() == context) || !owningContext())
+ && QOpenGLFunctions_4_5_Core::isContextCompatible(context))
+ {
+ // Associate with private implementation, creating if necessary
+ // Function pointers in the backends are resolved at creation time
+ QOpenGLVersionFunctionsBackend* d = 0;
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
+ }
+ d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
+ }
+ d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
+ }
+ d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
+ }
+ d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
+ }
+ d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_1_5_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
+ }
+ d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
+ }
+ d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_2_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
+ }
+ d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
+ }
+ d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
+ }
+ d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
+ }
+ d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_3_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
+ }
+ d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_0_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
+ }
+ d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_1_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
+ }
+ d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_2_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
+ }
+ d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_3_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
+ }
+ d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_4_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
+ }
+ d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
+ d->refs.ref();
+
+ d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
+ if (!d) {
+ d = new QOpenGLFunctions_4_5_CoreBackend(context);
+ QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus(), d);
+ }
+ d_4_5_Core = static_cast<QOpenGLFunctions_4_5_CoreBackend*>(d);
+ d->refs.ref();
+
+ QAbstractOpenGLFunctions::initializeOpenGLFunctions();
+ }
+ return isInitialized();
+}
+
+bool QOpenGLFunctions_4_5_Core::isContextCompatible(QOpenGLContext *context)
+{
+ Q_ASSERT(context);
+ QSurfaceFormat f = context->format();
+ const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
+ if (v < qMakePair(4, 5))
+ return false;
+
+ return true;
+}
+
+QOpenGLVersionProfile QOpenGLFunctions_4_5_Core::versionProfile()
+{
+ QOpenGLVersionProfile v;
+ v.setVersion(4, 5);
+ v.setProfile(QSurfaceFormat::CoreProfile);
+ return v;
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglfunctions_4_5_core.h b/src/gui/opengl/qopenglfunctions_4_5_core.h
new file mode 100644
index 0000000000..8191f9da8e
--- /dev/null
+++ b/src/gui/opengl/qopenglfunctions_4_5_core.h
@@ -0,0 +1,4054 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtWidgets module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+**
+** This file was generated by glgen version 0.1
+** Command line was: glgen
+**
+** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
+**
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+**
+****************************************************************************/
+
+#ifndef QOPENGLVERSIONFUNCTIONS_4_5_CORE_H
+#define QOPENGLVERSIONFUNCTIONS_4_5_CORE_H
+
+#include <QtCore/qglobal.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+
+#include <QtGui/QOpenGLVersionFunctions>
+#include <QtGui/qopenglcontext.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QOpenGLFunctions_4_5_Core : public QAbstractOpenGLFunctions
+{
+public:
+ QOpenGLFunctions_4_5_Core();
+ ~QOpenGLFunctions_4_5_Core();
+
+ bool initializeOpenGLFunctions() Q_DECL_OVERRIDE;
+
+ // OpenGL 1.0 core functions
+ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glDepthRange(GLdouble nearVal, GLdouble farVal);
+ GLboolean glIsEnabled(GLenum cap);
+ void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
+ void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
+ void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
+ void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+ const GLubyte * glGetString(GLenum name);
+ void glGetIntegerv(GLenum pname, GLint *data);
+ void glGetFloatv(GLenum pname, GLfloat *data);
+ GLenum glGetError();
+ void glGetDoublev(GLenum pname, GLdouble *data);
+ void glGetBooleanv(GLenum pname, GLboolean *data);
+ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+ void glReadBuffer(GLenum src);
+ void glPixelStorei(GLenum pname, GLint param);
+ void glPixelStoref(GLenum pname, GLfloat param);
+ void glDepthFunc(GLenum func);
+ void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+ void glStencilFunc(GLenum func, GLint ref, GLuint mask);
+ void glLogicOp(GLenum opcode);
+ void glBlendFunc(GLenum sfactor, GLenum dfactor);
+ void glFlush();
+ void glFinish();
+ void glEnable(GLenum cap);
+ void glDisable(GLenum cap);
+ void glDepthMask(GLboolean flag);
+ void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+ void glStencilMask(GLuint mask);
+ void glClearDepth(GLdouble depth);
+ void glClearStencil(GLint s);
+ void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glClear(GLbitfield mask);
+ void glDrawBuffer(GLenum buf);
+ void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glTexParameteriv(GLenum target, GLenum pname, const GLint *params);
+ void glTexParameteri(GLenum target, GLenum pname, GLint param);
+ void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params);
+ void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+ void glPolygonMode(GLenum face, GLenum mode);
+ void glPointSize(GLfloat size);
+ void glLineWidth(GLfloat width);
+ void glHint(GLenum target, GLenum mode);
+ void glFrontFace(GLenum mode);
+ void glCullFace(GLenum mode);
+
+ // OpenGL 1.1 core functions
+ GLboolean glIsTexture(GLuint texture);
+ void glGenTextures(GLsizei n, GLuint *textures);
+ void glDeleteTextures(GLsizei n, const GLuint *textures);
+ void glBindTexture(GLenum target, GLuint texture);
+ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+ void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+ void glPolygonOffset(GLfloat factor, GLfloat units);
+ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
+ void glDrawArrays(GLenum mode, GLint first, GLsizei count);
+
+ // OpenGL 1.2 core functions
+ void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+ void glBlendEquation(GLenum mode);
+ void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+ void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+
+ // OpenGL 1.3 core functions
+ void glGetCompressedTexImage(GLenum target, GLint level, void *img);
+ void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+ void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+ void glSampleCoverage(GLfloat value, GLboolean invert);
+ void glActiveTexture(GLenum texture);
+
+ // OpenGL 1.4 core functions
+ void glPointParameteriv(GLenum pname, const GLint *params);
+ void glPointParameteri(GLenum pname, GLint param);
+ void glPointParameterfv(GLenum pname, const GLfloat *params);
+ void glPointParameterf(GLenum pname, GLfloat param);
+ void glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount);
+ void glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+ void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+
+ // OpenGL 1.5 core functions
+ void glGetBufferPointerv(GLenum target, GLenum pname, void * *params);
+ void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ GLboolean glUnmapBuffer(GLenum target);
+ void * glMapBuffer(GLenum target, GLenum access);
+ void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data);
+ void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+ void glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+ GLboolean glIsBuffer(GLuint buffer);
+ void glGenBuffers(GLsizei n, GLuint *buffers);
+ void glDeleteBuffers(GLsizei n, const GLuint *buffers);
+ void glBindBuffer(GLenum target, GLuint buffer);
+ void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
+ void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params);
+ void glGetQueryiv(GLenum target, GLenum pname, GLint *params);
+ void glEndQuery(GLenum target);
+ void glBeginQuery(GLenum target, GLuint id);
+ GLboolean glIsQuery(GLuint id);
+ void glDeleteQueries(GLsizei n, const GLuint *ids);
+ void glGenQueries(GLsizei n, GLuint *ids);
+
+ // OpenGL 2.0 core functions
+ void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+ void glVertexAttrib4usv(GLuint index, const GLushort *v);
+ void glVertexAttrib4uiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4sv(GLuint index, const GLshort *v);
+ void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+ void glVertexAttrib4iv(GLuint index, const GLint *v);
+ void glVertexAttrib4fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void glVertexAttrib4dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttrib4bv(GLuint index, const GLbyte *v);
+ void glVertexAttrib4Nusv(GLuint index, const GLushort *v);
+ void glVertexAttrib4Nuiv(GLuint index, const GLuint *v);
+ void glVertexAttrib4Nubv(GLuint index, const GLubyte *v);
+ void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+ void glVertexAttrib4Nsv(GLuint index, const GLshort *v);
+ void glVertexAttrib4Niv(GLuint index, const GLint *v);
+ void glVertexAttrib4Nbv(GLuint index, const GLbyte *v);
+ void glVertexAttrib3sv(GLuint index, const GLshort *v);
+ void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z);
+ void glVertexAttrib3fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+ void glVertexAttrib3dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttrib2sv(GLuint index, const GLshort *v);
+ void glVertexAttrib2s(GLuint index, GLshort x, GLshort y);
+ void glVertexAttrib2fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+ void glVertexAttrib2dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttrib1sv(GLuint index, const GLshort *v);
+ void glVertexAttrib1s(GLuint index, GLshort x);
+ void glVertexAttrib1fv(GLuint index, const GLfloat *v);
+ void glVertexAttrib1f(GLuint index, GLfloat x);
+ void glVertexAttrib1dv(GLuint index, const GLdouble *v);
+ void glVertexAttrib1d(GLuint index, GLdouble x);
+ void glValidateProgram(GLuint program);
+ void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniform4iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform3iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform2iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform1iv(GLint location, GLsizei count, const GLint *value);
+ void glUniform4fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform3fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform2fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform1fv(GLint location, GLsizei count, const GLfloat *value);
+ void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+ void glUniform2i(GLint location, GLint v0, GLint v1);
+ void glUniform1i(GLint location, GLint v0);
+ void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glUniform2f(GLint location, GLfloat v0, GLfloat v1);
+ void glUniform1f(GLint location, GLfloat v0);
+ void glUseProgram(GLuint program);
+ void glShaderSource(GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
+ void glLinkProgram(GLuint program);
+ GLboolean glIsShader(GLuint shader);
+ GLboolean glIsProgram(GLuint program);
+ void glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer);
+ void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params);
+ void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params);
+ void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params);
+ void glGetUniformiv(GLuint program, GLint location, GLint *params);
+ void glGetUniformfv(GLuint program, GLint location, GLfloat *params);
+ GLint glGetUniformLocation(GLuint program, const GLchar *name);
+ void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+ void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
+ void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glGetProgramiv(GLuint program, GLenum pname, GLint *params);
+ GLint glGetAttribLocation(GLuint program, const GLchar *name);
+ void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+ void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+ void glEnableVertexAttribArray(GLuint index);
+ void glDisableVertexAttribArray(GLuint index);
+ void glDetachShader(GLuint program, GLuint shader);
+ void glDeleteShader(GLuint shader);
+ void glDeleteProgram(GLuint program);
+ GLuint glCreateShader(GLenum type);
+ GLuint glCreateProgram();
+ void glCompileShader(GLuint shader);
+ void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name);
+ void glAttachShader(GLuint program, GLuint shader);
+ void glStencilMaskSeparate(GLenum face, GLuint mask);
+ void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+ void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+ void glDrawBuffers(GLsizei n, const GLenum *bufs);
+ void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+
+ // OpenGL 2.1 core functions
+ void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+
+ // OpenGL 3.0 core functions
+ GLboolean glIsVertexArray(GLuint array);
+ void glGenVertexArrays(GLsizei n, GLuint *arrays);
+ void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
+ void glBindVertexArray(GLuint array);
+ void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
+ void * glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+ void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void glGenerateMipmap(GLenum target);
+ void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
+ void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+ void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+ GLenum glCheckFramebufferStatus(GLenum target);
+ void glGenFramebuffers(GLsizei n, GLuint *framebuffers);
+ void glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers);
+ void glBindFramebuffer(GLenum target, GLuint framebuffer);
+ GLboolean glIsFramebuffer(GLuint framebuffer);
+ void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+ void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers);
+ void glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers);
+ void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+ GLboolean glIsRenderbuffer(GLuint renderbuffer);
+ const GLubyte * glGetStringi(GLenum name, GLuint index);
+ void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+ void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
+ void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params);
+ void glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params);
+ void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);
+ void glTexParameterIiv(GLenum target, GLenum pname, const GLint *params);
+ void glUniform4uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform3uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform2uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform1uiv(GLint location, GLsizei count, const GLuint *value);
+ void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glUniform2ui(GLint location, GLuint v0, GLuint v1);
+ void glUniform1ui(GLint location, GLuint v0);
+ GLint glGetFragDataLocation(GLuint program, const GLchar *name);
+ void glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name);
+ void glGetUniformuiv(GLuint program, GLint location, GLuint *params);
+ void glVertexAttribI4usv(GLuint index, const GLushort *v);
+ void glVertexAttribI4ubv(GLuint index, const GLubyte *v);
+ void glVertexAttribI4sv(GLuint index, const GLshort *v);
+ void glVertexAttribI4bv(GLuint index, const GLbyte *v);
+ void glVertexAttribI4uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI3uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI2uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI1uiv(GLuint index, const GLuint *v);
+ void glVertexAttribI4iv(GLuint index, const GLint *v);
+ void glVertexAttribI3iv(GLuint index, const GLint *v);
+ void glVertexAttribI2iv(GLuint index, const GLint *v);
+ void glVertexAttribI1iv(GLuint index, const GLint *v);
+ void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z);
+ void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y);
+ void glVertexAttribI1ui(GLuint index, GLuint x);
+ void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z);
+ void glVertexAttribI2i(GLuint index, GLint x, GLint y);
+ void glVertexAttribI1i(GLuint index, GLint x);
+ void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
+ void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
+ void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glEndConditionalRender();
+ void glBeginConditionalRender(GLuint id, GLenum mode);
+ void glClampColor(GLenum target, GLenum clamp);
+ void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+ void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
+ void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
+ void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glEndTransformFeedback();
+ void glBeginTransformFeedback(GLenum primitiveMode);
+ GLboolean glIsEnabledi(GLenum target, GLuint index);
+ void glDisablei(GLenum target, GLuint index);
+ void glEnablei(GLenum target, GLuint index);
+ void glGetIntegeri_v(GLenum target, GLuint index, GLint *data);
+ void glGetBooleani_v(GLenum target, GLuint index, GLboolean *data);
+ void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+
+ // OpenGL 3.1 core functions
+ void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+ void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+ void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+ GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
+ void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+ void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+ void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices);
+ void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+ void glPrimitiveRestartIndex(GLuint index);
+ void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer);
+ void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+ void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+
+ // OpenGL 3.2 core functions
+ void glSampleMaski(GLuint maskNumber, GLbitfield mask);
+ void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
+ void glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);
+ void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
+ void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
+ void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+ void glGetInteger64v(GLenum pname, GLint64 *data);
+ void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
+ void glDeleteSync(GLsync sync);
+ GLboolean glIsSync(GLsync sync);
+ GLsync glFenceSync(GLenum condition, GLbitfield flags);
+ void glProvokingVertex(GLenum mode);
+ void glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex);
+ void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
+ void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+ void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+
+ // OpenGL 3.3 core functions
+ void glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+ void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);
+ void glVertexAttribDivisor(GLuint index, GLuint divisor);
+ void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params);
+ void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params);
+ void glQueryCounter(GLuint id, GLenum target);
+ void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params);
+ void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
+ void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params);
+ void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
+ void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param);
+ void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
+ void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
+ void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
+ void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
+ void glBindSampler(GLuint unit, GLuint sampler);
+ GLboolean glIsSampler(GLuint sampler);
+ void glDeleteSamplers(GLsizei count, const GLuint *samplers);
+ void glGenSamplers(GLsizei count, GLuint *samplers);
+ GLint glGetFragDataIndex(GLuint program, const GLchar *name);
+ void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+
+ // OpenGL 4.0 core functions
+ void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params);
+ void glEndQueryIndexed(GLenum target, GLuint index);
+ void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id);
+ void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream);
+ void glDrawTransformFeedback(GLenum mode, GLuint id);
+ void glResumeTransformFeedback();
+ void glPauseTransformFeedback();
+ GLboolean glIsTransformFeedback(GLuint id);
+ void glGenTransformFeedbacks(GLsizei n, GLuint *ids);
+ void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
+ void glBindTransformFeedback(GLenum target, GLuint id);
+ void glPatchParameterfv(GLenum pname, const GLfloat *values);
+ void glPatchParameteri(GLenum pname, GLint value);
+ void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+ void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params);
+ void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices);
+ void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+ void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+ GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name);
+ GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name);
+ void glGetUniformdv(GLuint program, GLint location, GLdouble *params);
+ void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glUniform4dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform3dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform2dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform1dv(GLint location, GLsizei count, const GLdouble *value);
+ void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);
+ void glUniform2d(GLint location, GLdouble x, GLdouble y);
+ void glUniform1d(GLint location, GLdouble x);
+ void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
+ void glDrawArraysIndirect(GLenum mode, const void *indirect);
+ void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+ void glBlendFunci(GLuint buf, GLenum src, GLenum dst);
+ void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+ void glBlendEquationi(GLuint buf, GLenum mode);
+ void glMinSampleShading(GLfloat value);
+
+ // OpenGL 4.1 core functions
+ void glGetDoublei_v(GLenum target, GLuint index, GLdouble *data);
+ void glGetFloati_v(GLenum target, GLuint index, GLfloat *data);
+ void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f);
+ void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v);
+ void glScissorIndexedv(GLuint index, const GLint *v);
+ void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+ void glScissorArrayv(GLuint first, GLsizei count, const GLint *v);
+ void glViewportIndexedfv(GLuint index, const GLfloat *v);
+ void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+ void glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v);
+ void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params);
+ void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+ void glVertexAttribL4dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL3dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL2dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL1dv(GLuint index, const GLdouble *v);
+ void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y);
+ void glVertexAttribL1d(GLuint index, GLdouble x);
+ void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+ void glValidateProgramPipeline(GLuint pipeline);
+ void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+ void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+ void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+ void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+ void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+ void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+ void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+ void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+ void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+ void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+ void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
+ void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);
+ void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+ void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
+ void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
+ void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
+ void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);
+ void glProgramUniform1d(GLuint program, GLint location, GLdouble v0);
+ void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+ void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
+ void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);
+ void glProgramUniform1i(GLuint program, GLint location, GLint v0);
+ void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
+ GLboolean glIsProgramPipeline(GLuint pipeline);
+ void glGenProgramPipelines(GLsizei n, GLuint *pipelines);
+ void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
+ void glBindProgramPipeline(GLuint pipeline);
+ GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar* const *strings);
+ void glActiveShaderProgram(GLuint pipeline, GLuint program);
+ void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
+ void glProgramParameteri(GLuint program, GLenum pname, GLint value);
+ void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+ void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+ void glClearDepthf(GLfloat dd);
+ void glDepthRangef(GLfloat n, GLfloat f);
+ void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+ void glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+ void glReleaseShaderCompiler();
+
+ // OpenGL 4.2 core functions
+ void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
+ void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount);
+ void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+ void glMemoryBarrier(GLbitfield barriers);
+ void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+ void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
+ void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+ void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
+ void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
+ void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
+
+ // OpenGL 4.3 core functions
+ void glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label);
+ void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+ void glPopDebugGroup();
+ void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message);
+ GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+ void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
+ void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+ void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+ void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
+ void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
+ void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+ void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+ void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+ GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+ void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+ GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);
+ void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+ void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
+ void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+ void glInvalidateBufferData(GLuint buffer);
+ void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length);
+ void glInvalidateTexImage(GLuint texture, GLint level);
+ void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+ void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
+ void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
+ void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
+ void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+ void glDispatchComputeIndirect(GLintptr indirect);
+ void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+ void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+ void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+
+ // OpenGL 4.4 core functions
+ void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers);
+ void glBindTextures(GLuint first, GLsizei count, const GLuint *textures);
+ void glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
+ void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
+ void glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+ void glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
+ void glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
+
+ // OpenGL 4.5 core functions
+ void glTextureBarrier();
+ void glReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+ void glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+ void glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params);
+ void glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+ void glGetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+ void glGetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void glGetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels);
+ GLenum glGetGraphicsResetStatus();
+ void glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
+ void glGetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void glMemoryBarrierByRegion(GLbitfield barriers);
+ void glCreateQueries(GLenum target, GLsizei n, GLuint *ids);
+ void glCreateProgramPipelines(GLsizei n, GLuint *pipelines);
+ void glCreateSamplers(GLsizei n, GLuint *samplers);
+ void glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
+ void glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param);
+ void glGetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param);
+ void glVertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor);
+ void glVertexArrayAttribLFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexArrayAttribIFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void glVertexArrayAttribFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+ void glVertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void glVertexArrayVertexBuffer(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void glVertexArrayElementBuffer(GLuint vaobj, GLuint buffer);
+ void glEnableVertexArrayAttrib(GLuint vaobj, GLuint index);
+ void glDisableVertexArrayAttrib(GLuint vaobj, GLuint index);
+ void glCreateVertexArrays(GLsizei n, GLuint *arrays);
+ void glGetTextureParameteriv(GLuint texture, GLenum pname, GLint *params);
+ void glGetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params);
+ void glGetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params);
+ void glGetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params);
+ void glGetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint *params);
+ void glGetTextureLevelParameterfv(GLuint texture, GLint level, GLenum pname, GLfloat *params);
+ void glGetCompressedTextureImage(GLuint texture, GLint level, GLsizei bufSize, void *pixels);
+ void glGetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void glBindTextureUnit(GLuint unit, GLuint texture);
+ void glGenerateTextureMipmap(GLuint texture);
+ void glTextureParameteriv(GLuint texture, GLenum pname, const GLint *param);
+ void glTextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params);
+ void glTextureParameterIiv(GLuint texture, GLenum pname, const GLint *params);
+ void glTextureParameteri(GLuint texture, GLenum pname, GLint param);
+ void glTextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param);
+ void glTextureParameterf(GLuint texture, GLenum pname, GLfloat param);
+ void glCopyTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void glCompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void glCompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void glTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void glTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void glTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void glTextureStorage3DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void glTextureStorage2DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
+ void glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
+ void glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer);
+ void glCreateTextures(GLenum target, GLsizei n, GLuint *textures);
+ void glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params);
+ void glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void glNamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+ void glCreateRenderbuffers(GLsizei n, GLuint *renderbuffers);
+ void glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
+ void glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param);
+ GLenum glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target);
+ void glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil);
+ void glClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void glClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void glClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
+ void glInvalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void glInvalidateNamedFramebufferData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
+ void glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum src);
+ void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs);
+ void glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);
+ void glNamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void glNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+ void glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param);
+ void glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void glCreateFramebuffers(GLsizei n, GLuint *framebuffers);
+ void glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, void *data);
+ void glGetNamedBufferPointerv(GLuint buffer, GLenum pname, void * *params);
+ void glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params);
+ void glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params);
+ void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length);
+ GLboolean glUnmapNamedBuffer(GLuint buffer);
+ void * glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
+ void * glMapNamedBuffer(GLuint buffer, GLenum access);
+ void glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
+ void glClearNamedBufferData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+ void glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
+ void glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, const void *data);
+ void glNamedBufferData(GLuint buffer, GLsizei size, const void *data, GLenum usage);
+ void glNamedBufferStorage(GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
+ void glCreateBuffers(GLsizei n, GLuint *buffers);
+ void glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
+ void glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param);
+ void glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param);
+ void glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
+ void glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer);
+ void glCreateTransformFeedbacks(GLsizei n, GLuint *ids);
+ void glClipControl(GLenum origin, GLenum depth);
+
+private:
+ friend class QOpenGLContext;
+
+ static bool isContextCompatible(QOpenGLContext *context);
+ static QOpenGLVersionProfile versionProfile();
+
+ QOpenGLFunctions_1_0_CoreBackend* d_1_0_Core;
+ QOpenGLFunctions_1_1_CoreBackend* d_1_1_Core;
+ QOpenGLFunctions_1_2_CoreBackend* d_1_2_Core;
+ QOpenGLFunctions_1_3_CoreBackend* d_1_3_Core;
+ QOpenGLFunctions_1_4_CoreBackend* d_1_4_Core;
+ QOpenGLFunctions_1_5_CoreBackend* d_1_5_Core;
+ QOpenGLFunctions_2_0_CoreBackend* d_2_0_Core;
+ QOpenGLFunctions_2_1_CoreBackend* d_2_1_Core;
+ QOpenGLFunctions_3_0_CoreBackend* d_3_0_Core;
+ QOpenGLFunctions_3_1_CoreBackend* d_3_1_Core;
+ QOpenGLFunctions_3_2_CoreBackend* d_3_2_Core;
+ QOpenGLFunctions_3_3_CoreBackend* d_3_3_Core;
+ QOpenGLFunctions_4_0_CoreBackend* d_4_0_Core;
+ QOpenGLFunctions_4_1_CoreBackend* d_4_1_Core;
+ QOpenGLFunctions_4_2_CoreBackend* d_4_2_Core;
+ QOpenGLFunctions_4_3_CoreBackend* d_4_3_Core;
+ QOpenGLFunctions_4_4_CoreBackend* d_4_4_Core;
+ QOpenGLFunctions_4_5_CoreBackend* d_4_5_Core;
+};
+
+// OpenGL 1.0 core functions
+inline void QOpenGLFunctions_4_5_Core::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Viewport(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDepthRange(GLdouble nearVal, GLdouble farVal)
+{
+ d_1_0_Core->DepthRange(nearVal, farVal);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsEnabled(GLenum cap)
+{
+ return d_1_0_Core->IsEnabled(cap);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexLevelParameteriv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexLevelParameterfv(target, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_0_Core->GetTexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ d_1_0_Core->GetTexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->GetTexImage(target, level, format, type, pixels);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_5_Core::glGetString(GLenum name)
+{
+ return d_1_0_Core->GetString(name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetIntegerv(GLenum pname, GLint *data)
+{
+ d_1_0_Core->GetIntegerv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetFloatv(GLenum pname, GLfloat *data)
+{
+ d_1_0_Core->GetFloatv(pname, data);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Core::glGetError()
+{
+ return d_1_0_Core->GetError();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetDoublev(GLenum pname, GLdouble *data)
+{
+ d_1_0_Core->GetDoublev(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetBooleanv(GLenum pname, GLboolean *data)
+{
+ d_1_0_Core->GetBooleanv(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
+{
+ d_1_0_Core->ReadPixels(x, y, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glReadBuffer(GLenum src)
+{
+ d_1_0_Core->ReadBuffer(src);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPixelStorei(GLenum pname, GLint param)
+{
+ d_1_0_Core->PixelStorei(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPixelStoref(GLenum pname, GLfloat param)
+{
+ d_1_0_Core->PixelStoref(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDepthFunc(GLenum func)
+{
+ d_1_0_Core->DepthFunc(func);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+{
+ d_1_0_Core->StencilOp(fail, zfail, zpass);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glStencilFunc(GLenum func, GLint ref, GLuint mask)
+{
+ d_1_0_Core->StencilFunc(func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glLogicOp(GLenum opcode)
+{
+ d_1_0_Core->LogicOp(opcode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendFunc(GLenum sfactor, GLenum dfactor)
+{
+ d_1_0_Core->BlendFunc(sfactor, dfactor);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFlush()
+{
+ d_1_0_Core->Flush();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFinish()
+{
+ d_1_0_Core->Finish();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEnable(GLenum cap)
+{
+ d_1_0_Core->Enable(cap);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDisable(GLenum cap)
+{
+ d_1_0_Core->Disable(cap);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDepthMask(GLboolean flag)
+{
+ d_1_0_Core->DepthMask(flag);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+{
+ d_1_0_Core->ColorMask(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glStencilMask(GLuint mask)
+{
+ d_1_0_Core->StencilMask(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearDepth(GLdouble depth)
+{
+ d_1_0_Core->ClearDepth(depth);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearStencil(GLint s)
+{
+ d_1_0_Core->ClearStencil(s);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_0_Core->ClearColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClear(GLbitfield mask)
+{
+ d_1_0_Core->Clear(mask);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawBuffer(GLenum buf)
+{
+ d_1_0_Core->DrawBuffer(buf);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_0_Core->TexImage1D(target, level, internalformat, width, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_1_0_Core->TexParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_1_0_Core->TexParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ d_1_0_Core->TexParameterfv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ d_1_0_Core->TexParameterf(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_0_Core->Scissor(x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPolygonMode(GLenum face, GLenum mode)
+{
+ d_1_0_Core->PolygonMode(face, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPointSize(GLfloat size)
+{
+ d_1_0_Core->PointSize(size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glLineWidth(GLfloat width)
+{
+ d_1_0_Core->LineWidth(width);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glHint(GLenum target, GLenum mode)
+{
+ d_1_0_Core->Hint(target, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFrontFace(GLenum mode)
+{
+ d_1_0_Core->FrontFace(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCullFace(GLenum mode)
+{
+ d_1_0_Core->CullFace(mode);
+}
+
+
+// OpenGL 1.1 core functions
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsTexture(GLuint texture)
+{
+ return d_1_1_Core->IsTexture(texture);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenTextures(GLsizei n, GLuint *textures)
+{
+ d_1_1_Core->GenTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteTextures(GLsizei n, const GLuint *textures)
+{
+ d_1_1_Core->DeleteTextures(n, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindTexture(GLenum target, GLuint texture)
+{
+ d_1_1_Core->BindTexture(target, texture);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_1_Core->TexSubImage1D(target, level, xoffset, width, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_1_Core->CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ d_1_1_Core->CopyTexSubImage1D(target, level, xoffset, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+{
+ d_1_1_Core->CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+{
+ d_1_1_Core->CopyTexImage1D(target, level, internalformat, x, y, width, border);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPolygonOffset(GLfloat factor, GLfloat units)
+{
+ d_1_1_Core->PolygonOffset(factor, units);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_1_Core->DrawElements(mode, count, type, indices);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ d_1_1_Core->DrawArrays(mode, first, count);
+}
+
+
+// OpenGL 1.2 core functions
+inline void QOpenGLFunctions_4_5_Core::glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+{
+ d_1_2_Core->BlendColor(red, green, blue, alpha);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendEquation(GLenum mode)
+{
+ d_1_2_Core->BlendEquation(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_1_2_Core->CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels)
+{
+ d_1_2_Core->TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)
+{
+ d_1_2_Core->DrawRangeElements(mode, start, end, count, type, indices);
+}
+
+
+// OpenGL 1.3 core functions
+inline void QOpenGLFunctions_4_5_Core::glGetCompressedTexImage(GLenum target, GLint level, void *img)
+{
+ d_1_3_Core->GetCompressedTexImage(target, level, img);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage1D(target, level, internalformat, width, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
+{
+ d_1_3_Core->CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSampleCoverage(GLfloat value, GLboolean invert)
+{
+ d_1_3_Core->SampleCoverage(value, invert);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glActiveTexture(GLenum texture)
+{
+ d_1_3_Core->ActiveTexture(texture);
+}
+
+
+// OpenGL 1.4 core functions
+inline void QOpenGLFunctions_4_5_Core::glPointParameteriv(GLenum pname, const GLint *params)
+{
+ d_1_4_Core->PointParameteriv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPointParameteri(GLenum pname, GLint param)
+{
+ d_1_4_Core->PointParameteri(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPointParameterfv(GLenum pname, const GLfloat *params)
+{
+ d_1_4_Core->PointParameterfv(pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPointParameterf(GLenum pname, GLfloat param)
+{
+ d_1_4_Core->PointParameterf(pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawElements(mode, count, type, indices, drawcount);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMultiDrawArrays(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)
+{
+ d_1_4_Core->MultiDrawArrays(mode, first, count, drawcount);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
+{
+ d_1_4_Core->BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
+}
+
+
+// OpenGL 1.5 core functions
+inline void QOpenGLFunctions_4_5_Core::glGetBufferPointerv(GLenum target, GLenum pname, void * *params)
+{
+ d_1_5_Core->GetBufferPointerv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetBufferParameteriv(target, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glUnmapBuffer(GLenum target)
+{
+ return d_1_5_Core->UnmapBuffer(target);
+}
+
+inline void * QOpenGLFunctions_4_5_Core::glMapBuffer(GLenum target, GLenum access)
+{
+ return d_1_5_Core->MapBuffer(target, access);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
+{
+ d_1_5_Core->GetBufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
+{
+ d_1_5_Core->BufferSubData(target, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
+{
+ d_1_5_Core->BufferData(target, size, data, usage);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsBuffer(GLuint buffer)
+{
+ return d_1_5_Core->IsBuffer(buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenBuffers(GLsizei n, GLuint *buffers)
+{
+ d_1_5_Core->GenBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteBuffers(GLsizei n, const GLuint *buffers)
+{
+ d_1_5_Core->DeleteBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindBuffer(GLenum target, GLuint buffer)
+{
+ d_1_5_Core->BindBuffer(target, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
+{
+ d_1_5_Core->GetQueryObjectuiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryObjectiv(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetQueryiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_1_5_Core->GetQueryiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEndQuery(GLenum target)
+{
+ d_1_5_Core->EndQuery(target);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBeginQuery(GLenum target, GLuint id)
+{
+ d_1_5_Core->BeginQuery(target, id);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsQuery(GLuint id)
+{
+ return d_1_5_Core->IsQuery(id);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteQueries(GLsizei n, const GLuint *ids)
+{
+ d_1_5_Core->DeleteQueries(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenQueries(GLsizei n, GLuint *ids)
+{
+ d_1_5_Core->GenQueries(n, ids);
+}
+
+
+// OpenGL 2.0 core functions
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer)
+{
+ d_2_0_Core->VertexAttribPointer(index, size, type, normalized, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4usv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4uiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4ubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
+{
+ d_2_0_Core->VertexAttrib4s(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4iv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib4fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ d_2_0_Core->VertexAttrib4f(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_2_0_Core->VertexAttrib4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4bv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Nusv(GLuint index, const GLushort *v)
+{
+ d_2_0_Core->VertexAttrib4Nusv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Nuiv(GLuint index, const GLuint *v)
+{
+ d_2_0_Core->VertexAttrib4Nuiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Nubv(GLuint index, const GLubyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
+{
+ d_2_0_Core->VertexAttrib4Nub(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Nsv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib4Nsv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Niv(GLuint index, const GLint *v)
+{
+ d_2_0_Core->VertexAttrib4Niv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib4Nbv(GLuint index, const GLbyte *v)
+{
+ d_2_0_Core->VertexAttrib4Nbv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib3sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib3sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
+{
+ d_2_0_Core->VertexAttrib3s(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib3fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib3fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
+{
+ d_2_0_Core->VertexAttrib3f(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib3dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_2_0_Core->VertexAttrib3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib2sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib2sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib2s(GLuint index, GLshort x, GLshort y)
+{
+ d_2_0_Core->VertexAttrib2s(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib2fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib2fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
+{
+ d_2_0_Core->VertexAttrib2f(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib2dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_2_0_Core->VertexAttrib2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib1sv(GLuint index, const GLshort *v)
+{
+ d_2_0_Core->VertexAttrib1sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib1s(GLuint index, GLshort x)
+{
+ d_2_0_Core->VertexAttrib1s(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib1fv(GLuint index, const GLfloat *v)
+{
+ d_2_0_Core->VertexAttrib1fv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib1f(GLuint index, GLfloat x)
+{
+ d_2_0_Core->VertexAttrib1f(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib1dv(GLuint index, const GLdouble *v)
+{
+ d_2_0_Core->VertexAttrib1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttrib1d(GLuint index, GLdouble x)
+{
+ d_2_0_Core->VertexAttrib1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glValidateProgram(GLuint program)
+{
+ d_2_0_Core->ValidateProgram(program);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_0_Core->UniformMatrix2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform4iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform3iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform2iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1iv(GLint location, GLsizei count, const GLint *value)
+{
+ d_2_0_Core->Uniform1iv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform4fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform3fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform2fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1fv(GLint location, GLsizei count, const GLfloat *value)
+{
+ d_2_0_Core->Uniform1fv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_2_0_Core->Uniform4i(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3i(GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_2_0_Core->Uniform3i(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2i(GLint location, GLint v0, GLint v1)
+{
+ d_2_0_Core->Uniform2i(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1i(GLint location, GLint v0)
+{
+ d_2_0_Core->Uniform1i(location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_2_0_Core->Uniform4f(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_2_0_Core->Uniform3f(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2f(GLint location, GLfloat v0, GLfloat v1)
+{
+ d_2_0_Core->Uniform2f(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1f(GLint location, GLfloat v0)
+{
+ d_2_0_Core->Uniform1f(location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUseProgram(GLuint program)
+{
+ d_2_0_Core->UseProgram(program);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
+{
+ d_2_0_Core->ShaderSource(shader, count, string, length);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glLinkProgram(GLuint program)
+{
+ d_2_0_Core->LinkProgram(program);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsShader(GLuint shader)
+{
+ return d_2_0_Core->IsShader(shader);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsProgram(GLuint program)
+{
+ return d_2_0_Core->IsProgram(program);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribPointerv(GLuint index, GLenum pname, void * *pointer)
+{
+ d_2_0_Core->GetVertexAttribPointerv(index, pname, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetVertexAttribiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
+{
+ d_2_0_Core->GetVertexAttribfv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_2_0_Core->GetVertexAttribdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetUniformiv(GLuint program, GLint location, GLint *params)
+{
+ d_2_0_Core->GetUniformiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetUniformfv(GLuint program, GLint location, GLfloat *params)
+{
+ d_2_0_Core->GetUniformfv(program, location, params);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetUniformLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetUniformLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
+{
+ d_2_0_Core->GetShaderSource(shader, bufSize, length, source);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetShaderInfoLog(shader, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetShaderiv(shader, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_2_0_Core->GetProgramInfoLog(program, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramiv(GLuint program, GLenum pname, GLint *params)
+{
+ d_2_0_Core->GetProgramiv(program, pname, params);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetAttribLocation(GLuint program, const GLchar *name)
+{
+ return d_2_0_Core->GetAttribLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
+{
+ d_2_0_Core->GetAttachedShaders(program, maxCount, count, shaders);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveUniform(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
+{
+ d_2_0_Core->GetActiveAttrib(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEnableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->EnableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDisableVertexAttribArray(GLuint index)
+{
+ d_2_0_Core->DisableVertexAttribArray(index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDetachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->DetachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteShader(GLuint shader)
+{
+ d_2_0_Core->DeleteShader(shader);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteProgram(GLuint program)
+{
+ d_2_0_Core->DeleteProgram(program);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glCreateShader(GLenum type)
+{
+ return d_2_0_Core->CreateShader(type);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glCreateProgram()
+{
+ return d_2_0_Core->CreateProgram();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompileShader(GLuint shader)
+{
+ d_2_0_Core->CompileShader(shader);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindAttribLocation(GLuint program, GLuint index, const GLchar *name)
+{
+ d_2_0_Core->BindAttribLocation(program, index, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glAttachShader(GLuint program, GLuint shader)
+{
+ d_2_0_Core->AttachShader(program, shader);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glStencilMaskSeparate(GLenum face, GLuint mask)
+{
+ d_2_0_Core->StencilMaskSeparate(face, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
+{
+ d_2_0_Core->StencilFuncSeparate(face, func, ref, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
+{
+ d_2_0_Core->StencilOpSeparate(face, sfail, dpfail, dppass);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawBuffers(GLsizei n, const GLenum *bufs)
+{
+ d_2_0_Core->DrawBuffers(n, bufs);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
+{
+ d_2_0_Core->BlendEquationSeparate(modeRGB, modeAlpha);
+}
+
+
+// OpenGL 2.1 core functions
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x3fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix4x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x4fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix3x2fv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_2_1_Core->UniformMatrix2x3fv(location, count, transpose, value);
+}
+
+
+// OpenGL 3.0 core functions
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsVertexArray(GLuint array)
+{
+ return d_3_0_Core->IsVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenVertexArrays(GLsizei n, GLuint *arrays)
+{
+ d_3_0_Core->GenVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+{
+ d_3_0_Core->DeleteVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindVertexArray(GLuint array)
+{
+ d_3_0_Core->BindVertexArray(array);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
+{
+ d_3_0_Core->FlushMappedBufferRange(target, offset, length);
+}
+
+inline void * QOpenGLFunctions_4_5_Core::glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+{
+ return d_3_0_Core->MapBufferRange(target, offset, length, access);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ d_3_0_Core->FramebufferTextureLayer(target, attachment, texture, level, layer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ d_3_0_Core->BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenerateMipmap(GLenum target)
+{
+ d_3_0_Core->GenerateMipmap(target);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ d_3_0_Core->FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+{
+ d_3_0_Core->FramebufferTexture3D(target, attachment, textarget, texture, level, zoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture2D(target, attachment, textarget, texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+{
+ d_3_0_Core->FramebufferTexture1D(target, attachment, textarget, texture, level);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Core::glCheckFramebufferStatus(GLenum target)
+{
+ return d_3_0_Core->CheckFramebufferStatus(target);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ d_3_0_Core->GenFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
+{
+ d_3_0_Core->DeleteFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindFramebuffer(GLenum target, GLuint framebuffer)
+{
+ d_3_0_Core->BindFramebuffer(target, framebuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsFramebuffer(GLuint framebuffer)
+{
+ return d_3_0_Core->IsFramebuffer(framebuffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetRenderbufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_3_0_Core->RenderbufferStorage(target, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ d_3_0_Core->GenRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
+{
+ d_3_0_Core->DeleteRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
+{
+ d_3_0_Core->BindRenderbuffer(target, renderbuffer);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsRenderbuffer(GLuint renderbuffer)
+{
+ return d_3_0_Core->IsRenderbuffer(renderbuffer);
+}
+
+inline const GLubyte * QOpenGLFunctions_4_5_Core::glGetStringi(GLenum name, GLuint index)
+{
+ return d_3_0_Core->GetStringi(name, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
+{
+ d_3_0_Core->ClearBufferfi(buffer, drawbuffer, depth, stencil);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ d_3_0_Core->ClearBufferfv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ d_3_0_Core->ClearBufferuiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ d_3_0_Core->ClearBufferiv(buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetTexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetTexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ d_3_0_Core->TexParameterIuiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ d_3_0_Core->TexParameterIiv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform4uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform3uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform2uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1uiv(GLint location, GLsizei count, const GLuint *value)
+{
+ d_3_0_Core->Uniform1uiv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_3_0_Core->Uniform4ui(location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_3_0_Core->Uniform3ui(location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2ui(GLint location, GLuint v0, GLuint v1)
+{
+ d_3_0_Core->Uniform2ui(location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1ui(GLint location, GLuint v0)
+{
+ d_3_0_Core->Uniform1ui(location, v0);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetFragDataLocation(GLuint program, const GLchar *name)
+{
+ return d_3_0_Core->GetFragDataLocation(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindFragDataLocation(GLuint program, GLuint color, const GLchar *name)
+{
+ d_3_0_Core->BindFragDataLocation(program, color, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetUniformuiv(GLuint program, GLint location, GLuint *params)
+{
+ d_3_0_Core->GetUniformuiv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4usv(GLuint index, const GLushort *v)
+{
+ d_3_0_Core->VertexAttribI4usv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4ubv(GLuint index, const GLubyte *v)
+{
+ d_3_0_Core->VertexAttribI4ubv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4sv(GLuint index, const GLshort *v)
+{
+ d_3_0_Core->VertexAttribI4sv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4bv(GLuint index, const GLbyte *v)
+{
+ d_3_0_Core->VertexAttribI4bv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI4uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI3uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI3uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI2uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI2uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI1uiv(GLuint index, const GLuint *v)
+{
+ d_3_0_Core->VertexAttribI1uiv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI4iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI3iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI3iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI2iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI2iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI1iv(GLuint index, const GLint *v)
+{
+ d_3_0_Core->VertexAttribI1iv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ d_3_0_Core->VertexAttribI4ui(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ d_3_0_Core->VertexAttribI3ui(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI2ui(GLuint index, GLuint x, GLuint y)
+{
+ d_3_0_Core->VertexAttribI2ui(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI1ui(GLuint index, GLuint x)
+{
+ d_3_0_Core->VertexAttribI1ui(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ d_3_0_Core->VertexAttribI4i(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
+{
+ d_3_0_Core->VertexAttribI3i(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI2i(GLuint index, GLint x, GLint y)
+{
+ d_3_0_Core->VertexAttribI2i(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribI1i(GLuint index, GLint x)
+{
+ d_3_0_Core->VertexAttribI1i(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
+{
+ d_3_0_Core->GetVertexAttribIuiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
+{
+ d_3_0_Core->GetVertexAttribIiv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_3_0_Core->VertexAttribIPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEndConditionalRender()
+{
+ d_3_0_Core->EndConditionalRender();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBeginConditionalRender(GLuint id, GLenum mode)
+{
+ d_3_0_Core->BeginConditionalRender(id, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClampColor(GLenum target, GLenum clamp)
+{
+ d_3_0_Core->ClampColor(target, clamp);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
+{
+ d_3_0_Core->GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const *varyings, GLenum bufferMode)
+{
+ d_3_0_Core->TransformFeedbackVaryings(program, count, varyings, bufferMode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
+{
+ d_3_0_Core->BindBufferBase(target, index, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_3_0_Core->BindBufferRange(target, index, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEndTransformFeedback()
+{
+ d_3_0_Core->EndTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBeginTransformFeedback(GLenum primitiveMode)
+{
+ d_3_0_Core->BeginTransformFeedback(primitiveMode);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsEnabledi(GLenum target, GLuint index)
+{
+ return d_3_0_Core->IsEnabledi(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDisablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Disablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEnablei(GLenum target, GLuint index)
+{
+ d_3_0_Core->Enablei(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
+{
+ d_3_0_Core->GetIntegeri_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetBooleani_v(GLenum target, GLuint index, GLboolean *data)
+{
+ d_3_0_Core->GetBooleani_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ d_3_0_Core->ColorMaski(index, r, g, b, a);
+}
+
+
+// OpenGL 3.1 core functions
+inline void QOpenGLFunctions_4_5_Core::glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+ d_3_1_Core->UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)
+{
+ d_3_1_Core->GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName)
+{
+ return d_3_1_Core->GetUniformBlockIndex(program, uniformBlockName);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)
+{
+ d_3_1_Core->GetActiveUniformName(program, uniformIndex, bufSize, length, uniformName);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)
+{
+ d_3_1_Core->GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices)
+{
+ d_3_1_Core->GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+{
+ d_3_1_Core->CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPrimitiveRestartIndex(GLuint index)
+{
+ d_3_1_Core->PrimitiveRestartIndex(index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
+{
+ d_3_1_Core->TexBuffer(target, internalformat, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount)
+{
+ d_3_1_Core->DrawElementsInstanced(mode, count, type, indices, instancecount);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
+{
+ d_3_1_Core->DrawArraysInstanced(mode, first, count, instancecount);
+}
+
+
+// OpenGL 3.2 core functions
+inline void QOpenGLFunctions_4_5_Core::glSampleMaski(GLuint maskNumber, GLbitfield mask)
+{
+ d_3_2_Core->SampleMaski(maskNumber, mask);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
+{
+ d_3_2_Core->GetMultisamplefv(pname, index, val);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_3_2_Core->TexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
+{
+ d_3_2_Core->FramebufferTexture(target, attachment, texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+ d_3_2_Core->GetBufferParameteri64v(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64i_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
+{
+ d_3_2_Core->GetSynciv(sync, pname, bufSize, length, values);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetInteger64v(GLenum pname, GLint64 *data)
+{
+ d_3_2_Core->GetInteger64v(pname, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ d_3_2_Core->WaitSync(sync, flags, timeout);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Core::glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
+{
+ return d_3_2_Core->ClientWaitSync(sync, flags, timeout);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteSync(GLsync sync)
+{
+ d_3_2_Core->DeleteSync(sync);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsSync(GLsync sync)
+{
+ return d_3_2_Core->IsSync(sync);
+}
+
+inline GLsync QOpenGLFunctions_4_5_Core::glFenceSync(GLenum condition, GLbitfield flags)
+{
+ return d_3_2_Core->FenceSync(condition, flags);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProvokingVertex(GLenum mode)
+{
+ d_3_2_Core->ProvokingVertex(mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei drawcount, const GLint *basevertex)
+{
+ d_3_2_Core->MultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, basevertex);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex)
+{
+ d_3_2_Core->DrawElementsBaseVertex(mode, count, type, indices, basevertex);
+}
+
+
+// OpenGL 3.3 core functions
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP4uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP4ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP3uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP3ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP2uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP2ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)
+{
+ d_3_3_Core->VertexAttribP1uiv(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
+{
+ d_3_3_Core->VertexAttribP1ui(index, type, normalized, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribDivisor(GLuint index, GLuint divisor)
+{
+ d_3_3_Core->VertexAttribDivisor(index, divisor);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
+{
+ d_3_3_Core->GetQueryObjectui64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
+{
+ d_3_3_Core->GetQueryObjecti64v(id, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glQueryCounter(GLuint id, GLenum target)
+{
+ d_3_3_Core->QueryCounter(id, target);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
+{
+ d_3_3_Core->GetSamplerParameterIuiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
+{
+ d_3_3_Core->GetSamplerParameterfv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameterIiv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
+{
+ d_3_3_Core->GetSamplerParameteriv(sampler, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param)
+{
+ d_3_3_Core->SamplerParameterIuiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameterIiv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
+{
+ d_3_3_Core->SamplerParameterfv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
+{
+ d_3_3_Core->SamplerParameterf(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
+{
+ d_3_3_Core->SamplerParameteriv(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
+{
+ d_3_3_Core->SamplerParameteri(sampler, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindSampler(GLuint unit, GLuint sampler)
+{
+ d_3_3_Core->BindSampler(unit, sampler);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsSampler(GLuint sampler)
+{
+ return d_3_3_Core->IsSampler(sampler);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteSamplers(GLsizei count, const GLuint *samplers)
+{
+ d_3_3_Core->DeleteSamplers(count, samplers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenSamplers(GLsizei count, GLuint *samplers)
+{
+ d_3_3_Core->GenSamplers(count, samplers);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetFragDataIndex(GLuint program, const GLchar *name)
+{
+ return d_3_3_Core->GetFragDataIndex(program, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)
+{
+ d_3_3_Core->BindFragDataLocationIndexed(program, colorNumber, index, name);
+}
+
+
+// OpenGL 4.0 core functions
+inline void QOpenGLFunctions_4_5_Core::glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params)
+{
+ d_4_0_Core->GetQueryIndexediv(target, index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEndQueryIndexed(GLenum target, GLuint index)
+{
+ d_4_0_Core->EndQueryIndexed(target, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBeginQueryIndexed(GLenum target, GLuint index, GLuint id)
+{
+ d_4_0_Core->BeginQueryIndexed(target, index, id);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream)
+{
+ d_4_0_Core->DrawTransformFeedbackStream(mode, id, stream);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawTransformFeedback(GLenum mode, GLuint id)
+{
+ d_4_0_Core->DrawTransformFeedback(mode, id);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glResumeTransformFeedback()
+{
+ d_4_0_Core->ResumeTransformFeedback();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPauseTransformFeedback()
+{
+ d_4_0_Core->PauseTransformFeedback();
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsTransformFeedback(GLuint id)
+{
+ return d_4_0_Core->IsTransformFeedback(id);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ d_4_0_Core->GenTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids)
+{
+ d_4_0_Core->DeleteTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindTransformFeedback(GLenum target, GLuint id)
+{
+ d_4_0_Core->BindTransformFeedback(target, id);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPatchParameterfv(GLenum pname, const GLfloat *values)
+{
+ d_4_0_Core->PatchParameterfv(pname, values);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPatchParameteri(GLenum pname, GLint value)
+{
+ d_4_0_Core->PatchParameteri(pname, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetProgramStageiv(program, shadertype, pname, values);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params)
+{
+ d_4_0_Core->GetUniformSubroutineuiv(shadertype, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices)
+{
+ d_4_0_Core->UniformSubroutinesuiv(shadertype, count, indices);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)
+{
+ d_4_0_Core->GetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)
+{
+ d_4_0_Core->GetActiveSubroutineUniformiv(program, shadertype, index, pname, values);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineIndex(program, shadertype, name);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name)
+{
+ return d_4_0_Core->GetSubroutineUniformLocation(program, shadertype, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetUniformdv(GLuint program, GLint location, GLdouble *params)
+{
+ d_4_0_Core->GetUniformdv(program, location, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3x2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2x3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix4dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix3dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_0_Core->UniformMatrix2dv(location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform4dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform3dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform2dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1dv(GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_0_Core->Uniform1dv(location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_0_Core->Uniform4d(location, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_0_Core->Uniform3d(location, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform2d(GLint location, GLdouble x, GLdouble y)
+{
+ d_4_0_Core->Uniform2d(location, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUniform1d(GLint location, GLdouble x)
+{
+ d_4_0_Core->Uniform1d(location, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
+{
+ d_4_0_Core->DrawElementsIndirect(mode, type, indirect);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawArraysIndirect(GLenum mode, const void *indirect)
+{
+ d_4_0_Core->DrawArraysIndirect(mode, indirect);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+{
+ d_4_0_Core->BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendFunci(GLuint buf, GLenum src, GLenum dst)
+{
+ d_4_0_Core->BlendFunci(buf, src, dst);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
+{
+ d_4_0_Core->BlendEquationSeparatei(buf, modeRGB, modeAlpha);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlendEquationi(GLuint buf, GLenum mode)
+{
+ d_4_0_Core->BlendEquationi(buf, mode);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMinSampleShading(GLfloat value)
+{
+ d_4_0_Core->MinSampleShading(value);
+}
+
+
+// OpenGL 4.1 core functions
+inline void QOpenGLFunctions_4_5_Core::glGetDoublei_v(GLenum target, GLuint index, GLdouble *data)
+{
+ d_4_1_Core->GetDoublei_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetFloati_v(GLenum target, GLuint index, GLfloat *data)
+{
+ d_4_1_Core->GetFloati_v(target, index, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f)
+{
+ d_4_1_Core->DepthRangeIndexed(index, n, f);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v)
+{
+ d_4_1_Core->DepthRangeArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glScissorIndexedv(GLuint index, const GLint *v)
+{
+ d_4_1_Core->ScissorIndexedv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)
+{
+ d_4_1_Core->ScissorIndexed(index, left, bottom, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glScissorArrayv(GLuint first, GLsizei count, const GLint *v)
+{
+ d_4_1_Core->ScissorArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glViewportIndexedfv(GLuint index, const GLfloat *v)
+{
+ d_4_1_Core->ViewportIndexedfv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+{
+ d_4_1_Core->ViewportIndexedf(index, x, y, w, h);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
+{
+ d_4_1_Core->ViewportArrayv(first, count, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params)
+{
+ d_4_1_Core->GetVertexAttribLdv(index, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
+{
+ d_4_1_Core->VertexAttribLPointer(index, size, type, stride, pointer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL4dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL4dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL3dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL3dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL2dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL2dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL1dv(GLuint index, const GLdouble *v)
+{
+ d_4_1_Core->VertexAttribL1dv(index, v);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+ d_4_1_Core->VertexAttribL4d(index, x, y, z, w);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
+{
+ d_4_1_Core->VertexAttribL3d(index, x, y, z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
+{
+ d_4_1_Core->VertexAttribL2d(index, x, y);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribL1d(GLuint index, GLdouble x)
+{
+ d_4_1_Core->VertexAttribL1d(index, x);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+{
+ d_4_1_Core->GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glValidateProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->ValidateProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3x2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2x3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2dv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix4fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix3fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniformMatrix2fv(program, location, count, transpose, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform4uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+{
+ d_4_1_Core->ProgramUniform4ui(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform4dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)
+{
+ d_4_1_Core->ProgramUniform4d(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform4fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+{
+ d_4_1_Core->ProgramUniform4f(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform4iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+{
+ d_4_1_Core->ProgramUniform4i(program, location, v0, v1, v2, v3);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform3uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
+{
+ d_4_1_Core->ProgramUniform3ui(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform3dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)
+{
+ d_4_1_Core->ProgramUniform3d(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform3fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+{
+ d_4_1_Core->ProgramUniform3f(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform3iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
+{
+ d_4_1_Core->ProgramUniform3i(program, location, v0, v1, v2);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform2uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
+{
+ d_4_1_Core->ProgramUniform2ui(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform2dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1)
+{
+ d_4_1_Core->ProgramUniform2d(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform2fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
+{
+ d_4_1_Core->ProgramUniform2f(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform2iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
+{
+ d_4_1_Core->ProgramUniform2i(program, location, v0, v1);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value)
+{
+ d_4_1_Core->ProgramUniform1uiv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
+{
+ d_4_1_Core->ProgramUniform1ui(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value)
+{
+ d_4_1_Core->ProgramUniform1dv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1d(GLuint program, GLint location, GLdouble v0)
+{
+ d_4_1_Core->ProgramUniform1d(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value)
+{
+ d_4_1_Core->ProgramUniform1fv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1f(GLuint program, GLint location, GLfloat v0)
+{
+ d_4_1_Core->ProgramUniform1f(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value)
+{
+ d_4_1_Core->ProgramUniform1iv(program, location, count, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramUniform1i(GLuint program, GLint location, GLint v0)
+{
+ d_4_1_Core->ProgramUniform1i(program, location, v0);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
+{
+ d_4_1_Core->GetProgramPipelineiv(pipeline, pname, params);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glIsProgramPipeline(GLuint pipeline)
+{
+ return d_4_1_Core->IsProgramPipeline(pipeline);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ d_4_1_Core->GenProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
+{
+ d_4_1_Core->DeleteProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindProgramPipeline(GLuint pipeline)
+{
+ d_4_1_Core->BindProgramPipeline(pipeline);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
+{
+ return d_4_1_Core->CreateShaderProgramv(type, count, strings);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glActiveShaderProgram(GLuint pipeline, GLuint program)
+{
+ d_4_1_Core->ActiveShaderProgram(pipeline, program);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
+{
+ d_4_1_Core->UseProgramStages(pipeline, stages, program);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramParameteri(GLuint program, GLenum pname, GLint value)
+{
+ d_4_1_Core->ProgramParameteri(program, pname, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ProgramBinary(program, binaryFormat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)
+{
+ d_4_1_Core->GetProgramBinary(program, bufSize, length, binaryFormat, binary);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearDepthf(GLfloat dd)
+{
+ d_4_1_Core->ClearDepthf(dd);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDepthRangef(GLfloat n, GLfloat f)
+{
+ d_4_1_Core->DepthRangef(n, f);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
+{
+ d_4_1_Core->GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length)
+{
+ d_4_1_Core->ShaderBinary(count, shaders, binaryformat, binary, length);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glReleaseShaderCompiler()
+{
+ d_4_1_Core->ReleaseShaderCompiler();
+}
+
+
+// OpenGL 4.2 core functions
+inline void QOpenGLFunctions_4_5_Core::glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackStreamInstanced(mode, id, stream, instancecount);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount)
+{
+ d_4_2_Core->DrawTransformFeedbackInstanced(mode, id, instancecount);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_2_Core->TexStorage3D(target, levels, internalformat, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_2_Core->TexStorage2D(target, levels, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
+{
+ d_4_2_Core->TexStorage1D(target, levels, internalformat, width);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMemoryBarrier(GLbitfield barriers)
+{
+ d_4_2_Core->MemoryBarrier(barriers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
+{
+ d_4_2_Core->BindImageTexture(unit, texture, level, layered, layer, access, format);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)
+{
+ d_4_2_Core->GetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)
+{
+ d_4_2_Core->GetInternalformativ(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, instancecount, basevertex, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawElementsInstancedBaseInstance(mode, count, type, indices, instancecount, baseinstance);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance)
+{
+ d_4_2_Core->DrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance);
+}
+
+
+// OpenGL 4.3 core functions
+inline void QOpenGLFunctions_4_5_Core::glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectPtrLabel(ptr, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectPtrLabel(ptr, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
+{
+ d_4_3_Core->GetObjectLabel(identifier, name, bufSize, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
+{
+ d_4_3_Core->ObjectLabel(identifier, name, length, label);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPopDebugGroup()
+{
+ d_4_3_Core->PopDebugGroup();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message)
+{
+ d_4_3_Core->PushDebugGroup(source, id, length, message);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
+{
+ return d_4_3_Core->GetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, messageLog);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
+{
+ d_4_3_Core->DebugMessageCallback(callback, userParam);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
+{
+ d_4_3_Core->DebugMessageInsert(source, type, id, severity, length, buf);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
+{
+ d_4_3_Core->DebugMessageControl(source, type, severity, count, ids, enabled);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexBindingDivisor(GLuint bindingindex, GLuint divisor)
+{
+ d_4_3_Core->VertexBindingDivisor(bindingindex, divisor);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribBinding(GLuint attribindex, GLuint bindingindex)
+{
+ d_4_3_Core->VertexAttribBinding(attribindex, bindingindex);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribLFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribIFormat(attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
+{
+ d_4_3_Core->VertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+{
+ d_4_3_Core->BindVertexBuffer(bindingindex, buffer, offset, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
+{
+ d_4_3_Core->TextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_4_3_Core->TexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
+{
+ d_4_3_Core->TexBufferRange(target, internalformat, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)
+{
+ d_4_3_Core->ShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocationIndex(program, programInterface, name);
+}
+
+inline GLint QOpenGLFunctions_4_5_Core::glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceLocation(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)
+{
+ d_4_3_Core->GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)
+{
+ d_4_3_Core->GetProgramResourceName(program, programInterface, index, bufSize, length, name);
+}
+
+inline GLuint QOpenGLFunctions_4_5_Core::glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
+{
+ return d_4_3_Core->GetProgramResourceIndex(program, programInterface, name);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetProgramInterfaceiv(program, programInterface, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawElementsIndirect(mode, type, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride)
+{
+ d_4_3_Core->MultiDrawArraysIndirect(mode, indirect, drawcount, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_3_Core->InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments)
+{
+ d_4_3_Core->InvalidateFramebuffer(target, numAttachments, attachments);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateBufferData(GLuint buffer)
+{
+ d_4_3_Core->InvalidateBufferData(buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
+{
+ d_4_3_Core->InvalidateBufferSubData(buffer, offset, length);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateTexImage(GLuint texture, GLint level)
+{
+ d_4_3_Core->InvalidateTexImage(texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_3_Core->InvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)
+{
+ d_4_3_Core->GetInternalformati64v(target, internalformat, pname, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ d_4_3_Core->GetFramebufferParameteriv(target, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
+{
+ d_4_3_Core->FramebufferParameteri(target, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
+{
+ d_4_3_Core->CopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDispatchComputeIndirect(GLintptr indirect)
+{
+ d_4_3_Core->DispatchComputeIndirect(indirect);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
+{
+ d_4_3_Core->DispatchCompute(num_groups_x, num_groups_y, num_groups_z);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferSubData(target, internalformat, offset, size, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)
+{
+ d_4_3_Core->ClearBufferData(target, internalformat, format, type, data);
+}
+
+
+// OpenGL 4.4 core functions
+inline void QOpenGLFunctions_4_5_Core::glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
+{
+ d_4_4_Core->BindVertexBuffers(first, count, buffers, offsets, strides);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindImageTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
+{
+ d_4_4_Core->BindSamplers(first, count, samplers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+ d_4_4_Core->BindTextures(first, count, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)
+{
+ d_4_4_Core->BindBuffersRange(target, first, count, buffers, offsets, sizes);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers)
+{
+ d_4_4_Core->BindBuffersBase(target, first, count, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data)
+{
+ d_4_4_Core->ClearTexImage(texture, level, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)
+{
+ d_4_4_Core->BufferStorage(target, size, data, flags);
+}
+
+
+// OpenGL 4.5 core functions
+inline void QOpenGLFunctions_4_5_Core::glTextureBarrier()
+{
+ d_4_5_Core->TextureBarrier();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)
+{
+ d_4_5_Core->ReadnPixels(x, y, width, height, format, type, bufSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params)
+{
+ d_4_5_Core->GetnUniformuiv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params)
+{
+ d_4_5_Core->GetnUniformiv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
+{
+ d_4_5_Core->GetnUniformfv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params)
+{
+ d_4_5_Core->GetnUniformdv(program, location, bufSize, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetnTexImage(target, level, format, type, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetnCompressedTexImage(target, lod, bufSize, pixels);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Core::glGetGraphicsResetStatus()
+{
+ return d_4_5_Core->GetGraphicsResetStatus();
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glMemoryBarrierByRegion(GLbitfield barriers)
+{
+ d_4_5_Core->MemoryBarrierByRegion(barriers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateQueries(GLenum target, GLsizei n, GLuint *ids)
+{
+ d_4_5_Core->CreateQueries(target, n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateProgramPipelines(GLsizei n, GLuint *pipelines)
+{
+ d_4_5_Core->CreateProgramPipelines(n, pipelines);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateSamplers(GLsizei n, GLuint *samplers)
+{
+ d_4_5_Core->CreateSamplers(n, samplers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)
+{
+ d_4_5_Core->GetVertexArrayIndexed64iv(vaobj, index, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetVertexArrayIndexediv(vaobj, index, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetVertexArrayiv(vaobj, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor)
+{
+ d_4_5_Core->VertexArrayBindingDivisor(vaobj, bindingindex, divisor);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayAttribLFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_5_Core->VertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayAttribIFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+{
+ d_4_5_Core->VertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayAttribFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
+{
+ d_4_5_Core->VertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex)
+{
+ d_4_5_Core->VertexArrayAttribBinding(vaobj, attribindex, bindingindex);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)
+{
+ d_4_5_Core->VertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayVertexBuffer(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+{
+ d_4_5_Core->VertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glVertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
+{
+ d_4_5_Core->VertexArrayElementBuffer(vaobj, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glEnableVertexArrayAttrib(GLuint vaobj, GLuint index)
+{
+ d_4_5_Core->EnableVertexArrayAttrib(vaobj, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glDisableVertexArrayAttrib(GLuint vaobj, GLuint index)
+{
+ d_4_5_Core->DisableVertexArrayAttrib(vaobj, index);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateVertexArrays(GLsizei n, GLuint *arrays)
+{
+ d_4_5_Core->CreateVertexArrays(n, arrays);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetTextureParameteriv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
+{
+ d_4_5_Core->GetTextureParameterIuiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetTextureParameterIiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
+{
+ d_4_5_Core->GetTextureParameterfv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetTextureLevelParameteriv(texture, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureLevelParameterfv(GLuint texture, GLint level, GLenum pname, GLfloat *params)
+{
+ d_4_5_Core->GetTextureLevelParameterfv(texture, level, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetCompressedTextureImage(GLuint texture, GLint level, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetCompressedTextureImage(texture, level, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
+{
+ d_4_5_Core->GetTextureImage(texture, level, format, type, bufSize, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBindTextureUnit(GLuint unit, GLuint texture)
+{
+ d_4_5_Core->BindTextureUnit(unit, texture);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGenerateTextureMipmap(GLuint texture)
+{
+ d_4_5_Core->GenerateTextureMipmap(texture);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureParameteriv(GLuint texture, GLenum pname, const GLint *param)
+{
+ d_4_5_Core->TextureParameteriv(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
+{
+ d_4_5_Core->TextureParameterIuiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
+{
+ d_4_5_Core->TextureParameterIiv(texture, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureParameteri(GLuint texture, GLenum pname, GLint param)
+{
+ d_4_5_Core->TextureParameteri(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param)
+{
+ d_4_5_Core->TextureParameterfv(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureParameterf(GLuint texture, GLenum pname, GLfloat param)
+{
+ d_4_5_Core->TextureParameterf(texture, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->CopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->CopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+{
+ d_4_5_Core->CopyTextureSubImage1D(texture, level, xoffset, x, y, width);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_4_5_Core->CompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_4_5_Core->CompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)
+{
+ d_4_5_Core->CompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
+{
+ d_4_5_Core->TextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
+{
+ d_4_5_Core->TextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
+{
+ d_4_5_Core->TextureSubImage1D(texture, level, xoffset, width, format, type, pixels);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureStorage3DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+{
+ d_4_5_Core->TextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureStorage2DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
+{
+ d_4_5_Core->TextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
+{
+ d_4_5_Core->TextureStorage3D(texture, levels, internalformat, width, height, depth);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->TextureStorage2D(texture, levels, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width)
+{
+ d_4_5_Core->TextureStorage1D(texture, levels, internalformat, width);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size)
+{
+ d_4_5_Core->TextureBufferRange(texture, internalformat, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer)
+{
+ d_4_5_Core->TextureBuffer(texture, internalformat, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateTextures(GLenum target, GLsizei n, GLuint *textures)
+{
+ d_4_5_Core->CreateTextures(target, n, textures);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetNamedRenderbufferParameteriv(renderbuffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->NamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->NamedRenderbufferStorage(renderbuffer, internalformat, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
+{
+ d_4_5_Core->CreateRenderbuffers(n, renderbuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetNamedFramebufferParameteriv(framebuffer, pname, param);
+}
+
+inline GLenum QOpenGLFunctions_4_5_Core::glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
+{
+ return d_4_5_Core->CheckNamedFramebufferStatus(framebuffer, target);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+{
+ d_4_5_Core->BlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil)
+{
+ d_4_5_Core->ClearNamedFramebufferfi(framebuffer, buffer, depth, stencil);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ d_4_5_Core->ClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ d_4_5_Core->ClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ d_4_5_Core->ClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ d_4_5_Core->InvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glInvalidateNamedFramebufferData(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments)
+{
+ d_4_5_Core->InvalidateNamedFramebufferData(framebuffer, numAttachments, attachments);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
+{
+ d_4_5_Core->NamedFramebufferReadBuffer(framebuffer, src);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs)
+{
+ d_4_5_Core->NamedFramebufferDrawBuffers(framebuffer, n, bufs);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
+{
+ d_4_5_Core->NamedFramebufferDrawBuffer(framebuffer, buf);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer)
+{
+ d_4_5_Core->NamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level)
+{
+ d_4_5_Core->NamedFramebufferTexture(framebuffer, attachment, texture, level);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param)
+{
+ d_4_5_Core->NamedFramebufferParameteri(framebuffer, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
+{
+ d_4_5_Core->NamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateFramebuffers(GLsizei n, GLuint *framebuffers)
+{
+ d_4_5_Core->CreateFramebuffers(n, framebuffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, void *data)
+{
+ d_4_5_Core->GetNamedBufferSubData(buffer, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedBufferPointerv(GLuint buffer, GLenum pname, void * *params)
+{
+ d_4_5_Core->GetNamedBufferPointerv(buffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params)
+{
+ d_4_5_Core->GetNamedBufferParameteri64v(buffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
+{
+ d_4_5_Core->GetNamedBufferParameteriv(buffer, pname, params);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length)
+{
+ d_4_5_Core->FlushMappedNamedBufferRange(buffer, offset, length);
+}
+
+inline GLboolean QOpenGLFunctions_4_5_Core::glUnmapNamedBuffer(GLuint buffer)
+{
+ return d_4_5_Core->UnmapNamedBuffer(buffer);
+}
+
+inline void * QOpenGLFunctions_4_5_Core::glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access)
+{
+ return d_4_5_Core->MapNamedBufferRange(buffer, offset, length, access);
+}
+
+inline void * QOpenGLFunctions_4_5_Core::glMapNamedBuffer(GLuint buffer, GLenum access)
+{
+ return d_4_5_Core->MapNamedBuffer(buffer, access);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data)
+{
+ d_4_5_Core->ClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClearNamedBufferData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data)
+{
+ d_4_5_Core->ClearNamedBufferData(buffer, internalformat, format, type, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size)
+{
+ d_4_5_Core->CopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizei size, const void *data)
+{
+ d_4_5_Core->NamedBufferSubData(buffer, offset, size, data);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedBufferData(GLuint buffer, GLsizei size, const void *data, GLenum usage)
+{
+ d_4_5_Core->NamedBufferData(buffer, size, data, usage);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glNamedBufferStorage(GLuint buffer, GLsizei size, const void *data, GLbitfield flags)
+{
+ d_4_5_Core->NamedBufferStorage(buffer, size, data, flags);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateBuffers(GLsizei n, GLuint *buffers)
+{
+ d_4_5_Core->CreateBuffers(n, buffers);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)
+{
+ d_4_5_Core->GetTransformFeedbacki64_v(xfb, pname, index, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param)
+{
+ d_4_5_Core->GetTransformFeedbacki_v(xfb, pname, index, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
+{
+ d_4_5_Core->GetTransformFeedbackiv(xfb, pname, param);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size)
+{
+ d_4_5_Core->TransformFeedbackBufferRange(xfb, index, buffer, offset, size);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
+{
+ d_4_5_Core->TransformFeedbackBufferBase(xfb, index, buffer);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glCreateTransformFeedbacks(GLsizei n, GLuint *ids)
+{
+ d_4_5_Core->CreateTransformFeedbacks(n, ids);
+}
+
+inline void QOpenGLFunctions_4_5_Core::glClipControl(GLenum origin, GLenum depth)
+{
+ d_4_5_Core->ClipControl(origin, depth);
+}
+
+
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+
+#endif
diff --git a/src/gui/opengl/qopenglfunctions_es2.cpp b/src/gui/opengl/qopenglfunctions_es2.cpp
index cece95af2d..87feee59af 100644
--- a/src/gui/opengl/qopenglfunctions_es2.cpp
+++ b/src/gui/opengl/qopenglfunctions_es2.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglfunctions_es2.h b/src/gui/opengl/qopenglfunctions_es2.h
index 1237021ab1..ad84a69f3f 100644
--- a/src/gui/opengl/qopenglfunctions_es2.h
+++ b/src/gui/opengl/qopenglfunctions_es2.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglgradientcache.cpp b/src/gui/opengl/qopenglgradientcache.cpp
index 49e4e62da1..ab493fa85c 100644
--- a/src/gui/opengl/qopenglgradientcache.cpp
+++ b/src/gui/opengl/qopenglgradientcache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglgradientcache_p.h b/src/gui/opengl/qopenglgradientcache_p.h
index fc6df0b97f..bcdf3f4fcf 100644
--- a/src/gui/opengl/qopenglgradientcache_p.h
+++ b/src/gui/opengl/qopenglgradientcache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -77,8 +77,8 @@ public:
GLuint getBuffer(const QGradient &gradient, qreal opacity);
inline int paletteSize() const { return 1024; }
- void invalidateResource();
- void freeResource(QOpenGLContext *ctx);
+ void invalidateResource() Q_DECL_OVERRIDE;
+ void freeResource(QOpenGLContext *ctx) Q_DECL_OVERRIDE;
private:
inline int maxCacheSize() const { return 60; }
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
index a08d26f708..c0657feaa0 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/gui/opengl/qopenglpaintdevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/gui/opengl/qopenglpaintdevice.h
index 10cee842ab..804e4857e9 100644
--- a/src/gui/opengl/qopenglpaintdevice.h
+++ b/src/gui/opengl/qopenglpaintdevice.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglpaintdevice_p.h b/src/gui/opengl/qopenglpaintdevice_p.h
index 0b01129a84..57d93ee80a 100644
--- a/src/gui/opengl/qopenglpaintdevice_p.h
+++ b/src/gui/opengl/qopenglpaintdevice_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 8eeaa316d0..a9a4adaddc 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -67,7 +67,6 @@
#include <private/qopengl_p.h>
#include <private/qopenglcontext_p.h>
#include <private/qopenglextensions_p.h>
-#include <private/qmath_p.h>
#include <private/qpaintengineex_p.h>
#include <QPaintEngine>
#include <private/qpainter_p.h>
@@ -350,7 +349,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushUniforms()
const QConicalGradient *g = static_cast<const QConicalGradient *>(currentBrush.gradient());
translationPoint = g->center();
- GLfloat angle = -(g->angle() * 2 * Q_PI) / 360.0;
+ GLfloat angle = -qDegreesToRadians(g->angle());
shaderManager->currentProgram()->setUniformValue(location(QOpenGLEngineShaderManager::Angle), angle);
@@ -462,8 +461,8 @@ void QOpenGL2PaintEngineExPrivate::updateMatrix()
// anti-aliased text rendering. In such cases, we snap the translate to the pixel grid.
if (snapToPixelGrid && transform.type() == QTransform::TxTranslate) {
// 0.50 needs to rounded down to 0.0 for consistency with raster engine:
- dx = ceilf(dx - 0.5f);
- dy = ceilf(dy - 0.5f);
+ dx = std::ceil(dx - 0.5f);
+ dy = std::ceil(dy - 0.5f);
}
pmvMatrix[0][0] = (wfactor * transform.m11()) - transform.m13();
pmvMatrix[1][0] = (wfactor * transform.m21()) - transform.m23();
@@ -1230,7 +1229,7 @@ void QOpenGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stop
GLenum primitive)
{
// Now setup the pointer to the vertex array:
- setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, (GLfloat*)data);
+ setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, data);
int previousStop = 0;
for (int i=0; i<stopCount; ++i) {
@@ -1496,6 +1495,20 @@ void QOpenGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, c
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::NonPremultipliedImageSrc);
bindOption = 0;
break;
+ case QImage::Format_Alpha8:
+ if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {
+ d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::AlphaImageSrc);
+ bindOption = QOpenGLTextureCache::UseRedFor8BitBindOption;
+ } else
+ d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::ImageSrc);
+ break;
+ case QImage::Format_Grayscale8:
+ if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {
+ d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::GrayscaleImageSrc);
+ bindOption = QOpenGLTextureCache::UseRedFor8BitBindOption;
+ } else
+ d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::ImageSrc);
+ break;
default:
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::ImageSrc);
break;
@@ -1586,10 +1599,8 @@ void QOpenGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &text
{
QStaticTextItem staticTextItem;
- staticTextItem.chars = const_cast<QChar *>(ti.chars);
staticTextItem.setFontEngine(ti.fontEngine);
staticTextItem.glyphs = glyphs.data();
- staticTextItem.numChars = ti.num_chars;
staticTextItem.numGlyphs = glyphs.size();
staticTextItem.glyphPositions = positions.data();
@@ -1998,8 +2009,8 @@ void QOpenGL2PaintEngineExPrivate::drawPixmapFragments(const QPainter::PixmapFra
qreal s = 0;
qreal c = 1;
if (fragments[i].rotation != 0) {
- s = qFastSin(fragments[i].rotation * Q_PI / 180);
- c = qFastCos(fragments[i].rotation * Q_PI / 180);
+ s = qFastSin(qDegreesToRadians(fragments[i].rotation));
+ c = qFastCos(qDegreesToRadians(fragments[i].rotation));
}
qreal right = 0.5 * fragments[i].scaleX * fragments[i].width;
diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/gui/opengl/qopenglpaintengine_p.h
index 9722ea3196..17be72b1e9 100644
--- a/src/gui/opengl/qopenglpaintengine_p.h
+++ b/src/gui/opengl/qopenglpaintengine_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -106,37 +106,37 @@ public:
QOpenGL2PaintEngineEx();
~QOpenGL2PaintEngineEx();
- bool begin(QPaintDevice *device);
+ bool begin(QPaintDevice *device) Q_DECL_OVERRIDE;
void ensureActive();
- bool end();
-
- virtual void clipEnabledChanged();
- virtual void penChanged();
- virtual void brushChanged();
- virtual void brushOriginChanged();
- virtual void opacityChanged();
- virtual void compositionModeChanged();
- virtual void renderHintsChanged();
- virtual void transformChanged();
-
- virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
+ bool end() Q_DECL_OVERRIDE;
+
+ virtual void clipEnabledChanged() Q_DECL_OVERRIDE;
+ virtual void penChanged() Q_DECL_OVERRIDE;
+ virtual void brushChanged() Q_DECL_OVERRIDE;
+ virtual void brushOriginChanged() Q_DECL_OVERRIDE;
+ virtual void opacityChanged() Q_DECL_OVERRIDE;
+ virtual void compositionModeChanged() Q_DECL_OVERRIDE;
+ virtual void renderHintsChanged() Q_DECL_OVERRIDE;
+ virtual void transformChanged() Q_DECL_OVERRIDE;
+
+ virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) Q_DECL_OVERRIDE;
virtual void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
- QPainter::PixmapFragmentHints hints);
+ QPainter::PixmapFragmentHints hints) Q_DECL_OVERRIDE;
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags flags = Qt::AutoColor);
- virtual void drawTextItem(const QPointF &p, const QTextItem &textItem);
- virtual void fill(const QVectorPath &path, const QBrush &brush);
- virtual void stroke(const QVectorPath &path, const QPen &pen);
- virtual void clip(const QVectorPath &path, Qt::ClipOperation op);
+ Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE;
+ virtual void drawTextItem(const QPointF &p, const QTextItem &textItem) Q_DECL_OVERRIDE;
+ virtual void fill(const QVectorPath &path, const QBrush &brush) Q_DECL_OVERRIDE;
+ virtual void stroke(const QVectorPath &path, const QPen &pen) Q_DECL_OVERRIDE;
+ virtual void clip(const QVectorPath &path, Qt::ClipOperation op) Q_DECL_OVERRIDE;
- virtual void drawStaticTextItem(QStaticTextItem *textItem);
+ virtual void drawStaticTextItem(QStaticTextItem *textItem) Q_DECL_OVERRIDE;
bool drawTexture(const QRectF &r, GLuint textureId, const QSize &size, const QRectF &sr);
- Type type() const { return OpenGL2; }
+ Type type() const Q_DECL_OVERRIDE { return OpenGL2; }
- virtual void setState(QPainterState *s);
- virtual QPainterState *createState(QPainterState *orig) const;
+ virtual void setState(QPainterState *s) Q_DECL_OVERRIDE;
+ virtual QPainterState *createState(QPainterState *orig) const Q_DECL_OVERRIDE;
inline QOpenGL2PaintEngineState *state() {
return static_cast<QOpenGL2PaintEngineState *>(QPaintEngineEx::state());
}
@@ -144,16 +144,16 @@ public:
return static_cast<const QOpenGL2PaintEngineState *>(QPaintEngineEx::state());
}
- void beginNativePainting();
- void endNativePainting();
+ void beginNativePainting() Q_DECL_OVERRIDE;
+ void endNativePainting() Q_DECL_OVERRIDE;
void invalidateState();
void setRenderTextActive(bool);
bool isNativePaintingActive() const;
- bool requiresPretransformedGlyphPositions(QFontEngine *, const QTransform &) const { return false; }
- bool shouldDrawCachedGlyphs(QFontEngine *, const QTransform &) const;
+ bool requiresPretransformedGlyphPositions(QFontEngine *, const QTransform &) const Q_DECL_OVERRIDE { return false; }
+ bool shouldDrawCachedGlyphs(QFontEngine *, const QTransform &) const Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(QOpenGL2PaintEngineEx)
@@ -250,7 +250,7 @@ public:
void updateClipScissorTest();
void setScissor(const QRect &rect);
void regenerateClip();
- void systemStateChanged();
+ void systemStateChanged() Q_DECL_OVERRIDE;
void setVertexAttribArrayEnabled(int arrayIndex, bool enabled = true);
void syncGlState();
diff --git a/src/gui/opengl/qopenglpixeltransferoptions.cpp b/src/gui/opengl/qopenglpixeltransferoptions.cpp
index 9ea2e0ecc1..25be0933f7 100644
--- a/src/gui/opengl/qopenglpixeltransferoptions.cpp
+++ b/src/gui/opengl/qopenglpixeltransferoptions.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglpixeltransferoptions.h b/src/gui/opengl/qopenglpixeltransferoptions.h
index 50ca74d8f0..bf726813bd 100644
--- a/src/gui/opengl/qopenglpixeltransferoptions.h
+++ b/src/gui/opengl/qopenglpixeltransferoptions.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglqueryhelper_p.h b/src/gui/opengl/qopenglqueryhelper_p.h
index 01b339e4f3..98ac6b3915 100644
--- a/src/gui/opengl/qopenglqueryhelper_p.h
+++ b/src/gui/opengl/qopenglqueryhelper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglshadercache_meego_p.h b/src/gui/opengl/qopenglshadercache_meego_p.h
index d2467dde90..ad00717fd3 100644
--- a/src/gui/opengl/qopenglshadercache_meego_p.h
+++ b/src/gui/opengl/qopenglshadercache_meego_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglshadercache_p.h b/src/gui/opengl/qopenglshadercache_p.h
index 10160621af..d6f1c8eb23 100644
--- a/src/gui/opengl/qopenglshadercache_p.h
+++ b/src/gui/opengl/qopenglshadercache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index 5ea7a10e0d..5de79c9e1e 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -39,6 +39,7 @@
#include <QtCore/qfile.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qvector.h>
+#include <QtCore/qregularexpression.h>
#include <QtGui/qtransform.h>
#include <QtGui/QColor>
#include <QtGui/QSurfaceFormat>
@@ -47,6 +48,8 @@
#include <QtGui/qopenglfunctions_4_0_core.h>
#endif
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
/*!
@@ -401,6 +404,96 @@ static const char redefineHighp[] =
"#endif\n";
#endif
+struct QVersionDirectivePosition
+{
+ Q_DECL_CONSTEXPR QVersionDirectivePosition(int position = 0, int line = -1)
+ : position(position)
+ , line(line)
+ {
+ }
+
+ Q_DECL_CONSTEXPR bool hasPosition() const
+ {
+ return position > 0;
+ }
+
+ const int position;
+ const int line;
+};
+
+static QVersionDirectivePosition findVersionDirectivePosition(const char *source)
+{
+ Q_ASSERT(source);
+
+ QString working = QString::fromUtf8(source);
+
+ // According to the GLSL spec the #version directive must not be
+ // preceded by anything but whitespace and comments.
+ // In order to not get confused by #version directives within a
+ // multiline comment, we need to run a minimal preprocessor first.
+ enum {
+ Normal,
+ CommentStarting,
+ MultiLineComment,
+ SingleLineComment,
+ CommentEnding
+ } state = Normal;
+
+ for (QChar *c = working.begin(); c != working.end(); ++c) {
+ switch (state) {
+ case Normal:
+ if (*c == QLatin1Char('/'))
+ state = CommentStarting;
+ break;
+ case CommentStarting:
+ if (*c == QLatin1Char('*'))
+ state = MultiLineComment;
+ else if (*c == QLatin1Char('/'))
+ state = SingleLineComment;
+ else
+ state = Normal;
+ break;
+ case MultiLineComment:
+ if (*c == QLatin1Char('*'))
+ state = CommentEnding;
+ else if (*c == QLatin1Char('#'))
+ *c = QLatin1Char('_');
+ break;
+ case SingleLineComment:
+ if (*c == QLatin1Char('\n'))
+ state = Normal;
+ else if (*c == QLatin1Char('#'))
+ *c = QLatin1Char('_');
+ break;
+ case CommentEnding:
+ if (*c == QLatin1Char('/')) {
+ state = Normal;
+ } else {
+ if (*c == QLatin1Char('#'))
+ *c = QLatin1Char('_');
+ if (*c != QLatin1Char('*'))
+ state = MultiLineComment;
+ }
+ break;
+ }
+ }
+
+ // Search for #version directive
+ int splitPosition = 0;
+ int linePosition = 1;
+
+ static const QRegularExpression pattern(QStringLiteral("^\\s*#\\s*version.*(\\n)?"),
+ QRegularExpression::MultilineOption
+ | QRegularExpression::OptimizeOnFirstUsageOption);
+ QRegularExpressionMatch match = pattern.match(working);
+ if (match.hasMatch()) {
+ splitPosition = match.capturedEnd();
+ linePosition += int(std::count(working.begin(), working.begin() + splitPosition, QLatin1Char('\n')));
+ }
+
+ return QVersionDirectivePosition(splitPosition, linePosition);
+}
+
/*!
Sets the \a source code for this shader and compiles it.
Returns \c true if the source was successfully compiled, false otherwise.
@@ -410,26 +503,24 @@ static const char redefineHighp[] =
bool QOpenGLShader::compileSourceCode(const char *source)
{
Q_D(QOpenGLShader);
- if (d->shaderGuard && d->shaderGuard->id()) {
- QVarLengthArray<const char *, 4> src;
- QVarLengthArray<GLint, 4> srclen;
- int headerLen = 0;
- while (source && source[headerLen] == '#') {
- // Skip #version and #extension directives at the start of
- // the shader code. We need to insert the qualifierDefines
- // and redefineHighp just after them.
- if (qstrncmp(source + headerLen, "#version", 8) != 0 &&
- qstrncmp(source + headerLen, "#extension", 10) != 0) {
- break;
- }
- while (source[headerLen] != '\0' && source[headerLen] != '\n')
- ++headerLen;
- if (source[headerLen] == '\n')
- ++headerLen;
- }
- if (headerLen > 0) {
- src.append(source);
- srclen.append(GLint(headerLen));
+ // This method breaks the shader code into two parts:
+ // 1. Up to and including an optional #version directive.
+ // 2. The rest.
+ // If a #version directive exists, qualifierDefines and redefineHighp
+ // are inserted after. Otherwise they are inserted right at the start.
+ // In both cases a #line directive is appended in order to compensate
+ // for line number changes in case of compiler errors.
+
+ if (d->shaderGuard && d->shaderGuard->id() && source) {
+ const QVersionDirectivePosition versionDirectivePosition = findVersionDirectivePosition(source);
+
+ QVarLengthArray<const char *, 5> sourceChunks;
+ QVarLengthArray<GLint, 5> sourceChunkLengths;
+
+ if (versionDirectivePosition.hasPosition()) {
+ // Append source up to #version directive
+ sourceChunks.append(source);
+ sourceChunkLengths.append(GLint(versionDirectivePosition.position));
}
// The precision qualifiers are useful on OpenGL/ES systems,
@@ -442,20 +533,28 @@ bool QOpenGLShader::compileSourceCode(const char *source)
|| true
#endif
) {
- src.append(qualifierDefines);
- srclen.append(GLint(sizeof(qualifierDefines) - 1));
+ sourceChunks.append(qualifierDefines);
+ sourceChunkLengths.append(GLint(sizeof(qualifierDefines) - 1));
}
#ifdef QOpenGL_REDEFINE_HIGHP
if (d->shaderType == Fragment && !ctx_d->workaround_missingPrecisionQualifiers
&& QOpenGLContext::currentContext()->isOpenGLES()) {
- src.append(redefineHighp);
- srclen.append(GLint(sizeof(redefineHighp) - 1));
+ sourceChunks.append(redefineHighp);
+ sourceChunkLengths.append(GLint(sizeof(redefineHighp) - 1));
}
#endif
- src.append(source + headerLen);
- srclen.append(GLint(qstrlen(source + headerLen)));
- d->glfuncs->glShaderSource(d->shaderGuard->id(), src.size(), src.data(), srclen.data());
+
+ // Append #line directive in order to compensate for text insertion
+ QByteArray lineDirective = QStringLiteral("#line %1\n").arg(versionDirectivePosition.line).toUtf8();
+ sourceChunks.append(lineDirective.constData());
+ sourceChunkLengths.append(GLint(lineDirective.length()));
+
+ // Append rest of shader code
+ sourceChunks.append(source + versionDirectivePosition.position);
+ sourceChunkLengths.append(GLint(qstrlen(source + versionDirectivePosition.position)));
+
+ d->glfuncs->glShaderSource(d->shaderGuard->id(), sourceChunks.size(), sourceChunks.data(), sourceChunkLengths.data());
return d->compile(this);
} else {
return false;
@@ -1871,6 +1970,9 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, GLint value)
Sets the uniform variable at \a location in the current context to \a value.
This function should be used when setting sampler values.
+ \note This function is not aware of unsigned int support in modern OpenGL
+ versions and therefore treats \a value as a GLint and calls glUniform1i.
+
\sa setAttributeValue()
*/
void QOpenGLShaderProgram::setUniformValue(int location, GLuint value)
@@ -1887,6 +1989,9 @@ void QOpenGLShaderProgram::setUniformValue(int location, GLuint value)
Sets the uniform variable called \a name in the current context
to \a value. This function should be used when setting sampler values.
+ \note This function is not aware of unsigned int support in modern OpenGL
+ versions and therefore treats \a value as a GLint and calls glUniform1i.
+
\sa setAttributeValue()
*/
void QOpenGLShaderProgram::setUniformValue(const char *name, GLuint value)
@@ -2654,6 +2759,9 @@ void QOpenGLShaderProgram::setUniformValueArray
context to the \a count elements of \a values. This overload
should be used when setting an array of sampler values.
+ \note This function is not aware of unsigned int support in modern OpenGL
+ versions and therefore treats \a values as a GLint and calls glUniform1iv.
+
\sa setAttributeValue()
*/
void QOpenGLShaderProgram::setUniformValueArray(int location, const GLuint *values, int count)
diff --git a/src/gui/opengl/qopenglshaderprogram.h b/src/gui/opengl/qopenglshaderprogram.h
index 378304cedd..9f5957e612 100644
--- a/src/gui/opengl/qopenglshaderprogram.h
+++ b/src/gui/opengl/qopenglshaderprogram.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index f5218ef4f3..9bc9926b70 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -64,6 +64,8 @@ QOpenGLTexturePrivate::QOpenGLTexturePrivate(QOpenGLTexture::Target textureTarge
baseLevel(0),
maxLevel(1000),
depthStencilMode(QOpenGLTexture::DepthMode),
+ comparisonFunction(QOpenGLTexture::CompareLessEqual),
+ comparisonMode(QOpenGLTexture::CompareNone),
minFilter(QOpenGLTexture::Nearest),
magFilter(QOpenGLTexture::Nearest),
maxAnisotropy(1.0f),
@@ -294,16 +296,166 @@ int QOpenGLTexturePrivate::evaluateMipLevels() const
}
}
-void QOpenGLTexturePrivate::allocateStorage()
+static bool isSizedTextureFormat(QOpenGLTexture::TextureFormat internalFormat)
+{
+ switch (internalFormat) {
+ case QOpenGLTexture::NoFormat:
+ return false;
+
+ case QOpenGLTexture::R8_UNorm:
+ case QOpenGLTexture::RG8_UNorm:
+ case QOpenGLTexture::RGB8_UNorm:
+ case QOpenGLTexture::RGBA8_UNorm:
+ case QOpenGLTexture::R16_UNorm:
+ case QOpenGLTexture::RG16_UNorm:
+ case QOpenGLTexture::RGB16_UNorm:
+ case QOpenGLTexture::RGBA16_UNorm:
+ case QOpenGLTexture::R8_SNorm:
+ case QOpenGLTexture::RG8_SNorm:
+ case QOpenGLTexture::RGB8_SNorm:
+ case QOpenGLTexture::RGBA8_SNorm:
+ case QOpenGLTexture::R16_SNorm:
+ case QOpenGLTexture::RG16_SNorm:
+ case QOpenGLTexture::RGB16_SNorm:
+ case QOpenGLTexture::RGBA16_SNorm:
+ case QOpenGLTexture::R8U:
+ case QOpenGLTexture::RG8U:
+ case QOpenGLTexture::RGB8U:
+ case QOpenGLTexture::RGBA8U:
+ case QOpenGLTexture::R16U:
+ case QOpenGLTexture::RG16U:
+ case QOpenGLTexture::RGB16U:
+ case QOpenGLTexture::RGBA16U:
+ case QOpenGLTexture::R32U:
+ case QOpenGLTexture::RG32U:
+ case QOpenGLTexture::RGB32U:
+ case QOpenGLTexture::RGBA32U:
+ case QOpenGLTexture::R8I:
+ case QOpenGLTexture::RG8I:
+ case QOpenGLTexture::RGB8I:
+ case QOpenGLTexture::RGBA8I:
+ case QOpenGLTexture::R16I:
+ case QOpenGLTexture::RG16I:
+ case QOpenGLTexture::RGB16I:
+ case QOpenGLTexture::RGBA16I:
+ case QOpenGLTexture::R32I:
+ case QOpenGLTexture::RG32I:
+ case QOpenGLTexture::RGB32I:
+ case QOpenGLTexture::RGBA32I:
+ case QOpenGLTexture::R16F:
+ case QOpenGLTexture::RG16F:
+ case QOpenGLTexture::RGB16F:
+ case QOpenGLTexture::RGBA16F:
+ case QOpenGLTexture::R32F:
+ case QOpenGLTexture::RG32F:
+ case QOpenGLTexture::RGB32F:
+ case QOpenGLTexture::RGBA32F:
+ case QOpenGLTexture::RGB9E5:
+ case QOpenGLTexture::RG11B10F:
+ case QOpenGLTexture::RG3B2:
+ case QOpenGLTexture::R5G6B5:
+ case QOpenGLTexture::RGB5A1:
+ case QOpenGLTexture::RGBA4:
+ case QOpenGLTexture::RGB10A2:
+
+ case QOpenGLTexture::D16:
+ case QOpenGLTexture::D24:
+ case QOpenGLTexture::D32:
+ case QOpenGLTexture::D32F:
+
+ case QOpenGLTexture::D24S8:
+ case QOpenGLTexture::D32FS8X24:
+
+ case QOpenGLTexture::S8:
+
+ case QOpenGLTexture::RGB_DXT1:
+ case QOpenGLTexture::RGBA_DXT1:
+ case QOpenGLTexture::RGBA_DXT3:
+ case QOpenGLTexture::RGBA_DXT5:
+ case QOpenGLTexture::R_ATI1N_UNorm:
+ case QOpenGLTexture::R_ATI1N_SNorm:
+ case QOpenGLTexture::RG_ATI2N_UNorm:
+ case QOpenGLTexture::RG_ATI2N_SNorm:
+ case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
+ case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
+ case QOpenGLTexture::RGB_BP_UNorm:
+ case QOpenGLTexture::SRGB8:
+ case QOpenGLTexture::SRGB8_Alpha8:
+ case QOpenGLTexture::SRGB_DXT1:
+ case QOpenGLTexture::SRGB_Alpha_DXT1:
+ case QOpenGLTexture::SRGB_Alpha_DXT3:
+ case QOpenGLTexture::SRGB_Alpha_DXT5:
+ case QOpenGLTexture::SRGB_BP_UNorm:
+ case QOpenGLTexture::R11_EAC_UNorm:
+ case QOpenGLTexture::R11_EAC_SNorm:
+ case QOpenGLTexture::RG11_EAC_UNorm:
+ case QOpenGLTexture::RG11_EAC_SNorm:
+ case QOpenGLTexture::RGB8_ETC2:
+ case QOpenGLTexture::SRGB8_ETC2:
+ case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::RGBA8_ETC2_EAC:
+ case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
+ return true;
+
+ case QOpenGLTexture::DepthFormat:
+ case QOpenGLTexture::AlphaFormat:
+
+ case QOpenGLTexture::RGBFormat:
+ case QOpenGLTexture::RGBAFormat:
+
+ case QOpenGLTexture::LuminanceFormat:
+
+ case QOpenGLTexture::LuminanceAlphaFormat:
+ return false;
+ }
+
+ Q_UNREACHABLE();
+ return false;
+}
+
+static bool isTextureTargetMultisample(QOpenGLTexture::Target target)
+{
+ switch (target) {
+ case QOpenGLTexture::Target1D:
+ case QOpenGLTexture::Target1DArray:
+ case QOpenGLTexture::Target2D:
+ case QOpenGLTexture::Target2DArray:
+ case QOpenGLTexture::Target3D:
+ case QOpenGLTexture::TargetCubeMap:
+ case QOpenGLTexture::TargetCubeMapArray:
+ return false;
+
+ case QOpenGLTexture::Target2DMultisample:
+ case QOpenGLTexture::Target2DMultisampleArray:
+ return true;
+
+ case QOpenGLTexture::TargetRectangle:
+ case QOpenGLTexture::TargetBuffer:
+ return false;
+ }
+
+ Q_UNREACHABLE();
+ return false;
+}
+
+void QOpenGLTexturePrivate::allocateStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)
{
// Resolve the actual number of mipmap levels we can use
mipLevels = evaluateMipLevels();
- // Use immutable storage whenever possible, falling back to mutable when not available
- if (features.testFlag(QOpenGLTexture::ImmutableStorage))
+ // Use immutable storage whenever possible, falling back to mutable
+ // Note that if multisample textures are not supported at all, we'll still fail into
+ // the mutable storage allocation
+ const bool useImmutableStorage = isSizedTextureFormat(format)
+ && (isTextureTargetMultisample(target)
+ ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage)
+ : features.testFlag(QOpenGLTexture::ImmutableStorage));
+
+ if (useImmutableStorage)
allocateImmutableStorage();
else
- allocateMutableStorage();
+ allocateMutableStorage(pixelFormat, pixelType);
}
static QOpenGLTexture::PixelFormat pixelFormatCompatibleWithInternalFormat(QOpenGLTexture::TextureFormat internalFormat)
@@ -313,59 +465,167 @@ static QOpenGLTexture::PixelFormat pixelFormatCompatibleWithInternalFormat(QOpen
return QOpenGLTexture::NoSourceFormat;
case QOpenGLTexture::R8_UNorm:
+ return QOpenGLTexture::Red;
+
case QOpenGLTexture::RG8_UNorm:
+ return QOpenGLTexture::RG;
+
case QOpenGLTexture::RGB8_UNorm:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGBA8_UNorm:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::R16_UNorm:
+ return QOpenGLTexture::Red;
+
case QOpenGLTexture::RG16_UNorm:
+ return QOpenGLTexture::RG;
+
case QOpenGLTexture::RGB16_UNorm:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGBA16_UNorm:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::R8_SNorm:
+ return QOpenGLTexture::Red;
+
case QOpenGLTexture::RG8_SNorm:
+ return QOpenGLTexture::RG;
+
case QOpenGLTexture::RGB8_SNorm:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGBA8_SNorm:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::R16_SNorm:
+ return QOpenGLTexture::Red;
+
case QOpenGLTexture::RG16_SNorm:
+ return QOpenGLTexture::RG;
+
case QOpenGLTexture::RGB16_SNorm:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGBA16_SNorm:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::R8U:
+ return QOpenGLTexture::Red_Integer;
+
case QOpenGLTexture::RG8U:
+ return QOpenGLTexture::RG_Integer;
+
case QOpenGLTexture::RGB8U:
+ return QOpenGLTexture::RGB_Integer;
+
case QOpenGLTexture::RGBA8U:
+ return QOpenGLTexture::RGBA_Integer;
+
case QOpenGLTexture::R16U:
+ return QOpenGLTexture::Red_Integer;
+
case QOpenGLTexture::RG16U:
+ return QOpenGLTexture::RG_Integer;
+
case QOpenGLTexture::RGB16U:
+ return QOpenGLTexture::RGB_Integer;
+
case QOpenGLTexture::RGBA16U:
+ return QOpenGLTexture::RGBA_Integer;
+
case QOpenGLTexture::R32U:
+ return QOpenGLTexture::Red_Integer;
+
case QOpenGLTexture::RG32U:
+ return QOpenGLTexture::RG_Integer;
+
case QOpenGLTexture::RGB32U:
+ return QOpenGLTexture::RGB_Integer;
+
case QOpenGLTexture::RGBA32U:
+ return QOpenGLTexture::RGBA_Integer;
+
case QOpenGLTexture::R8I:
+ return QOpenGLTexture::Red_Integer;
+
case QOpenGLTexture::RG8I:
+ return QOpenGLTexture::RG_Integer;
+
case QOpenGLTexture::RGB8I:
+ return QOpenGLTexture::RGB_Integer;
+
case QOpenGLTexture::RGBA8I:
+ return QOpenGLTexture::RGBA_Integer;
+
case QOpenGLTexture::R16I:
+ return QOpenGLTexture::Red_Integer;
+
case QOpenGLTexture::RG16I:
+ return QOpenGLTexture::RG_Integer;
+
case QOpenGLTexture::RGB16I:
+ return QOpenGLTexture::RGB_Integer;
+
case QOpenGLTexture::RGBA16I:
+ return QOpenGLTexture::RGBA_Integer;
+
case QOpenGLTexture::R32I:
+ return QOpenGLTexture::Red_Integer;
+
case QOpenGLTexture::RG32I:
+ return QOpenGLTexture::RG_Integer;
+
case QOpenGLTexture::RGB32I:
+ return QOpenGLTexture::RGB_Integer;
+
case QOpenGLTexture::RGBA32I:
+ return QOpenGLTexture::RGBA_Integer;
+
case QOpenGLTexture::R16F:
+ return QOpenGLTexture::Red;
+
case QOpenGLTexture::RG16F:
+ return QOpenGLTexture::RG;
+
case QOpenGLTexture::RGB16F:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGBA16F:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::R32F:
+ return QOpenGLTexture::Red;
+
case QOpenGLTexture::RG32F:
+ return QOpenGLTexture::RG;
+
case QOpenGLTexture::RGB32F:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGBA32F:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::RGB9E5:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RG11B10F:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RG3B2:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::R5G6B5:
+ return QOpenGLTexture::RGB;
+
case QOpenGLTexture::RGB5A1:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::RGBA4:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::RGB10A2:
return QOpenGLTexture::RGBA;
@@ -402,6 +662,26 @@ static QOpenGLTexture::PixelFormat pixelFormatCompatibleWithInternalFormat(QOpen
case QOpenGLTexture::SRGB_BP_UNorm:
return QOpenGLTexture::RGBA;
+ case QOpenGLTexture::R11_EAC_UNorm:
+ case QOpenGLTexture::R11_EAC_SNorm:
+ return QOpenGLTexture::Red;
+
+ case QOpenGLTexture::RG11_EAC_UNorm:
+ case QOpenGLTexture::RG11_EAC_SNorm:
+ return QOpenGLTexture::RG;
+
+ case QOpenGLTexture::RGB8_ETC2:
+ case QOpenGLTexture::SRGB8_ETC2:
+ return QOpenGLTexture::RGB;
+
+ case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
+ return QOpenGLTexture::RGBA;
+
+ case QOpenGLTexture::RGBA8_ETC2_EAC:
+ case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
+ return QOpenGLTexture::RGBA;
+
case QOpenGLTexture::DepthFormat:
return QOpenGLTexture::Depth;
@@ -437,6 +717,8 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe
case QOpenGLTexture::RG16_UNorm:
case QOpenGLTexture::RGB16_UNorm:
case QOpenGLTexture::RGBA16_UNorm:
+ return QOpenGLTexture::UInt8;
+
case QOpenGLTexture::R8_SNorm:
case QOpenGLTexture::RG8_SNorm:
case QOpenGLTexture::RGB8_SNorm:
@@ -445,6 +727,8 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe
case QOpenGLTexture::RG16_SNorm:
case QOpenGLTexture::RGB16_SNorm:
case QOpenGLTexture::RGBA16_SNorm:
+ return QOpenGLTexture::Int8;
+
case QOpenGLTexture::R8U:
case QOpenGLTexture::RG8U:
case QOpenGLTexture::RGB8U:
@@ -457,6 +741,8 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe
case QOpenGLTexture::RG32U:
case QOpenGLTexture::RGB32U:
case QOpenGLTexture::RGBA32U:
+ return QOpenGLTexture::UInt8;
+
case QOpenGLTexture::R8I:
case QOpenGLTexture::RG8I:
case QOpenGLTexture::RGB8I:
@@ -469,28 +755,50 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe
case QOpenGLTexture::RG32I:
case QOpenGLTexture::RGB32I:
case QOpenGLTexture::RGBA32I:
+ return QOpenGLTexture::Int8;
+
case QOpenGLTexture::R16F:
case QOpenGLTexture::RG16F:
case QOpenGLTexture::RGB16F:
case QOpenGLTexture::RGBA16F:
+ return QOpenGLTexture::Float16;
+
case QOpenGLTexture::R32F:
case QOpenGLTexture::RG32F:
case QOpenGLTexture::RGB32F:
case QOpenGLTexture::RGBA32F:
+ return QOpenGLTexture::Float32;
+
case QOpenGLTexture::RGB9E5:
+ return QOpenGLTexture::UInt16_RGB5A1_Rev;
+
case QOpenGLTexture::RG11B10F:
+ return QOpenGLTexture::UInt32_RG11B10F;
+
case QOpenGLTexture::RG3B2:
+ return QOpenGLTexture::UInt8_RG3B2;
+
case QOpenGLTexture::R5G6B5:
+ return QOpenGLTexture::UInt16_R5G6B5;
+
case QOpenGLTexture::RGB5A1:
+ return QOpenGLTexture::UInt16_RGB5A1;
+
case QOpenGLTexture::RGBA4:
+ return QOpenGLTexture::UInt16_RGBA4;
+
case QOpenGLTexture::RGB10A2:
- return QOpenGLTexture::UInt8;
+ return QOpenGLTexture::UInt32_RGB10A2;
case QOpenGLTexture::D16:
+ return QOpenGLTexture::UInt16;
+
case QOpenGLTexture::D24:
case QOpenGLTexture::D32:
+ return QOpenGLTexture::UInt32;
+
case QOpenGLTexture::D32F:
- return QOpenGLTexture::UInt8;
+ return QOpenGLTexture::Float32;
case QOpenGLTexture::D24S8:
return QOpenGLTexture::UInt32_D24S8;
@@ -519,6 +827,16 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe
case QOpenGLTexture::SRGB_Alpha_DXT3:
case QOpenGLTexture::SRGB_Alpha_DXT5:
case QOpenGLTexture::SRGB_BP_UNorm:
+ case QOpenGLTexture::R11_EAC_UNorm:
+ case QOpenGLTexture::R11_EAC_SNorm:
+ case QOpenGLTexture::RG11_EAC_UNorm:
+ case QOpenGLTexture::RG11_EAC_SNorm:
+ case QOpenGLTexture::RGB8_ETC2:
+ case QOpenGLTexture::SRGB8_ETC2:
+ case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::RGBA8_ETC2_EAC:
+ case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
return QOpenGLTexture::UInt8;
case QOpenGLTexture::DepthFormat:
@@ -536,11 +854,8 @@ static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTe
return QOpenGLTexture::NoPixelType;
}
-void QOpenGLTexturePrivate::allocateMutableStorage()
+void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)
{
- const QOpenGLTexture::PixelFormat pixelFormat = pixelFormatCompatibleWithInternalFormat(format);
- const QOpenGLTexture::PixelType pixelType = pixelTypeCompatibleWithInternalFormat(format);
-
switch (target) {
case QOpenGLTexture::TargetBuffer:
// Buffer textures get their storage from an external OpenGL buffer
@@ -749,7 +1064,7 @@ void QOpenGLTexturePrivate::allocateImmutableStorage()
break;
case QOpenGLTexture::Target2DMultisample:
- if (features.testFlag(QOpenGLTexture::TextureMultisample)) {
+ if (features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage)) {
texFuncs->glTextureStorage2DMultisample(textureId, target, bindingTarget, samples, format,
dimensions[0], dimensions[1],
fixedSamplePositions);
@@ -760,7 +1075,7 @@ void QOpenGLTexturePrivate::allocateImmutableStorage()
break;
case QOpenGLTexture::Target2DMultisampleArray:
- if (features.testFlag(QOpenGLTexture::TextureMultisample)
+ if (features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage)
&& features.testFlag(QOpenGLTexture::TextureArrays)) {
texFuncs->glTextureStorage3DMultisample(textureId, target, bindingTarget, samples, format,
dimensions[0], dimensions[1], layers,
@@ -1527,6 +1842,16 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target
\value RGB_BP_UNSIGNED_FLOAT Equivalent to GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
\value RGB_BP_SIGNED_FLOAT Equivalent to GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
\value RGB_BP_UNorm Equivalent to GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
+ \value R11_EAC_UNorm Equivalent to GL_COMPRESSED_R11_EAC
+ \value R11_EAC_SNorm Equivalent to GL_COMPRESSED_SIGNED_R11_EAC
+ \value RG11_EAC_UNorm Equivalent to GL_COMPRESSED_RG11_EAC
+ \value RG11_EAC_SNorm Equivalent to GL_COMPRESSED_SIGNED_RG11_EAC
+ \value RGB8_ETC2 Equivalent to GL_COMPRESSED_RGB8_ETC2
+ \value SRGB8_ETC2 Equivalent to GL_COMPRESSED_SRGB8_ETC2
+ \value RGB8_PunchThrough_Alpha1_ETC2 Equivalent to GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
+ \value SRGB8_PunchThrough_Alpha1_ETC2 Equivalent to GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
+ \value RGBA8_ETC2_EAC Equivalent to GL_COMPRESSED_RGBA8_ETC2_EAC
+ \value SRGB8_Alpha8_ETC2_EAC Equivalent to GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
\value SRGB8 Equivalent to GL_SRGB8
\value SRGB8_Alpha8 Equivalent to GL_SRGB8_ALPHA8
@@ -1637,6 +1962,8 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target
\value NPOTTextureRepeat Full support for non-power-of-two textures including texture
repeat modes
\value Texture1D Support for the 1 dimensional texture target
+ \value TextureComparisonOperators Support for texture comparison operators
+ \value TextureMipMapLevel Support for setting the base and maximum mipmap levels
*/
/*!
@@ -2052,6 +2379,16 @@ void QOpenGLTexture::setFormat(TextureFormat format)
d->formatClass = FormatClass_S3TC_DXT5_RGBA;
break;
+ case QOpenGLTexture::R11_EAC_UNorm:
+ case QOpenGLTexture::R11_EAC_SNorm:
+ case QOpenGLTexture::RG11_EAC_UNorm:
+ case QOpenGLTexture::RG11_EAC_SNorm:
+ case QOpenGLTexture::RGB8_ETC2:
+ case QOpenGLTexture::SRGB8_ETC2:
+ case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
+ case QOpenGLTexture::RGBA8_ETC2_EAC:
+ case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
case RG3B2:
case R5G6B5:
case RGB5A1:
@@ -2438,17 +2775,58 @@ bool QOpenGLTexture::isFixedSamplePositions() const
Once storage has been allocated for the texture then pixel data
can be uploaded via one of the setData() overloads.
+ \note If immutable texture storage is not available,
+ then a default pixel format and pixel type will be used to
+ create the mutable storage. You can use the other
+ allocateStorage() overload to specify exactly the pixel format
+ and the pixel type to use when allocating mutable storage;
+ this is particulary useful under certain OpenGL ES implementations
+ (notably, OpenGL ES 2), where the pixel format and the pixel type
+ used at allocation time must perfectly match the format
+ and the type passed to any subsequent setData() call.
+
\sa isStorageAllocated(), setData()
*/
void QOpenGLTexture::allocateStorage()
{
Q_D(QOpenGLTexture);
if (d->create()) {
- d->allocateStorage();
+ const QOpenGLTexture::PixelFormat pixelFormat = pixelFormatCompatibleWithInternalFormat(d->format);
+ const QOpenGLTexture::PixelType pixelType = pixelTypeCompatibleWithInternalFormat(d->format);
+ d->allocateStorage(pixelFormat, pixelType);
}
}
/*!
+ \since 5.5
+
+ Allocates server-side storage for this texture object taking
+ into account, the format, dimensions, mipmap levels, array
+ layers and cubemap faces.
+
+ Once storage has been allocated it is no longer possible to change
+ these properties.
+
+ If supported QOpenGLTexture makes use of immutable texture
+ storage. However, if immutable texture storage is not available,
+ then the specified \a pixelFormat and \a pixelType will be used
+ to allocate mutable storage; note that in certain OpenGL implementations
+ (notably, OpenGL ES 2) they must perfectly match the format
+ and the type passed to any subsequent setData() call.
+
+ Once storage has been allocated for the texture then pixel data
+ can be uploaded via one of the setData() overloads.
+
+ \sa isStorageAllocated(), setData()
+*/
+void QOpenGLTexture::allocateStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)
+{
+ Q_D(QOpenGLTexture);
+ if (d->create())
+ d->allocateStorage(pixelFormat, pixelType);
+}
+
+/*!
Returns \c true if server-side storage for this texture as been
allocated.
@@ -2549,7 +2927,7 @@ void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
- "To do so call allocate() before this function");
+ "To do so call allocateStorage() before this function");
return;
}
d->setData(mipLevel, layer, cubeFace, sourceFormat, sourceType, data, options);
@@ -2608,7 +2986,7 @@ void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
- "To do so call allocate() before this function");
+ "To do so call allocateStorage() before this function");
return;
}
d->setData(mipLevel, layer, cubeFace, sourceFormat, sourceType, data, options);
@@ -2674,7 +3052,7 @@ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
setSize(image.width(), image.height());
setMipLevels(genMipMaps == GenerateMipMaps ? maximumMipLevels() : 1);
- allocateStorage();
+ allocateStorage(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8);
// Upload pixel data and generate mipmaps
QImage glImage = image.convertToFormat(QImage::Format_RGBA8888);
@@ -2701,7 +3079,7 @@ void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cube
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
- "To do so call allocate() before this function");
+ "To do so call allocateStorage() before this function");
return;
}
d->setCompressedData(mipLevel, layer, cubeFace, dataSize, data, options);
@@ -2753,7 +3131,7 @@ void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cube
Q_ASSERT(d->textureId);
if (!isStorageAllocated()) {
qWarning("Cannot set data on a texture that does not have storage allocated.\n"
- "To do so call allocate() before this function");
+ "To do so call allocateStorage() before this function");
return;
}
d->setCompressedData(mipLevel, layer, cubeFace, dataSize, data, options);
@@ -2832,7 +3210,8 @@ bool QOpenGLTexture::hasFeature(Feature feature)
case ImmutableStorage:
supported = f.version() >= qMakePair(4, 2)
- || ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_storage"));
+ || ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_storage"))
+ || ctx->hasExtension(QByteArrayLiteral("GL_EXT_texture_storage"));
break;
case TextureCubeMapArrays:
@@ -2877,10 +3256,21 @@ bool QOpenGLTexture::hasFeature(Feature feature)
supported = f.version() >= qMakePair(1, 1);
break;
- case MaxFeatureFlag:
+ case TextureComparisonOperators:
+ // GL 1.4 and GL_ARB_shadow alone support only LEQUAL and GEQUAL;
+ // since we're talking about history anyhow avoid to be extra pedantic
+ // in the feature set, and simply claim supported if we have the full set of operators
+ // (which has been added into 1.5 / GL_EXT_shadow_funcs).
+ supported = f.version() >= qMakePair(1, 5)
+ || (ctx->hasExtension(QByteArrayLiteral("GL_ARB_shadow"))
+ && ctx->hasExtension(QByteArrayLiteral("GL_EXT_shadow_funcs")));
+ break;
+
+ case TextureMipMapLevel:
+ supported = f.version() >= qMakePair(1, 2);
break;
- default:
+ case MaxFeatureFlag:
break;
}
}
@@ -2888,22 +3278,70 @@ bool QOpenGLTexture::hasFeature(Feature feature)
if (ctx->isOpenGLES())
#endif
{
+ const char *renderer = reinterpret_cast<const char *>(ctx->functions()->glGetString(GL_RENDERER));
switch (feature) {
+ case ImmutableStorage:
+ supported = (f.version() >= qMakePair(3, 0) || ctx->hasExtension(QByteArrayLiteral("EXT_texture_storage")))
+ && !(renderer && strstr(renderer, "Mali")); // do not use on Mali: QTBUG-45106
+ break;
+
+ case ImmutableMultisampleStorage:
+ supported = f.version() >= qMakePair(3, 1);
+ break;
+
+ case TextureRectangle:
+ break;
+
+ case TextureArrays:
+ supported = f.version() >= qMakePair(3, 0);
+ break;
+
case Texture3D:
- supported = ctx->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"));
+ supported = f.version() >= qMakePair(3, 0)
+ || ctx->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"));
break;
+
+ case TextureMultisample:
+ supported = f.version() >= qMakePair(3, 1);
+ break;
+
+ case TextureBuffer:
+ break;
+
+ case TextureCubeMapArrays:
+ break;
+
+ case Swizzle:
+ supported = f.version() >= qMakePair(3, 0);
+ break;
+
+ case StencilTexturing:
+ break;
+
case AnisotropicFiltering:
supported = ctx->hasExtension(QByteArrayLiteral("GL_EXT_texture_filter_anisotropic"));
break;
+
case NPOTTextures:
case NPOTTextureRepeat:
- supported = f.version() >= qMakePair(3,0);
- if (!supported) {
- supported = ctx->hasExtension(QByteArrayLiteral("GL_OES_texture_npot"));
- if (!supported)
- supported = ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_non_power_of_two"));
- }
- default:
+ supported = f.version() >= qMakePair(3,0)
+ || ctx->hasExtension(QByteArrayLiteral("GL_OES_texture_npot"))
+ || ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_non_power_of_two"));
+ break;
+
+ case Texture1D:
+ break;
+
+ case TextureComparisonOperators:
+ supported = f.version() >= qMakePair(3, 0)
+ || ctx->hasExtension(QByteArrayLiteral("GL_EXT_shadow_samplers"));
+ break;
+
+ case TextureMipMapLevel:
+ supported = f.version() >= qMakePair(3, 0);
+ break;
+
+ case MaxFeatureFlag:
break;
}
}
@@ -2919,21 +3357,17 @@ bool QOpenGLTexture::hasFeature(Feature feature)
*/
void QOpenGLTexture::setMipBaseLevel(int baseLevel)
{
-#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLContext::currentContext()->isOpenGLES()) {
- Q_D(QOpenGLTexture);
- d->create();
- Q_ASSERT(d->textureId);
- Q_ASSERT(d->texFuncs);
- Q_ASSERT(baseLevel <= d->maxLevel);
- d->baseLevel = baseLevel;
- d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_BASE_LEVEL, baseLevel);
+ Q_D(QOpenGLTexture);
+ d->create();
+ if (!d->features.testFlag(TextureMipMapLevel)) {
+ qWarning("QOpenGLTexture::setMipBaseLevel: requires OpenGL >= 1.2 or OpenGL ES >= 3.0");
return;
}
-#else
- Q_UNUSED(baseLevel);
-#endif
- qWarning("QOpenGLTexture: Mipmap base level is not supported");
+ Q_ASSERT(d->textureId);
+ Q_ASSERT(d->texFuncs);
+ Q_ASSERT(baseLevel <= d->maxLevel);
+ d->baseLevel = baseLevel;
+ d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_BASE_LEVEL, baseLevel);
}
/*!
@@ -2956,21 +3390,17 @@ int QOpenGLTexture::mipBaseLevel() const
*/
void QOpenGLTexture::setMipMaxLevel(int maxLevel)
{
-#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLContext::currentContext()->isOpenGLES()) {
- Q_D(QOpenGLTexture);
- d->create();
- Q_ASSERT(d->textureId);
- Q_ASSERT(d->texFuncs);
- Q_ASSERT(d->baseLevel <= maxLevel);
- d->maxLevel = maxLevel;
- d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_MAX_LEVEL, maxLevel);
+ Q_D(QOpenGLTexture);
+ d->create();
+ if (!d->features.testFlag(TextureMipMapLevel)) {
+ qWarning("QOpenGLTexture::setMipMaxLevel: requires OpenGL >= 1.2 or OpenGL ES >= 3.0");
return;
}
-#else
- Q_UNUSED(maxLevel);
-#endif
- qWarning("QOpenGLTexture: Mipmap max level is not supported");
+ Q_ASSERT(d->textureId);
+ Q_ASSERT(d->texFuncs);
+ Q_ASSERT(d->baseLevel <= maxLevel);
+ d->maxLevel = maxLevel;
+ d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_MAX_LEVEL, maxLevel);
}
/*!
@@ -2993,22 +3423,17 @@ int QOpenGLTexture::mipMaxLevel() const
*/
void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel)
{
-#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLContext::currentContext()->isOpenGLES()) {
- Q_D(QOpenGLTexture);
- d->create();
- Q_ASSERT(d->textureId);
- Q_ASSERT(d->texFuncs);
- Q_ASSERT(baseLevel <= maxLevel);
- d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_BASE_LEVEL, baseLevel);
- d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_MAX_LEVEL, maxLevel);
+ Q_D(QOpenGLTexture);
+ d->create();
+ if (!d->features.testFlag(TextureMipMapLevel)) {
+ qWarning("QOpenGLTexture::setMipLevelRange: requires OpenGL >= 1.2 or OpenGL ES >= 3.0");
return;
}
-#else
- Q_UNUSED(baseLevel);
- Q_UNUSED(maxLevel);
-#endif
- qWarning("QOpenGLTexture: Mipmap level range is not supported");
+ Q_ASSERT(d->textureId);
+ Q_ASSERT(d->texFuncs);
+ Q_ASSERT(baseLevel <= maxLevel);
+ d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_BASE_LEVEL, baseLevel);
+ d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_MAX_LEVEL, maxLevel);
}
/*!
@@ -3169,6 +3594,16 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
}
/*!
+ \enum QOpenGLTexture::DepthStencilMode
+ \since 5.4
+ This enum specifies which component of a depth/stencil texture is
+ accessed when the texture is sampled.
+
+ \value DepthMode Equivalent to GL_DEPTH_COMPONENT.
+ \value StencilMode Equivalent to GL_STENCIL_INDEX.
+*/
+
+/*!
If using a texture that has a combined depth/stencil format this function sets
which component of the texture is accessed to \a mode.
@@ -3177,6 +3612,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
the parameter is set to StencilMode, the shader will access the stencil component.
\note This function has no effect on Mac and Qt built for OpenGL ES 2.
+ \since 5.4
\sa depthStencilMode()
*/
void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
@@ -3204,6 +3640,7 @@ void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
/*!
Returns the depth stencil mode for textures using a combined depth/stencil format.
+ \since 5.4
\sa setDepthStencilMode()
*/
QOpenGLTexture::DepthStencilMode QOpenGLTexture::depthStencilMode() const
@@ -3213,6 +3650,100 @@ QOpenGLTexture::DepthStencilMode QOpenGLTexture::depthStencilMode() const
}
/*!
+ \enum QOpenGLTexture::ComparisonFunction
+ \since 5.5
+ This enum specifies which comparison operator is used when texture comparison
+ is enabled on this texture.
+
+ \value CompareLessEqual Equivalent to GL_LEQUAL.
+ \value CompareGreaterEqual Equivalent to GL_GEQUAL.
+ \value CompareLess Equivalent to GL_LESS.
+ \value CompareGreater Equivalent to GL_GREATER.
+ \value CompareEqual Equivalent to GL_EQUAL.
+ \value CommpareNotEqual Equivalent to GL_NOTEQUAL.
+ \value CompareAlways Equivalent to GL_ALWAYS.
+ \value CompareNever Equivalent to GL_NEVER.
+
+*/
+
+/*
+ \since 5.5
+
+ Sets the texture comparison function on this texture to \a function. The texture
+ comparison function is used by shadow samplers when sampling a depth texture.
+
+ \sa comparisonFunction()
+*/
+void QOpenGLTexture::setComparisonFunction(QOpenGLTexture::ComparisonFunction function)
+{
+ Q_D(QOpenGLTexture);
+ d->create();
+ if (!d->features.testFlag(TextureComparisonOperators)) {
+ qWarning("QOpenGLTexture::setComparisonFunction: requires OpenGL >= 1.5 or OpenGL ES >= 3.0");
+ return;
+ }
+ d->comparisonFunction = function;
+ d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_COMPARE_FUNC, function);
+}
+
+/*!
+ \since 5.5
+
+ Returns the texture comparison operator set on this texture. By default, a
+ texture has a CompareLessEqual comparison function.
+
+ \sa setComparisonFunction()
+*/
+QOpenGLTexture::ComparisonFunction QOpenGLTexture::comparisonFunction() const
+{
+ Q_D(const QOpenGLTexture);
+ return d->comparisonFunction;
+}
+
+/*!
+ \enum QOpenGLTexture::ComparisonMode
+ \since 5.5
+ This enum specifies which comparison mode is used when sampling this texture.
+
+ \value CompareRefToTexture Equivalent to GL_COMPARE_REF_TO_TEXTURE.
+ \value CompareNone Equivalent to GL_NONE.
+*/
+
+/*!
+ \since 5.5
+
+ Sets the texture comparison mode on this texture to \a mode. The texture
+ comparison mode is used by shadow samplers when sampling a depth texture.
+
+ \sa comparisonMode()
+*/
+void QOpenGLTexture::setComparisonMode(QOpenGLTexture::ComparisonMode mode)
+{
+ Q_D(QOpenGLTexture);
+ d->create();
+ if (!d->features.testFlag(TextureComparisonOperators)) {
+ qWarning("QOpenGLTexture::setComparisonMode: requires OpenGL >= 1.5 or OpenGL ES >= 3.0");
+ return;
+ }
+ d->comparisonMode = mode;
+ d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, GL_TEXTURE_COMPARE_MODE, mode);
+}
+
+/*!
+ \since 5.5
+
+ Returns the texture comparison mode set on this texture. By default, a
+ texture has a CompareNone comparison mode (i.e. comparisons are disabled).
+
+ \sa setComparisonMode()
+*/
+QOpenGLTexture::ComparisonMode QOpenGLTexture::comparisonMode() const
+{
+ Q_D(const QOpenGLTexture);
+ return d->comparisonMode;
+}
+
+/*!
Sets the filter used for minification to \a filter.
\sa minificationFilter(), setMagnificationFilter(), setMinMagFilters()
@@ -3306,7 +3837,7 @@ void QOpenGLTexture::setMaximumAnisotropy(float anisotropy)
d->create();
Q_ASSERT(d->texFuncs);
Q_ASSERT(d->textureId);
- if (!d->features.testFlag(StencilTexturing)) {
+ if (!d->features.testFlag(AnisotropicFiltering)) {
qWarning("QOpenGLTexture::setMaximumAnisotropy() requires GL_EXT_texture_filter_anisotropic");
return;
}
diff --git a/src/gui/opengl/qopengltexture.h b/src/gui/opengl/qopengltexture.h
index a0b23c211c..3017aac737 100644
--- a/src/gui/opengl/qopengltexture.h
+++ b/src/gui/opengl/qopengltexture.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -88,29 +88,6 @@ public:
DontResetTextureUnit
};
- explicit QOpenGLTexture(Target target);
- explicit QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps);
- ~QOpenGLTexture();
-
- Target target() const;
-
- // Creation and destruction
- bool create();
- void destroy();
- bool isCreated() const;
- GLuint textureId() const;
-
- // Binding and releasing
- void bind();
- void bind(uint unit, TextureUnitReset reset = DontResetTextureUnit);
- void release();
- void release(uint unit, TextureUnitReset reset = DontResetTextureUnit);
-
- bool isBound() const;
- bool isBound(uint unit);
- static GLuint boundTextureId(BindingTarget target);
- static GLuint boundTextureId(uint unit, BindingTarget target);
-
enum TextureFormat {
NoFormat = 0, // GL_NONE
@@ -209,6 +186,16 @@ public:
RGB_BP_UNSIGNED_FLOAT = 0x8E8F, // GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
RGB_BP_SIGNED_FLOAT = 0x8E8E, // GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
RGB_BP_UNorm = 0x8E8C, // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
+ R11_EAC_UNorm = 0x9270, // GL_COMPRESSED_R11_EAC
+ R11_EAC_SNorm = 0x9271, // GL_COMPRESSED_SIGNED_R11_EAC
+ RG11_EAC_UNorm = 0x9272, // GL_COMPRESSED_RG11_EAC
+ RG11_EAC_SNorm = 0x9273, // GL_COMPRESSED_SIGNED_RG11_EAC
+ RGB8_ETC2 = 0x9274, // GL_COMPRESSED_RGB8_ETC2
+ SRGB8_ETC2 = 0x9275, // GL_COMPRESSED_SRGB8_ETC2
+ RGB8_PunchThrough_Alpha1_ETC2 = 0x9276, // GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
+ SRGB8_PunchThrough_Alpha1_ETC2 = 0x9277, // GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
+ RGBA8_ETC2_EAC = 0x9278, // GL_COMPRESSED_RGBA8_ETC2_EAC
+ SRGB8_Alpha8_ETC2_EAC = 0x9279, // GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
// sRGB formats
SRGB8 = 0x8C41, // GL_SRGB8
@@ -254,32 +241,6 @@ public:
};
#endif
- // Storage allocation
- void setFormat(TextureFormat format);
- TextureFormat format() const;
- void setSize(int width, int height = 1, int depth = 1);
- int width() const;
- int height() const;
- int depth() const;
- void setMipLevels(int levels);
- int mipLevels() const;
- int maximumMipLevels() const;
- void setLayers(int layers);
- int layers() const;
- int faces() const;
- void setSamples(int samples);
- int samples() const;
- void setFixedSamplePositions(bool fixed);
- bool isFixedSamplePositions() const;
- void allocateStorage();
- bool isStorageAllocated() const;
-
- QOpenGLTexture *createTextureView(Target target,
- TextureFormat viewFormat,
- int minimumMipmapLevel, int maximumMipmapLevel,
- int minimumLayer, int maximumLayer) const;
- bool isTextureView() const;
-
enum CubeMapFace {
CubeMapPositiveX = 0x8515, // GL_TEXTURE_CUBE_MAP_POSITIVE_X
CubeMapNegativeX = 0x8516, // GL_TEXTURE_CUBE_MAP_NEGATIVE_X
@@ -340,6 +301,109 @@ public:
Float32_D32_UInt32_S8_X24 = 0x8DAD // GL_FLOAT_32_UNSIGNED_INT_24_8_REV
};
+ enum SwizzleComponent {
+ SwizzleRed = 0x8E42, // GL_TEXTURE_SWIZZLE_R
+ SwizzleGreen = 0x8E43, // GL_TEXTURE_SWIZZLE_G
+ SwizzleBlue = 0x8E44, // GL_TEXTURE_SWIZZLE_B
+ SwizzleAlpha = 0x8E45 // GL_TEXTURE_SWIZZLE_A
+ };
+
+ enum SwizzleValue {
+ RedValue = 0x1903, // GL_RED
+ GreenValue = 0x1904, // GL_GREEN
+ BlueValue = 0x1905, // GL_BLUE
+ AlphaValue = 0x1906, // GL_ALPHA
+ ZeroValue = 0, // GL_ZERO
+ OneValue = 1 // GL_ONE
+ };
+
+ enum WrapMode {
+ Repeat = 0x2901, // GL_REPEAT
+ MirroredRepeat = 0x8370, // GL_MIRRORED_REPEAT
+ ClampToEdge = 0x812F, // GL_CLAMP_TO_EDGE
+ ClampToBorder = 0x812D // GL_CLAMP_TO_BORDER
+ };
+
+ enum CoordinateDirection {
+ DirectionS = 0x2802, // GL_TEXTURE_WRAP_S
+ DirectionT = 0x2803, // GL_TEXTURE_WRAP_T
+ DirectionR = 0x8072 // GL_TEXTURE_WRAP_R
+ };
+
+ // Features
+ enum Feature {
+ ImmutableStorage = 0x00000001,
+ ImmutableMultisampleStorage = 0x00000002,
+ TextureRectangle = 0x00000004,
+ TextureArrays = 0x00000008,
+ Texture3D = 0x00000010,
+ TextureMultisample = 0x00000020,
+ TextureBuffer = 0x00000040,
+ TextureCubeMapArrays = 0x00000080,
+ Swizzle = 0x00000100,
+ StencilTexturing = 0x00000200,
+ AnisotropicFiltering = 0x00000400,
+ NPOTTextures = 0x00000800,
+ NPOTTextureRepeat = 0x00001000,
+ Texture1D = 0x00002000,
+ TextureComparisonOperators = 0x00004000,
+ TextureMipMapLevel = 0x00008000,
+#ifndef Q_QDOC
+ MaxFeatureFlag = 0x00010000
+#endif
+ };
+ Q_DECLARE_FLAGS(Features, Feature)
+
+ explicit QOpenGLTexture(Target target);
+ explicit QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps);
+ ~QOpenGLTexture();
+
+ Target target() const;
+
+ // Creation and destruction
+ bool create();
+ void destroy();
+ bool isCreated() const;
+ GLuint textureId() const;
+
+ // Binding and releasing
+ void bind();
+ void bind(uint unit, TextureUnitReset reset = DontResetTextureUnit);
+ void release();
+ void release(uint unit, TextureUnitReset reset = DontResetTextureUnit);
+
+ bool isBound() const;
+ bool isBound(uint unit);
+ static GLuint boundTextureId(BindingTarget target);
+ static GLuint boundTextureId(uint unit, BindingTarget target);
+
+ // Storage allocation
+ void setFormat(TextureFormat format);
+ TextureFormat format() const;
+ void setSize(int width, int height = 1, int depth = 1);
+ int width() const;
+ int height() const;
+ int depth() const;
+ void setMipLevels(int levels);
+ int mipLevels() const;
+ int maximumMipLevels() const;
+ void setLayers(int layers);
+ int layers() const;
+ int faces() const;
+ void setSamples(int samples);
+ int samples() const;
+ void setFixedSamplePositions(bool fixed);
+ bool isFixedSamplePositions() const;
+ void allocateStorage();
+ void allocateStorage(PixelFormat pixelFormat, PixelType pixelType);
+ bool isStorageAllocated() const;
+
+ QOpenGLTexture *createTextureView(Target target,
+ TextureFormat viewFormat,
+ int minimumMipmapLevel, int maximumMipmapLevel,
+ int minimumLayer, int maximumLayer) const;
+ bool isTextureView() const;
+
// Pixel transfer
// ### Qt 6: remove the non-const void * overloads
#if QT_DEPRECATED_SINCE(5, 3)
@@ -397,28 +461,6 @@ public:
// Helpful overloads for setData
void setData(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps);
- // Features
- enum Feature {
- ImmutableStorage = 0x00000001,
- ImmutableMultisampleStorage = 0x00000002,
- TextureRectangle = 0x00000004,
- TextureArrays = 0x00000008,
- Texture3D = 0x00000010,
- TextureMultisample = 0x00000020,
- TextureBuffer = 0x00000040,
- TextureCubeMapArrays = 0x00000080,
- Swizzle = 0x00000100,
- StencilTexturing = 0x00000200,
- AnisotropicFiltering = 0x00000400,
- NPOTTextures = 0x00000800,
- NPOTTextureRepeat = 0x00001000,
- Texture1D = 0x00002000,
-#ifndef Q_QDOC
- MaxFeatureFlag = 0x00004000
-#endif
- };
- Q_DECLARE_FLAGS(Features, Feature)
-
static bool hasFeature(Feature feature);
// Texture Parameters
@@ -435,22 +477,6 @@ public:
void generateMipMaps();
void generateMipMaps(int baseLevel, bool resetBaseLevel = true);
- enum SwizzleComponent {
- SwizzleRed = 0x8E42, // GL_TEXTURE_SWIZZLE_R
- SwizzleGreen = 0x8E43, // GL_TEXTURE_SWIZZLE_G
- SwizzleBlue = 0x8E44, // GL_TEXTURE_SWIZZLE_B
- SwizzleAlpha = 0x8E45 // GL_TEXTURE_SWIZZLE_A
- };
-
- enum SwizzleValue {
- RedValue = 0x1903, // GL_RED
- GreenValue = 0x1904, // GL_GREEN
- BlueValue = 0x1905, // GL_BLUE
- AlphaValue = 0x1906, // GL_ALPHA
- ZeroValue = 0, // GL_ZERO
- OneValue = 1 // GL_ONE
- };
-
void setSwizzleMask(SwizzleComponent component, SwizzleValue value);
void setSwizzleMask(SwizzleValue r, SwizzleValue g,
SwizzleValue b, SwizzleValue a);
@@ -464,6 +490,28 @@ public:
void setDepthStencilMode(DepthStencilMode mode);
DepthStencilMode depthStencilMode() const;
+ enum ComparisonFunction {
+ CompareLessEqual = 0x0203, // GL_LEQUAL
+ CompareGreaterEqual = 0x0206, // GL_GEQUAL
+ CompareLess = 0x0201, // GL_LESS
+ CompareGreater = 0x0204, // GL_GREATER
+ CompareEqual = 0x0202, // GL_EQUAL
+ CommpareNotEqual = 0x0205, // GL_NOTEQUAL
+ CompareAlways = 0x0207, // GL_ALWAYS
+ CompareNever = 0x0200 // GL_NEVER
+ };
+
+ void setComparisonFunction(ComparisonFunction function);
+ ComparisonFunction comparisonFunction() const;
+
+ enum ComparisonMode {
+ CompareRefToTexture = 0x884E, // GL_COMPARE_REF_TO_TEXTURE
+ CompareNone = 0x0000 // GL_NONE
+ };
+
+ void setComparisonMode(ComparisonMode mode);
+ ComparisonMode comparisonMode() const;
+
// Sampling Parameters
enum Filter {
Nearest = 0x2600, // GL_NEAREST
@@ -484,19 +532,6 @@ public:
void setMaximumAnisotropy(float anisotropy);
float maximumAnisotropy() const;
- enum WrapMode {
- Repeat = 0x2901, // GL_REPEAT
- MirroredRepeat = 0x8370, // GL_MIRRORED_REPEAT
- ClampToEdge = 0x812F, // GL_CLAMP_TO_EDGE
- ClampToBorder = 0x812D // GL_CLAMP_TO_BORDER
- };
-
- enum CoordinateDirection {
- DirectionS = 0x2802, // GL_TEXTURE_WRAP_S
- DirectionT = 0x2803, // GL_TEXTURE_WRAP_T
- DirectionR = 0x8072 // GL_TEXTURE_WRAP_R
- };
-
void setWrapMode(WrapMode mode);
void setWrapMode(CoordinateDirection direction, WrapMode mode);
WrapMode wrapMode(CoordinateDirection direction) const;
diff --git a/src/gui/opengl/qopengltexture_p.h b/src/gui/opengl/qopengltexture_p.h
index b584d3ec8f..be4bf0e93c 100644
--- a/src/gui/opengl/qopengltexture_p.h
+++ b/src/gui/opengl/qopengltexture_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -87,8 +87,8 @@ public:
bool isBound() const;
bool isBound(uint unit) const;
- void allocateStorage();
- void allocateMutableStorage();
+ void allocateStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType);
+ void allocateMutableStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType);
void allocateImmutableStorage();
void setData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace,
QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType,
@@ -138,6 +138,8 @@ public:
QOpenGLTexture::SwizzleValue swizzleMask[4];
QOpenGLTexture::DepthStencilMode depthStencilMode;
+ QOpenGLTexture::ComparisonFunction comparisonFunction;
+ QOpenGLTexture::ComparisonMode comparisonMode;
QOpenGLTexture::Filter minFilter;
QOpenGLTexture::Filter magFilter;
diff --git a/src/gui/opengl/qopengltextureblitter.cpp b/src/gui/opengl/qopengltextureblitter.cpp
index a20fb4f01e..0f9fa6400d 100644
--- a/src/gui/opengl/qopengltextureblitter.cpp
+++ b/src/gui/opengl/qopengltextureblitter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengltextureblitter_p.h b/src/gui/opengl/qopengltextureblitter_p.h
index ac5fbae3a3..8f7eae1c32 100644
--- a/src/gui/opengl/qopengltextureblitter_p.h
+++ b/src/gui/opengl/qopengltextureblitter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengltexturecache.cpp b/src/gui/opengl/qopengltexturecache.cpp
index 3b24e1f576..72df636f5f 100644
--- a/src/gui/opengl/qopengltexturecache.cpp
+++ b/src/gui/opengl/qopengltexturecache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -41,6 +41,10 @@
QT_BEGIN_NAMESPACE
+#ifndef GL_RED
+#define GL_RED 0x1903
+#endif
+
#ifndef GL_RGB10_A2
#define GL_RGB10_A2 0x8059
#endif
@@ -273,6 +277,35 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, qint64 key, con
pixelType = GL_UNSIGNED_BYTE;
targetFormat = image.format();
break;
+ case QImage::Format_Indexed8:
+ if (options & UseRedFor8BitBindOption) {
+ externalFormat = internalFormat = GL_RED;
+ pixelType = GL_UNSIGNED_BYTE;
+ targetFormat = image.format();
+ }
+ break;
+ case QImage::Format_Alpha8:
+ if (options & UseRedFor8BitBindOption) {
+ externalFormat = internalFormat = GL_RED;
+ pixelType = GL_UNSIGNED_BYTE;
+ targetFormat = image.format();
+ } else if (context->isOpenGLES() || context->format().profile() != QSurfaceFormat::CoreProfile) {
+ externalFormat = internalFormat = GL_ALPHA;
+ pixelType = GL_UNSIGNED_BYTE;
+ targetFormat = image.format();
+ }
+ break;
+ case QImage::Format_Grayscale8:
+ if (options & UseRedFor8BitBindOption) {
+ externalFormat = internalFormat = GL_RED;
+ pixelType = GL_UNSIGNED_BYTE;
+ targetFormat = image.format();
+ } else if (context->isOpenGLES() || context->format().profile() != QSurfaceFormat::CoreProfile) {
+ externalFormat = internalFormat = GL_LUMINANCE;
+ pixelType = GL_UNSIGNED_BYTE;
+ targetFormat = image.format();
+ }
+ break;
default:
break;
}
diff --git a/src/gui/opengl/qopengltexturecache_p.h b/src/gui/opengl/qopengltexturecache_p.h
index f856054a85..40f033df43 100644
--- a/src/gui/opengl/qopengltexturecache_p.h
+++ b/src/gui/opengl/qopengltexturecache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -78,6 +78,7 @@ public:
enum BindOption {
NoBindOption = 0x0000,
PremultipliedAlphaBindOption = 0x0001,
+ UseRedFor8BitBindOption = 0x0002,
};
Q_DECLARE_FLAGS(BindOptions, BindOption)
@@ -86,8 +87,8 @@ public:
void invalidate(qint64 key);
- void invalidateResource();
- void freeResource(QOpenGLContext *ctx);
+ void invalidateResource() Q_DECL_OVERRIDE;
+ void freeResource(QOpenGLContext *ctx) Q_DECL_OVERRIDE;
private:
GLuint bindTexture(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureCache::BindOptions options);
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index cd268cd685..c179143173 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengltextureglyphcache_p.h b/src/gui/opengl/qopengltextureglyphcache_p.h
index f61f264526..47fdd70203 100644
--- a/src/gui/opengl/qopengltextureglyphcache_p.h
+++ b/src/gui/opengl/qopengltextureglyphcache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -74,7 +74,7 @@ public:
#endif
}
- void freeResource(QOpenGLContext *context)
+ void freeResource(QOpenGLContext *context) Q_DECL_OVERRIDE
{
QOpenGLContext *ctx = context;
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
@@ -86,7 +86,7 @@ public:
ctx->functions()->glDeleteTextures(1, &m_texture);
}
- void invalidateResource()
+ void invalidateResource() Q_DECL_OVERRIDE
{
m_texture = 0;
m_fbo = 0;
@@ -106,12 +106,12 @@ public:
QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat glyphFormat, const QTransform &matrix);
~QOpenGLTextureGlyphCache();
- virtual void createTextureData(int width, int height);
- virtual void resizeTextureData(int width, int height);
- virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition);
- virtual int glyphPadding() const;
- virtual int maxTextureWidth() const;
- virtual int maxTextureHeight() const;
+ virtual void createTextureData(int width, int height) Q_DECL_OVERRIDE;
+ virtual void resizeTextureData(int width, int height) Q_DECL_OVERRIDE;
+ virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition) Q_DECL_OVERRIDE;
+ virtual int glyphPadding() const Q_DECL_OVERRIDE;
+ virtual int maxTextureWidth() const Q_DECL_OVERRIDE;
+ virtual int maxTextureHeight() const Q_DECL_OVERRIDE;
inline GLuint texture() const {
QOpenGLTextureGlyphCache *that = const_cast<QOpenGLTextureGlyphCache *>(this);
diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp
index e1e3593f4f..3635a7dd1b 100644
--- a/src/gui/opengl/qopengltexturehelper.cpp
+++ b/src/gui/opengl/qopengltexturehelper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -40,8 +40,16 @@ QT_BEGIN_NAMESPACE
QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
{
- // Resolve EXT_direct_state_access entry points if present
- if (!context->isOpenGLES()
+ // Resolve EXT_direct_state_access entry points if present.
+
+ // However, disable it on some systems where DSA is known to be unreliable.
+ bool allowDSA = true;
+ const char *renderer = reinterpret_cast<const char *>(context->functions()->glGetString(GL_RENDERER));
+ // QTBUG-40653, QTBUG-44988
+ if (renderer && strstr(renderer, "AMD Radeon HD"))
+ allowDSA = false;
+
+ if (allowDSA && !context->isOpenGLES()
&& context->hasExtension(QByteArrayLiteral("GL_EXT_direct_state_access"))) {
TextureParameteriEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLint )>(context->getProcAddress(QByteArrayLiteral("glTextureParameteriEXT")));
TextureParameterivEXT = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , const GLint *)>(context->getProcAddress(QByteArrayLiteral("glTextureParameterivEXT")));
@@ -201,8 +209,16 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
TexImage2DMultisample = 0;
// OpenGL 4.2
- TexStorage3D = 0;
- TexStorage2D = 0;
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ if (ctx->format().majorVersion() >= 3) {
+ // OpenGL ES 3.0+ has immutable storage for 2D and 3D at least.
+ QOpenGLES3Helper *es3 = static_cast<QOpenGLExtensions *>(ctx->functions())->gles3Helper();
+ TexStorage3D = es3->TexStorage3D;
+ TexStorage2D = es3->TexStorage2D;
+ } else {
+ TexStorage3D = 0;
+ TexStorage2D = 0;
+ }
TexStorage1D = 0;
// OpenGL 4.3
diff --git a/src/gui/opengl/qopengltexturehelper_p.h b/src/gui/opengl/qopengltexturehelper_p.h
index 7145f689ce..5a56516b49 100644
--- a/src/gui/opengl/qopengltexturehelper_p.h
+++ b/src/gui/opengl/qopengltexturehelper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -55,6 +55,20 @@
QT_BEGIN_NAMESPACE
+// Constants for OpenGL and OpenGL ES 3.0+ which are not available with OpenGL ES 2.0.
+#ifndef GL_TEXTURE_BASE_LEVEL
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#endif
+#ifndef GL_TEXTURE_MAX_LEVEL
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#endif
+#ifndef GL_TEXTURE_COMPARE_MODE
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#endif
+#ifndef GL_TEXTURE_COMPARE_FUNC
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#endif
+
class QOpenGLContext;
class QOpenGLTextureHelper
diff --git a/src/gui/opengl/qopengltimerquery.cpp b/src/gui/opengl/qopengltimerquery.cpp
index 253c4d2a9f..ec7d4548c4 100644
--- a/src/gui/opengl/qopengltimerquery.cpp
+++ b/src/gui/opengl/qopengltimerquery.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopengltimerquery.h b/src/gui/opengl/qopengltimerquery.h
index 03e08114d5..7e46250546 100644
--- a/src/gui/opengl/qopengltimerquery.h
+++ b/src/gui/opengl/qopengltimerquery.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp
index 74e230a180..346a526054 100644
--- a/src/gui/opengl/qopenglversionfunctions.cpp
+++ b/src/gui/opengl/qopenglversionfunctions.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -67,6 +67,17 @@ void QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(QOpenGLContext *con
context->removeFunctionsBackend(v);
}
+void QAbstractOpenGLFunctionsPrivate::insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f)
+{
+ Q_ASSERT(context);
+ context->insertExternalFunctions(f);
+}
+
+void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f)
+{
+ Q_ASSERT(context);
+ context->removeExternalFunctions(f);
+}
/*!
\class QAbstractOpenGLFunctions
@@ -182,6 +193,9 @@ QAbstractOpenGLFunctions::QAbstractOpenGLFunctions()
QAbstractOpenGLFunctions::~QAbstractOpenGLFunctions()
{
+ Q_D(QAbstractOpenGLFunctions);
+ if (d->owningContext)
+ d->removeExternalFunctions(d->owningContext, this);
delete d_ptr;
}
@@ -191,6 +205,18 @@ bool QAbstractOpenGLFunctions::initializeOpenGLFunctions()
{
Q_D(QAbstractOpenGLFunctions);
d->initialized = true;
+
+ // For a subclass whose instance is not created via
+ // QOpenGLContext::versionFunctions() owningContext is not set. Set it now
+ // and register such instances to the context as external ones. These are
+ // not owned by the context but still need certain cleanup when the context
+ // is destroyed.
+ if (!d->owningContext) {
+ d->owningContext = QOpenGLContext::currentContext();
+ if (d->owningContext)
+ d->insertExternalFunctions(d->owningContext, this);
+ }
+
return true;
}
@@ -351,7 +377,7 @@ QOpenGLFunctions_1_1_CoreBackend::QOpenGLFunctions_1_1_CoreBackend(QOpenGLContex
CopyTexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint )>(GetProcAddress(handle, "glCopyTexImage2D"));
CopyTexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint )>(GetProcAddress(handle, "glCopyTexImage1D"));
PolygonOffset = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLfloat , GLfloat )>(GetProcAddress(handle, "glPolygonOffset"));
- GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid* *)>(GetProcAddress(handle, "glGetPointerv"));
+ GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid * *)>(GetProcAddress(handle, "glGetPointerv"));
DrawElements = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , const GLvoid *)>(GetProcAddress(handle, "glDrawElements"));
DrawArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLsizei )>(GetProcAddress(handle, "glDrawArrays"));
#else
@@ -368,7 +394,7 @@ QOpenGLFunctions_1_1_CoreBackend::QOpenGLFunctions_1_1_CoreBackend(QOpenGLContex
CopyTexImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint )>(context->getProcAddress("glCopyTexImage2D"));
CopyTexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint )>(context->getProcAddress("glCopyTexImage1D"));
PolygonOffset = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLfloat , GLfloat )>(context->getProcAddress("glPolygonOffset"));
- GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid* *)>(context->getProcAddress("glGetPointerv"));
+ GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid * *)>(context->getProcAddress("glGetPointerv"));
DrawElements = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , const GLvoid *)>(context->getProcAddress("glDrawElements"));
DrawArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLsizei )>(context->getProcAddress("glDrawArrays"));
#endif
@@ -474,6 +500,42 @@ QOpenGLFunctions_2_0_CoreBackend::QOpenGLFunctions_2_0_CoreBackend(QOpenGLContex
{
// OpenGL 2.0 core functions
VertexAttribPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLenum , GLboolean , GLsizei , const GLvoid *)>(context->getProcAddress("glVertexAttribPointer"));
+ VertexAttrib4usv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLushort *)>(context->getProcAddress("glVertexAttrib4usv"));
+ VertexAttrib4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttrib4uiv"));
+ VertexAttrib4ubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLubyte *)>(context->getProcAddress("glVertexAttrib4ubv"));
+ VertexAttrib4sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib4sv"));
+ VertexAttrib4s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort , GLshort , GLshort , GLshort )>(context->getProcAddress("glVertexAttrib4s"));
+ VertexAttrib4iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttrib4iv"));
+ VertexAttrib4fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib4fv"));
+ VertexAttrib4f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat , GLfloat , GLfloat , GLfloat )>(context->getProcAddress("glVertexAttrib4f"));
+ VertexAttrib4dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib4dv"));
+ VertexAttrib4d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble , GLdouble , GLdouble , GLdouble )>(context->getProcAddress("glVertexAttrib4d"));
+ VertexAttrib4bv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLbyte *)>(context->getProcAddress("glVertexAttrib4bv"));
+ VertexAttrib4Nusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLushort *)>(context->getProcAddress("glVertexAttrib4Nusv"));
+ VertexAttrib4Nuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttrib4Nuiv"));
+ VertexAttrib4Nubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLubyte *)>(context->getProcAddress("glVertexAttrib4Nubv"));
+ VertexAttrib4Nub = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLubyte , GLubyte , GLubyte , GLubyte )>(context->getProcAddress("glVertexAttrib4Nub"));
+ VertexAttrib4Nsv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib4Nsv"));
+ VertexAttrib4Niv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttrib4Niv"));
+ VertexAttrib4Nbv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLbyte *)>(context->getProcAddress("glVertexAttrib4Nbv"));
+ VertexAttrib3sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib3sv"));
+ VertexAttrib3s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort , GLshort , GLshort )>(context->getProcAddress("glVertexAttrib3s"));
+ VertexAttrib3fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib3fv"));
+ VertexAttrib3f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat , GLfloat , GLfloat )>(context->getProcAddress("glVertexAttrib3f"));
+ VertexAttrib3dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib3dv"));
+ VertexAttrib3d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble , GLdouble , GLdouble )>(context->getProcAddress("glVertexAttrib3d"));
+ VertexAttrib2sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib2sv"));
+ VertexAttrib2s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort , GLshort )>(context->getProcAddress("glVertexAttrib2s"));
+ VertexAttrib2fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib2fv"));
+ VertexAttrib2f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat , GLfloat )>(context->getProcAddress("glVertexAttrib2f"));
+ VertexAttrib2dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib2dv"));
+ VertexAttrib2d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble , GLdouble )>(context->getProcAddress("glVertexAttrib2d"));
+ VertexAttrib1sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttrib1sv"));
+ VertexAttrib1s = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLshort )>(context->getProcAddress("glVertexAttrib1s"));
+ VertexAttrib1fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLfloat *)>(context->getProcAddress("glVertexAttrib1fv"));
+ VertexAttrib1f = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLfloat )>(context->getProcAddress("glVertexAttrib1f"));
+ VertexAttrib1dv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLdouble *)>(context->getProcAddress("glVertexAttrib1dv"));
+ VertexAttrib1d = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLdouble )>(context->getProcAddress("glVertexAttrib1d"));
ValidateProgram = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint )>(context->getProcAddress("glValidateProgram"));
UniformMatrix4fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLsizei , GLboolean , const GLfloat *)>(context->getProcAddress("glUniformMatrix4fv"));
UniformMatrix3fv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLsizei , GLboolean , const GLfloat *)>(context->getProcAddress("glUniformMatrix3fv"));
@@ -606,6 +668,26 @@ QOpenGLFunctions_3_0_CoreBackend::QOpenGLFunctions_3_0_CoreBackend(QOpenGLContex
GetFragDataLocation = reinterpret_cast<GLint (QOPENGLF_APIENTRYP)(GLuint , const GLchar *)>(context->getProcAddress("glGetFragDataLocation"));
BindFragDataLocation = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , const GLchar *)>(context->getProcAddress("glBindFragDataLocation"));
GetUniformuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLuint *)>(context->getProcAddress("glGetUniformuiv"));
+ VertexAttribI4usv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLushort *)>(context->getProcAddress("glVertexAttribI4usv"));
+ VertexAttribI4ubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLubyte *)>(context->getProcAddress("glVertexAttribI4ubv"));
+ VertexAttribI4sv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLshort *)>(context->getProcAddress("glVertexAttribI4sv"));
+ VertexAttribI4bv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLbyte *)>(context->getProcAddress("glVertexAttribI4bv"));
+ VertexAttribI4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI4uiv"));
+ VertexAttribI3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI3uiv"));
+ VertexAttribI2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI2uiv"));
+ VertexAttribI1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLuint *)>(context->getProcAddress("glVertexAttribI1uiv"));
+ VertexAttribI4iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI4iv"));
+ VertexAttribI3iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI3iv"));
+ VertexAttribI2iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI2iv"));
+ VertexAttribI1iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , const GLint *)>(context->getProcAddress("glVertexAttribI1iv"));
+ VertexAttribI4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexAttribI4ui"));
+ VertexAttribI3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexAttribI3ui"));
+ VertexAttribI2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexAttribI2ui"));
+ VertexAttribI1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint )>(context->getProcAddress("glVertexAttribI1ui"));
+ VertexAttribI4i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint )>(context->getProcAddress("glVertexAttribI4i"));
+ VertexAttribI3i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint )>(context->getProcAddress("glVertexAttribI3i"));
+ VertexAttribI2i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint )>(context->getProcAddress("glVertexAttribI2i"));
+ VertexAttribI1i = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint )>(context->getProcAddress("glVertexAttribI1i"));
GetVertexAttribIuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint *)>(context->getProcAddress("glGetVertexAttribIuiv"));
GetVertexAttribIiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetVertexAttribIiv"));
VertexAttribIPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress("glVertexAttribIPointer"));
@@ -662,8 +744,8 @@ QOpenGLFunctions_3_2_CoreBackend::QOpenGLFunctions_3_2_CoreBackend(QOpenGLContex
// OpenGL 3.2 core functions
SampleMaski = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLbitfield )>(context->getProcAddress("glSampleMaski"));
GetMultisamplefv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint , GLfloat *)>(context->getProcAddress("glGetMultisamplefv"));
- TexImage3DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLint , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTexImage3DMultisample"));
- TexImage2DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLint , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTexImage2DMultisample"));
+ TexImage3DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTexImage3DMultisample"));
+ TexImage2DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTexImage2DMultisample"));
GetSynciv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsync , GLenum , GLsizei , GLsizei *, GLint *)>(context->getProcAddress("glGetSynciv"));
GetInteger64v = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint64 *)>(context->getProcAddress("glGetInteger64v"));
WaitSync = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsync , GLbitfield , GLuint64 )>(context->getProcAddress("glWaitSync"));
@@ -943,6 +1025,16 @@ QOpenGLFunctions_4_3_CoreBackend::QOpenGLFunctions_4_3_CoreBackend(QOpenGLContex
: QOpenGLVersionFunctionsBackend(context)
{
// OpenGL 4.3 core functions
+ GetObjectPtrLabel = reinterpret_cast<void (QOPENGLF_APIENTRYP)(const void *, GLsizei , GLsizei *, GLchar *)>(context->getProcAddress("glGetObjectPtrLabel"));
+ ObjectPtrLabel = reinterpret_cast<void (QOPENGLF_APIENTRYP)(const void *, GLsizei , const GLchar *)>(context->getProcAddress("glObjectPtrLabel"));
+ GetObjectLabel = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint , GLsizei , GLsizei *, GLchar *)>(context->getProcAddress("glGetObjectLabel"));
+ ObjectLabel = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint , GLsizei , const GLchar *)>(context->getProcAddress("glObjectLabel"));
+ PopDebugGroup = reinterpret_cast<void (QOPENGLF_APIENTRYP)()>(context->getProcAddress("glPopDebugGroup"));
+ PushDebugGroup = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint , GLsizei , const GLchar *)>(context->getProcAddress("glPushDebugGroup"));
+ GetDebugMessageLog = reinterpret_cast<GLuint (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum *, GLenum *, GLuint *, GLenum *, GLsizei *, GLchar *)>(context->getProcAddress("glGetDebugMessageLog"));
+ DebugMessageCallback = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLDEBUGPROC , const void *)>(context->getProcAddress("glDebugMessageCallback"));
+ DebugMessageInsert = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint , GLenum , GLsizei , const GLchar *)>(context->getProcAddress("glDebugMessageInsert"));
+ DebugMessageControl = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLenum , GLsizei , const GLuint *, GLboolean )>(context->getProcAddress("glDebugMessageControl"));
TexStorage3DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTexStorage3DMultisample"));
TexStorage2DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLenum , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTexStorage2DMultisample"));
TexBufferRange = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint , GLintptr , GLsizeiptr )>(context->getProcAddress("glTexBufferRange"));
@@ -984,6 +1076,145 @@ QOpenGLVersionStatus QOpenGLFunctions_4_3_CoreBackend::versionStatus()
return QOpenGLVersionStatus(4, 3, QOpenGLVersionStatus::CoreStatus);
}
+QOpenGLFunctions_4_4_CoreBackend::QOpenGLFunctions_4_4_CoreBackend(QOpenGLContext *context)
+ : QOpenGLVersionFunctionsBackend(context)
+{
+ // OpenGL 4.4 core functions
+ BindVertexBuffers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLuint *, const GLintptr *, const GLsizei *)>(context->getProcAddress("glBindVertexBuffers"));
+ BindImageTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLuint *)>(context->getProcAddress("glBindImageTextures"));
+ BindSamplers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLuint *)>(context->getProcAddress("glBindSamplers"));
+ BindTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLuint *)>(context->getProcAddress("glBindTextures"));
+ BindBuffersRange = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint , GLsizei , const GLuint *, const GLintptr *, const GLsizeiptr *)>(context->getProcAddress("glBindBuffersRange"));
+ BindBuffersBase = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint , GLsizei , const GLuint *)>(context->getProcAddress("glBindBuffersBase"));
+ ClearTexSubImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , const void *)>(context->getProcAddress("glClearTexSubImage"));
+ ClearTexImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLenum , GLenum , const void *)>(context->getProcAddress("glClearTexImage"));
+ BufferStorage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizeiptr , const void *, GLbitfield )>(context->getProcAddress("glBufferStorage"));
+
+}
+
+QOpenGLVersionStatus QOpenGLFunctions_4_4_CoreBackend::versionStatus()
+{
+ return QOpenGLVersionStatus(4, 4, QOpenGLVersionStatus::CoreStatus);
+}
+
+QOpenGLFunctions_4_5_CoreBackend::QOpenGLFunctions_4_5_CoreBackend(QOpenGLContext *context)
+ : QOpenGLVersionFunctionsBackend(context)
+{
+ // OpenGL 4.5 core functions
+ TextureBarrier = reinterpret_cast<void (QOPENGLF_APIENTRYP)()>(context->getProcAddress("glTextureBarrier"));
+ ReadnPixels = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glReadnPixels"));
+ GetnUniformuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLsizei , GLuint *)>(context->getProcAddress("glGetnUniformuiv"));
+ GetnUniformiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLsizei , GLint *)>(context->getProcAddress("glGetnUniformiv"));
+ GetnUniformfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLsizei , GLfloat *)>(context->getProcAddress("glGetnUniformfv"));
+ GetnUniformdv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLsizei , GLdouble *)>(context->getProcAddress("glGetnUniformdv"));
+ GetnTexImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetnTexImage"));
+ GetnCompressedTexImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLsizei , void *)>(context->getProcAddress("glGetnCompressedTexImage"));
+ GetGraphicsResetStatus = reinterpret_cast<GLenum (QOPENGLF_APIENTRYP)()>(context->getProcAddress("glGetGraphicsResetStatus"));
+ GetCompressedTextureSubImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLsizei , void *)>(context->getProcAddress("glGetCompressedTextureSubImage"));
+ GetTextureSubImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetTextureSubImage"));
+ MemoryBarrierByRegion = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLbitfield )>(context->getProcAddress("glMemoryBarrierByRegion"));
+ CreateQueries = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLuint *)>(context->getProcAddress("glCreateQueries"));
+ CreateProgramPipelines = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateProgramPipelines"));
+ CreateSamplers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateSamplers"));
+ GetVertexArrayIndexed64iv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLenum , GLint64 *)>(context->getProcAddress("glGetVertexArrayIndexed64iv"));
+ GetVertexArrayIndexediv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLenum , GLint *)>(context->getProcAddress("glGetVertexArrayIndexediv"));
+ GetVertexArrayiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetVertexArrayiv"));
+ VertexArrayBindingDivisor = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexArrayBindingDivisor"));
+ VertexArrayAttribLFormat = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLint , GLenum , GLuint )>(context->getProcAddress("glVertexArrayAttribLFormat"));
+ VertexArrayAttribIFormat = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLint , GLenum , GLuint )>(context->getProcAddress("glVertexArrayAttribIFormat"));
+ VertexArrayAttribFormat = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLint , GLenum , GLboolean , GLuint )>(context->getProcAddress("glVertexArrayAttribFormat"));
+ VertexArrayAttribBinding = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint )>(context->getProcAddress("glVertexArrayAttribBinding"));
+ VertexArrayVertexBuffers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLsizei , const GLuint *, const GLintptr *, const GLsizei *)>(context->getProcAddress("glVertexArrayVertexBuffers"));
+ VertexArrayVertexBuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint , GLintptr , GLsizei )>(context->getProcAddress("glVertexArrayVertexBuffer"));
+ VertexArrayElementBuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint )>(context->getProcAddress("glVertexArrayElementBuffer"));
+ EnableVertexArrayAttrib = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint )>(context->getProcAddress("glEnableVertexArrayAttrib"));
+ DisableVertexArrayAttrib = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint )>(context->getProcAddress("glDisableVertexArrayAttrib"));
+ CreateVertexArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateVertexArrays"));
+ GetTextureParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetTextureParameteriv"));
+ GetTextureParameterIuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint *)>(context->getProcAddress("glGetTextureParameterIuiv"));
+ GetTextureParameterIiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetTextureParameterIiv"));
+ GetTextureParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLfloat *)>(context->getProcAddress("glGetTextureParameterfv"));
+ GetTextureLevelParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLenum , GLint *)>(context->getProcAddress("glGetTextureLevelParameteriv"));
+ GetTextureLevelParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLenum , GLfloat *)>(context->getProcAddress("glGetTextureLevelParameterfv"));
+ GetCompressedTextureImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLsizei , void *)>(context->getProcAddress("glGetCompressedTextureImage"));
+ GetTextureImage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetTextureImage"));
+ BindTextureUnit = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint )>(context->getProcAddress("glBindTextureUnit"));
+ GenerateTextureMipmap = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint )>(context->getProcAddress("glGenerateTextureMipmap"));
+ TextureParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , const GLint *)>(context->getProcAddress("glTextureParameteriv"));
+ TextureParameterIuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , const GLuint *)>(context->getProcAddress("glTextureParameterIuiv"));
+ TextureParameterIiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , const GLint *)>(context->getProcAddress("glTextureParameterIiv"));
+ TextureParameteri = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint )>(context->getProcAddress("glTextureParameteri"));
+ TextureParameterfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , const GLfloat *)>(context->getProcAddress("glTextureParameterfv"));
+ TextureParameterf = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLfloat )>(context->getProcAddress("glTextureParameterf"));
+ CopyTextureSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei )>(context->getProcAddress("glCopyTextureSubImage3D"));
+ CopyTextureSubImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei )>(context->getProcAddress("glCopyTextureSubImage2D"));
+ CopyTextureSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLsizei )>(context->getProcAddress("glCopyTextureSubImage1D"));
+ CompressedTextureSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLsizei , const void *)>(context->getProcAddress("glCompressedTextureSubImage3D"));
+ CompressedTextureSubImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLsizei , const void *)>(context->getProcAddress("glCompressedTextureSubImage2D"));
+ CompressedTextureSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLsizei , GLenum , GLsizei , const void *)>(context->getProcAddress("glCompressedTextureSubImage1D"));
+ TextureSubImage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLint , GLsizei , GLsizei , GLsizei , GLenum , GLenum , const void *)>(context->getProcAddress("glTextureSubImage3D"));
+ TextureSubImage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLint , GLsizei , GLsizei , GLenum , GLenum , const void *)>(context->getProcAddress("glTextureSubImage2D"));
+ TextureSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLint , GLint , GLsizei , GLenum , GLenum , const void *)>(context->getProcAddress("glTextureSubImage1D"));
+ TextureStorage3DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum , GLsizei , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTextureStorage3DMultisample"));
+ TextureStorage2DMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum , GLsizei , GLsizei , GLboolean )>(context->getProcAddress("glTextureStorage2DMultisample"));
+ TextureStorage3D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum , GLsizei , GLsizei , GLsizei )>(context->getProcAddress("glTextureStorage3D"));
+ TextureStorage2D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum , GLsizei , GLsizei )>(context->getProcAddress("glTextureStorage2D"));
+ TextureStorage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum , GLsizei )>(context->getProcAddress("glTextureStorage1D"));
+ TextureBufferRange = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint , GLintptr , GLsizei )>(context->getProcAddress("glTextureBufferRange"));
+ TextureBuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint )>(context->getProcAddress("glTextureBuffer"));
+ CreateTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLuint *)>(context->getProcAddress("glCreateTextures"));
+ GetNamedRenderbufferParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetNamedRenderbufferParameteriv"));
+ NamedRenderbufferStorageMultisample = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , GLenum , GLsizei , GLsizei )>(context->getProcAddress("glNamedRenderbufferStorageMultisample"));
+ NamedRenderbufferStorage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLsizei , GLsizei )>(context->getProcAddress("glNamedRenderbufferStorage"));
+ CreateRenderbuffers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateRenderbuffers"));
+ GetNamedFramebufferAttachmentParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLint *)>(context->getProcAddress("glGetNamedFramebufferAttachmentParameteriv"));
+ GetNamedFramebufferParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetNamedFramebufferParameteriv"));
+ CheckNamedFramebufferStatus = reinterpret_cast<GLenum (QOPENGLF_APIENTRYP)(GLuint , GLenum )>(context->getProcAddress("glCheckNamedFramebufferStatus"));
+ BlitNamedFramebuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLint , GLint , GLint , GLint , GLint , GLint , GLint , GLint , GLbitfield , GLenum )>(context->getProcAddress("glBlitNamedFramebuffer"));
+ ClearNamedFramebufferfi = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLfloat , GLint )>(context->getProcAddress("glClearNamedFramebufferfi"));
+ ClearNamedFramebufferfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , const GLfloat *)>(context->getProcAddress("glClearNamedFramebufferfv"));
+ ClearNamedFramebufferuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , const GLuint *)>(context->getProcAddress("glClearNamedFramebufferuiv"));
+ ClearNamedFramebufferiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint , const GLint *)>(context->getProcAddress("glClearNamedFramebufferiv"));
+ InvalidateNamedFramebufferSubData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLenum *, GLint , GLint , GLsizei , GLsizei )>(context->getProcAddress("glInvalidateNamedFramebufferSubData"));
+ InvalidateNamedFramebufferData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLenum *)>(context->getProcAddress("glInvalidateNamedFramebufferData"));
+ NamedFramebufferReadBuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum )>(context->getProcAddress("glNamedFramebufferReadBuffer"));
+ NamedFramebufferDrawBuffers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const GLenum *)>(context->getProcAddress("glNamedFramebufferDrawBuffers"));
+ NamedFramebufferDrawBuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum )>(context->getProcAddress("glNamedFramebufferDrawBuffer"));
+ NamedFramebufferTextureLayer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint , GLint , GLint )>(context->getProcAddress("glNamedFramebufferTextureLayer"));
+ NamedFramebufferTexture = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint , GLint )>(context->getProcAddress("glNamedFramebufferTexture"));
+ NamedFramebufferParameteri = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint )>(context->getProcAddress("glNamedFramebufferParameteri"));
+ NamedFramebufferRenderbuffer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLuint )>(context->getProcAddress("glNamedFramebufferRenderbuffer"));
+ CreateFramebuffers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateFramebuffers"));
+ GetNamedBufferSubData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLintptr , GLsizei , void *)>(context->getProcAddress("glGetNamedBufferSubData"));
+ GetNamedBufferPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , void * *)>(context->getProcAddress("glGetNamedBufferPointerv"));
+ GetNamedBufferParameteri64v = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint64 *)>(context->getProcAddress("glGetNamedBufferParameteri64v"));
+ GetNamedBufferParameteriv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetNamedBufferParameteriv"));
+ FlushMappedNamedBufferRange = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLintptr , GLsizei )>(context->getProcAddress("glFlushMappedNamedBufferRange"));
+ UnmapNamedBuffer = reinterpret_cast<GLboolean (QOPENGLF_APIENTRYP)(GLuint )>(context->getProcAddress("glUnmapNamedBuffer"));
+ MapNamedBufferRange = reinterpret_cast<void * (QOPENGLF_APIENTRYP)(GLuint , GLintptr , GLsizei , GLbitfield )>(context->getProcAddress("glMapNamedBufferRange"));
+ MapNamedBuffer = reinterpret_cast<void * (QOPENGLF_APIENTRYP)(GLuint , GLenum )>(context->getProcAddress("glMapNamedBuffer"));
+ ClearNamedBufferSubData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLintptr , GLsizei , GLenum , GLenum , const void *)>(context->getProcAddress("glClearNamedBufferSubData"));
+ ClearNamedBufferData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLenum , GLenum , const void *)>(context->getProcAddress("glClearNamedBufferData"));
+ CopyNamedBufferSubData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLintptr , GLintptr , GLsizei )>(context->getProcAddress("glCopyNamedBufferSubData"));
+ NamedBufferSubData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLintptr , GLsizei , const void *)>(context->getProcAddress("glNamedBufferSubData"));
+ NamedBufferData = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const void *, GLenum )>(context->getProcAddress("glNamedBufferData"));
+ NamedBufferStorage = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLsizei , const void *, GLbitfield )>(context->getProcAddress("glNamedBufferStorage"));
+ CreateBuffers = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateBuffers"));
+ GetTransformFeedbacki64_v = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint , GLint64 *)>(context->getProcAddress("glGetTransformFeedbacki64_v"));
+ GetTransformFeedbacki_v = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLuint , GLint *)>(context->getProcAddress("glGetTransformFeedbacki_v"));
+ GetTransformFeedbackiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLenum , GLint *)>(context->getProcAddress("glGetTransformFeedbackiv"));
+ TransformFeedbackBufferRange = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint , GLintptr , GLsizei )>(context->getProcAddress("glTransformFeedbackBufferRange"));
+ TransformFeedbackBufferBase = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLuint , GLuint , GLuint )>(context->getProcAddress("glTransformFeedbackBufferBase"));
+ CreateTransformFeedbacks = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLuint *)>(context->getProcAddress("glCreateTransformFeedbacks"));
+ ClipControl = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum )>(context->getProcAddress("glClipControl"));
+
+}
+
+QOpenGLVersionStatus QOpenGLFunctions_4_5_CoreBackend::versionStatus()
+{
+ return QOpenGLVersionStatus(4, 5, QOpenGLVersionStatus::CoreStatus);
+}
+
QOpenGLFunctions_1_0_DeprecatedBackend::QOpenGLFunctions_1_0_DeprecatedBackend(QOpenGLContext *context)
: QOpenGLVersionFunctionsBackend(context)
{
@@ -1028,9 +1259,9 @@ QOpenGLFunctions_1_0_DeprecatedBackend::QOpenGLFunctions_1_0_DeprecatedBackend(Q
GetClipPlane = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLdouble *)>(GetProcAddress(handle, "glGetClipPlane"));
DrawPixels = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(GetProcAddress(handle, "glDrawPixels"));
CopyPixels = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLint , GLsizei , GLsizei , GLenum )>(GetProcAddress(handle, "glCopyPixels"));
- PixelMapusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , const GLushort *)>(GetProcAddress(handle, "glPixelMapusv"));
- PixelMapuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , const GLuint *)>(GetProcAddress(handle, "glPixelMapuiv"));
- PixelMapfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , const GLfloat *)>(GetProcAddress(handle, "glPixelMapfv"));
+ PixelMapusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLushort *)>(GetProcAddress(handle, "glPixelMapusv"));
+ PixelMapuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLuint *)>(GetProcAddress(handle, "glPixelMapuiv"));
+ PixelMapfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLfloat *)>(GetProcAddress(handle, "glPixelMapfv"));
PixelTransferi = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint )>(GetProcAddress(handle, "glPixelTransferi"));
PixelTransferf = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLfloat )>(GetProcAddress(handle, "glPixelTransferf"));
PixelZoom = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLfloat , GLfloat )>(GetProcAddress(handle, "glPixelZoom"));
@@ -1287,9 +1518,9 @@ QOpenGLFunctions_1_0_DeprecatedBackend::QOpenGLFunctions_1_0_DeprecatedBackend(Q
GetClipPlane = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLdouble *)>(context->getProcAddress("glGetClipPlane"));
DrawPixels = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glDrawPixels"));
CopyPixels = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLint , GLsizei , GLsizei , GLenum )>(context->getProcAddress("glCopyPixels"));
- PixelMapusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , const GLushort *)>(context->getProcAddress("glPixelMapusv"));
- PixelMapuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , const GLuint *)>(context->getProcAddress("glPixelMapuiv"));
- PixelMapfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , const GLfloat *)>(context->getProcAddress("glPixelMapfv"));
+ PixelMapusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLushort *)>(context->getProcAddress("glPixelMapusv"));
+ PixelMapuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLuint *)>(context->getProcAddress("glPixelMapuiv"));
+ PixelMapfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLfloat *)>(context->getProcAddress("glPixelMapfv"));
PixelTransferi = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint )>(context->getProcAddress("glPixelTransferi"));
PixelTransferf = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLfloat )>(context->getProcAddress("glPixelTransferf"));
PixelZoom = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLfloat , GLfloat )>(context->getProcAddress("glPixelZoom"));
@@ -1528,12 +1759,15 @@ QOpenGLFunctions_1_1_DeprecatedBackend::QOpenGLFunctions_1_1_DeprecatedBackend(Q
handle = GetModuleHandleA("opengl32.dll");
PushClientAttrib = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLbitfield )>(GetProcAddress(handle, "glPushClientAttrib"));
PopClientAttrib = reinterpret_cast<void (QOPENGLF_APIENTRYP)()>(GetProcAddress(handle, "glPopClientAttrib"));
+ Indexubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(const GLubyte *)>(GetProcAddress(handle, "glIndexubv"));
+ Indexub = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLubyte )>(GetProcAddress(handle, "glIndexub"));
PrioritizeTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *, const GLfloat *)>(GetProcAddress(handle, "glPrioritizeTextures"));
AreTexturesResident = reinterpret_cast<GLboolean (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *, GLboolean *)>(GetProcAddress(handle, "glAreTexturesResident"));
VertexPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLenum , GLsizei , const GLvoid *)>(GetProcAddress(handle, "glVertexPointer"));
TexCoordPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLenum , GLsizei , const GLvoid *)>(GetProcAddress(handle, "glTexCoordPointer"));
NormalPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLvoid *)>(GetProcAddress(handle, "glNormalPointer"));
InterleavedArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLvoid *)>(GetProcAddress(handle, "glInterleavedArrays"));
+ GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid * *)>(GetProcAddress(handle, "glGetPointerv"));
IndexPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLvoid *)>(GetProcAddress(handle, "glIndexPointer"));
EnableClientState = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum )>(GetProcAddress(handle, "glEnableClientState"));
EdgeFlagPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLvoid *)>(GetProcAddress(handle, "glEdgeFlagPointer"));
@@ -1543,12 +1777,15 @@ QOpenGLFunctions_1_1_DeprecatedBackend::QOpenGLFunctions_1_1_DeprecatedBackend(Q
#else
PushClientAttrib = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLbitfield )>(context->getProcAddress("glPushClientAttrib"));
PopClientAttrib = reinterpret_cast<void (QOPENGLF_APIENTRYP)()>(context->getProcAddress("glPopClientAttrib"));
+ Indexubv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(const GLubyte *)>(context->getProcAddress("glIndexubv"));
+ Indexub = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLubyte )>(context->getProcAddress("glIndexub"));
PrioritizeTextures = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *, const GLfloat *)>(context->getProcAddress("glPrioritizeTextures"));
AreTexturesResident = reinterpret_cast<GLboolean (QOPENGLF_APIENTRYP)(GLsizei , const GLuint *, GLboolean *)>(context->getProcAddress("glAreTexturesResident"));
VertexPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress("glVertexPointer"));
TexCoordPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLint , GLenum , GLsizei , const GLvoid *)>(context->getProcAddress("glTexCoordPointer"));
NormalPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLvoid *)>(context->getProcAddress("glNormalPointer"));
InterleavedArrays = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLvoid *)>(context->getProcAddress("glInterleavedArrays"));
+ GetPointerv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLvoid * *)>(context->getProcAddress("glGetPointerv"));
IndexPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , const GLvoid *)>(context->getProcAddress("glIndexPointer"));
EnableClientState = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum )>(context->getProcAddress("glEnableClientState"));
EdgeFlagPointer = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , const GLvoid *)>(context->getProcAddress("glEdgeFlagPointer"));
@@ -1787,6 +2024,71 @@ QOpenGLVersionStatus QOpenGLFunctions_3_0_DeprecatedBackend::versionStatus()
return QOpenGLVersionStatus(3, 0, QOpenGLVersionStatus::DeprecatedStatus);
}
+QOpenGLFunctions_3_3_DeprecatedBackend::QOpenGLFunctions_3_3_DeprecatedBackend(QOpenGLContext *context)
+ : QOpenGLVersionFunctionsBackend(context)
+{
+ // OpenGL 3.3 deprecated functions
+ SecondaryColorP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glSecondaryColorP3uiv"));
+ SecondaryColorP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glSecondaryColorP3ui"));
+ ColorP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glColorP4uiv"));
+ ColorP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glColorP4ui"));
+ ColorP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glColorP3uiv"));
+ ColorP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glColorP3ui"));
+ NormalP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glNormalP3uiv"));
+ NormalP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glNormalP3ui"));
+ MultiTexCoordP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP4uiv"));
+ MultiTexCoordP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP4ui"));
+ MultiTexCoordP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP3uiv"));
+ MultiTexCoordP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP3ui"));
+ MultiTexCoordP2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP2uiv"));
+ MultiTexCoordP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP2ui"));
+ MultiTexCoordP1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , const GLuint *)>(context->getProcAddress("glMultiTexCoordP1uiv"));
+ MultiTexCoordP1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLuint )>(context->getProcAddress("glMultiTexCoordP1ui"));
+ TexCoordP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP4uiv"));
+ TexCoordP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP4ui"));
+ TexCoordP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP3uiv"));
+ TexCoordP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP3ui"));
+ TexCoordP2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP2uiv"));
+ TexCoordP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP2ui"));
+ TexCoordP1uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glTexCoordP1uiv"));
+ TexCoordP1ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glTexCoordP1ui"));
+ VertexP4uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glVertexP4uiv"));
+ VertexP4ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glVertexP4ui"));
+ VertexP3uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glVertexP3uiv"));
+ VertexP3ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glVertexP3ui"));
+ VertexP2uiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , const GLuint *)>(context->getProcAddress("glVertexP2uiv"));
+ VertexP2ui = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLuint )>(context->getProcAddress("glVertexP2ui"));
+
+}
+
+QOpenGLVersionStatus QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus()
+{
+ return QOpenGLVersionStatus(3, 3, QOpenGLVersionStatus::DeprecatedStatus);
+}
+
+QOpenGLFunctions_4_5_DeprecatedBackend::QOpenGLFunctions_4_5_DeprecatedBackend(QOpenGLContext *context)
+ : QOpenGLVersionFunctionsBackend(context)
+{
+ // OpenGL 4.5 deprecated functions
+ GetnMinmax = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLboolean , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetnMinmax"));
+ GetnHistogram = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLboolean , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetnHistogram"));
+ GetnSeparableFilter = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLenum , GLsizei , void *, GLsizei , void *, void *)>(context->getProcAddress("glGetnSeparableFilter"));
+ GetnConvolutionFilter = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetnConvolutionFilter"));
+ GetnColorTable = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLenum , GLsizei , void *)>(context->getProcAddress("glGetnColorTable"));
+ GetnPolygonStipple = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLsizei , GLubyte *)>(context->getProcAddress("glGetnPolygonStipple"));
+ GetnPixelMapusv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLushort *)>(context->getProcAddress("glGetnPixelMapusv"));
+ GetnPixelMapuiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLuint *)>(context->getProcAddress("glGetnPixelMapuiv"));
+ GetnPixelMapfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLsizei , GLfloat *)>(context->getProcAddress("glGetnPixelMapfv"));
+ GetnMapiv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLsizei , GLint *)>(context->getProcAddress("glGetnMapiv"));
+ GetnMapfv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLsizei , GLfloat *)>(context->getProcAddress("glGetnMapfv"));
+ GetnMapdv = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLenum , GLsizei , GLdouble *)>(context->getProcAddress("glGetnMapdv"));
+
+}
+
+QOpenGLVersionStatus QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus()
+{
+ return QOpenGLVersionStatus(4, 5, QOpenGLVersionStatus::DeprecatedStatus);
+}
#else
diff --git a/src/gui/opengl/qopenglversionfunctions.h b/src/gui/opengl/qopenglversionfunctions.h
index f2007639d2..fcf665f97e 100644
--- a/src/gui/opengl/qopenglversionfunctions.h
+++ b/src/gui/opengl/qopenglversionfunctions.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -61,6 +61,10 @@ class QOpenGLContext;
#pragma qt_sync_stop_processing
#endif
+#define QOPENGL_DEPRECATEDFUNCTION \
+ qFatal("This function was erroneously included in previous versions of Qt and is here only for binary compatibility. " \
+ "If you need to use this function, please use a legacy OpenGL version or a Compatibility profile.")
+
struct QOpenGLVersionStatus
{
enum OpenGLStatus {
@@ -110,6 +114,8 @@ public:
QAtomicInt refs;
};
+class QAbstractOpenGLFunctions;
+
class QAbstractOpenGLFunctionsPrivate
{
public:
@@ -124,12 +130,16 @@ public:
const QOpenGLVersionStatus &v,
QOpenGLVersionFunctionsBackend *backend);
static void removeFunctionsBackend(QOpenGLContext *context, const QOpenGLVersionStatus &v);
+ static void insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
+ static void removeExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
+
+ static QAbstractOpenGLFunctionsPrivate *get(QAbstractOpenGLFunctions *q);
QOpenGLContext *owningContext;
bool initialized;
};
-class QAbstractOpenGLFunctions
+class Q_GUI_EXPORT QAbstractOpenGLFunctions
{
public:
virtual ~QAbstractOpenGLFunctions();
@@ -150,6 +160,11 @@ protected:
friend class QOpenGLContext;
};
+inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAbstractOpenGLFunctions *q)
+{
+ return q->d_func();
+}
+
#if !defined(QT_OPENGL_ES_2)
class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
@@ -169,13 +184,13 @@ public:
void (QOPENGLF_APIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
void (QOPENGLF_APIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
const GLubyte * (QOPENGLF_APIENTRYP GetString)(GLenum name);
- void (QOPENGLF_APIENTRYP GetIntegerv)(GLenum pname, GLint *params);
- void (QOPENGLF_APIENTRYP GetFloatv)(GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetIntegerv)(GLenum pname, GLint *data);
+ void (QOPENGLF_APIENTRYP GetFloatv)(GLenum pname, GLfloat *data);
GLenum (QOPENGLF_APIENTRYP GetError)();
- void (QOPENGLF_APIENTRYP GetDoublev)(GLenum pname, GLdouble *params);
- void (QOPENGLF_APIENTRYP GetBooleanv)(GLenum pname, GLboolean *params);
+ void (QOPENGLF_APIENTRYP GetDoublev)(GLenum pname, GLdouble *data);
+ void (QOPENGLF_APIENTRYP GetBooleanv)(GLenum pname, GLboolean *data);
void (QOPENGLF_APIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
- void (QOPENGLF_APIENTRYP ReadBuffer)(GLenum mode);
+ void (QOPENGLF_APIENTRYP ReadBuffer)(GLenum src);
void (QOPENGLF_APIENTRYP PixelStorei)(GLenum pname, GLint param);
void (QOPENGLF_APIENTRYP PixelStoref)(GLenum pname, GLfloat param);
void (QOPENGLF_APIENTRYP DepthFunc)(GLenum func);
@@ -194,7 +209,7 @@ public:
void (QOPENGLF_APIENTRYP ClearStencil)(GLint s);
void (QOPENGLF_APIENTRYP ClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void (QOPENGLF_APIENTRYP Clear)(GLbitfield mask);
- void (QOPENGLF_APIENTRYP DrawBuffer)(GLenum mode);
+ void (QOPENGLF_APIENTRYP DrawBuffer)(GLenum buf);
void (QOPENGLF_APIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
void (QOPENGLF_APIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
void (QOPENGLF_APIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint *params);
@@ -370,7 +385,7 @@ public:
void (QOPENGLF_APIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
void (QOPENGLF_APIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint *params);
GLint (QOPENGLF_APIENTRYP GetAttribLocation)(GLuint program, const GLchar *name);
- void (QOPENGLF_APIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+ void (QOPENGLF_APIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
void (QOPENGLF_APIENTRYP GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
void (QOPENGLF_APIENTRYP GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
void (QOPENGLF_APIENTRYP EnableVertexAttribArray)(GLuint index);
@@ -388,7 +403,42 @@ public:
void (QOPENGLF_APIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
void (QOPENGLF_APIENTRYP DrawBuffers)(GLsizei n, const GLenum *bufs);
void (QOPENGLF_APIENTRYP BlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
-
+ void (QOPENGLF_APIENTRYP VertexAttrib4usv)(GLuint index, const GLushort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4uiv)(GLuint index, const GLuint *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4ubv)(GLuint index, const GLubyte *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4sv)(GLuint index, const GLshort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+ void (QOPENGLF_APIENTRYP VertexAttrib4iv)(GLuint index, const GLint *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4fv)(GLuint index, const GLfloat *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+ void (QOPENGLF_APIENTRYP VertexAttrib4dv)(GLuint index, const GLdouble *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+ void (QOPENGLF_APIENTRYP VertexAttrib4bv)(GLuint index, const GLbyte *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Nusv)(GLuint index, const GLushort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Nuiv)(GLuint index, const GLuint *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Nubv)(GLuint index, const GLubyte *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Nsv)(GLuint index, const GLshort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Niv)(GLuint index, const GLint *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib4Nbv)(GLuint index, const GLbyte *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib3sv)(GLuint index, const GLshort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z);
+ void (QOPENGLF_APIENTRYP VertexAttrib3fv)(GLuint index, const GLfloat *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+ void (QOPENGLF_APIENTRYP VertexAttrib3dv)(GLuint index, const GLdouble *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+ void (QOPENGLF_APIENTRYP VertexAttrib2sv)(GLuint index, const GLshort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib2s)(GLuint index, GLshort x, GLshort y);
+ void (QOPENGLF_APIENTRYP VertexAttrib2fv)(GLuint index, const GLfloat *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y);
+ void (QOPENGLF_APIENTRYP VertexAttrib2dv)(GLuint index, const GLdouble *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y);
+ void (QOPENGLF_APIENTRYP VertexAttrib1sv)(GLuint index, const GLshort *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib1s)(GLuint index, GLshort x);
+ void (QOPENGLF_APIENTRYP VertexAttrib1fv)(GLuint index, const GLfloat *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib1f)(GLuint index, GLfloat x);
+ void (QOPENGLF_APIENTRYP VertexAttrib1dv)(GLuint index, const GLdouble *v);
+ void (QOPENGLF_APIENTRYP VertexAttrib1d)(GLuint index, GLdouble x);
};
class QOpenGLFunctions_2_1_CoreBackend : public QOpenGLVersionFunctionsBackend
@@ -480,7 +530,26 @@ public:
void (QOPENGLF_APIENTRYP GetIntegeri_v)(GLenum target, GLuint index, GLint *data);
void (QOPENGLF_APIENTRYP GetBooleani_v)(GLenum target, GLuint index, GLboolean *data);
void (QOPENGLF_APIENTRYP ColorMaski)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
-
+ void (QOPENGLF_APIENTRYP VertexAttribI4usv)(GLuint index, const GLushort *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI4ubv)(GLuint index, const GLubyte *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI4sv)(GLuint index, const GLshort *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI4bv)(GLuint index, const GLbyte *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI4uiv)(GLuint index, const GLuint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI3uiv)(GLuint index, const GLuint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI2uiv)(GLuint index, const GLuint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI1uiv)(GLuint index, const GLuint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI4iv)(GLuint index, const GLint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI3iv)(GLuint index, const GLint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI2iv)(GLuint index, const GLint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI1iv)(GLuint index, const GLint *v);
+ void (QOPENGLF_APIENTRYP VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void (QOPENGLF_APIENTRYP VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z);
+ void (QOPENGLF_APIENTRYP VertexAttribI2ui)(GLuint index, GLuint x, GLuint y);
+ void (QOPENGLF_APIENTRYP VertexAttribI1ui)(GLuint index, GLuint x);
+ void (QOPENGLF_APIENTRYP VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void (QOPENGLF_APIENTRYP VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z);
+ void (QOPENGLF_APIENTRYP VertexAttribI2i)(GLuint index, GLint x, GLint y);
+ void (QOPENGLF_APIENTRYP VertexAttribI1i)(GLuint index, GLint x);
};
class QOpenGLFunctions_3_1_CoreBackend : public QOpenGLVersionFunctionsBackend
@@ -514,12 +583,12 @@ public:
static QOpenGLVersionStatus versionStatus();
// OpenGL 3.2 core functions
- void (QOPENGLF_APIENTRYP SampleMaski)(GLuint index, GLbitfield mask);
+ void (QOPENGLF_APIENTRYP SampleMaski)(GLuint maskNumber, GLbitfield mask);
void (QOPENGLF_APIENTRYP GetMultisamplefv)(GLenum pname, GLuint index, GLfloat *val);
- void (QOPENGLF_APIENTRYP TexImage3DMultisample)(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
- void (QOPENGLF_APIENTRYP TexImage2DMultisample)(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void (QOPENGLF_APIENTRYP TexImage3DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void (QOPENGLF_APIENTRYP TexImage2DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
void (QOPENGLF_APIENTRYP GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
- void (QOPENGLF_APIENTRYP GetInteger64v)(GLenum pname, GLint64 *params);
+ void (QOPENGLF_APIENTRYP GetInteger64v)(GLenum pname, GLint64 *data);
void (QOPENGLF_APIENTRYP WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout);
GLenum (QOPENGLF_APIENTRYP ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout);
void (QOPENGLF_APIENTRYP DeleteSync)(GLsync sync);
@@ -825,6 +894,153 @@ public:
void (QOPENGLF_APIENTRYP DispatchCompute)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
void (QOPENGLF_APIENTRYP ClearBufferSubData)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
void (QOPENGLF_APIENTRYP ClearBufferData)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+ void (QOPENGLF_APIENTRYP GetObjectPtrLabel)(const GLvoid *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void (QOPENGLF_APIENTRYP ObjectPtrLabel)(const GLvoid *ptr, GLsizei length, const GLchar *label);
+ void (QOPENGLF_APIENTRYP GetObjectLabel)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+ void (QOPENGLF_APIENTRYP ObjectLabel)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+ void (QOPENGLF_APIENTRYP PopDebugGroup)();
+ void (QOPENGLF_APIENTRYP PushDebugGroup)(GLenum source, GLuint id, GLsizei length, const GLchar *message);
+ GLuint (QOPENGLF_APIENTRYP GetDebugMessageLog)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+ void (QOPENGLF_APIENTRYP DebugMessageCallback)(GLDEBUGPROC callback, const GLvoid *userParam);
+ void (QOPENGLF_APIENTRYP DebugMessageInsert)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+ void (QOPENGLF_APIENTRYP DebugMessageControl)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+
+};
+
+class QOpenGLFunctions_4_4_CoreBackend : public QOpenGLVersionFunctionsBackend
+{
+public:
+ QOpenGLFunctions_4_4_CoreBackend(QOpenGLContext *context);
+
+ static QOpenGLVersionStatus versionStatus();
+
+ // OpenGL 4.4 core functions
+ void (QOPENGLF_APIENTRYP BindVertexBuffers)(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void (QOPENGLF_APIENTRYP BindImageTextures)(GLuint first, GLsizei count, const GLuint *textures);
+ void (QOPENGLF_APIENTRYP BindSamplers)(GLuint first, GLsizei count, const GLuint *samplers);
+ void (QOPENGLF_APIENTRYP BindTextures)(GLuint first, GLsizei count, const GLuint *textures);
+ void (QOPENGLF_APIENTRYP BindBuffersRange)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
+ void (QOPENGLF_APIENTRYP BindBuffersBase)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
+ void (QOPENGLF_APIENTRYP ClearTexSubImage)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+ void (QOPENGLF_APIENTRYP ClearTexImage)(GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
+ void (QOPENGLF_APIENTRYP BufferStorage)(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
+
+};
+
+class QOpenGLFunctions_4_5_CoreBackend : public QOpenGLVersionFunctionsBackend
+{
+public:
+ QOpenGLFunctions_4_5_CoreBackend(QOpenGLContext *context);
+
+ static QOpenGLVersionStatus versionStatus();
+
+ // OpenGL 4.5 core functions
+ void (QOPENGLF_APIENTRYP TextureBarrier)();
+ void (QOPENGLF_APIENTRYP ReadnPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+ void (QOPENGLF_APIENTRYP GetnUniformuiv)(GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+ void (QOPENGLF_APIENTRYP GetnUniformiv)(GLuint program, GLint location, GLsizei bufSize, GLint *params);
+ void (QOPENGLF_APIENTRYP GetnUniformfv)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetnUniformdv)(GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+ void (QOPENGLF_APIENTRYP GetnTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void (QOPENGLF_APIENTRYP GetnCompressedTexImage)(GLenum target, GLint lod, GLsizei bufSize, void *pixels);
+ GLenum (QOPENGLF_APIENTRYP GetGraphicsResetStatus)();
+ void (QOPENGLF_APIENTRYP GetCompressedTextureSubImage)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
+ void (QOPENGLF_APIENTRYP GetTextureSubImage)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void (QOPENGLF_APIENTRYP MemoryBarrierByRegion)(GLbitfield barriers);
+ void (QOPENGLF_APIENTRYP CreateQueries)(GLenum target, GLsizei n, GLuint *ids);
+ void (QOPENGLF_APIENTRYP CreateProgramPipelines)(GLsizei n, GLuint *pipelines);
+ void (QOPENGLF_APIENTRYP CreateSamplers)(GLsizei n, GLuint *samplers);
+ void (QOPENGLF_APIENTRYP GetVertexArrayIndexed64iv)(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
+ void (QOPENGLF_APIENTRYP GetVertexArrayIndexediv)(GLuint vaobj, GLuint index, GLenum pname, GLint *param);
+ void (QOPENGLF_APIENTRYP GetVertexArrayiv)(GLuint vaobj, GLenum pname, GLint *param);
+ void (QOPENGLF_APIENTRYP VertexArrayBindingDivisor)(GLuint vaobj, GLuint bindingindex, GLuint divisor);
+ void (QOPENGLF_APIENTRYP VertexArrayAttribLFormat)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void (QOPENGLF_APIENTRYP VertexArrayAttribIFormat)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+ void (QOPENGLF_APIENTRYP VertexArrayAttribFormat)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+ void (QOPENGLF_APIENTRYP VertexArrayAttribBinding)(GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+ void (QOPENGLF_APIENTRYP VertexArrayVertexBuffers)(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
+ void (QOPENGLF_APIENTRYP VertexArrayVertexBuffer)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+ void (QOPENGLF_APIENTRYP VertexArrayElementBuffer)(GLuint vaobj, GLuint buffer);
+ void (QOPENGLF_APIENTRYP EnableVertexArrayAttrib)(GLuint vaobj, GLuint index);
+ void (QOPENGLF_APIENTRYP DisableVertexArrayAttrib)(GLuint vaobj, GLuint index);
+ void (QOPENGLF_APIENTRYP CreateVertexArrays)(GLsizei n, GLuint *arrays);
+ void (QOPENGLF_APIENTRYP GetTextureParameteriv)(GLuint texture, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP GetTextureParameterIuiv)(GLuint texture, GLenum pname, GLuint *params);
+ void (QOPENGLF_APIENTRYP GetTextureParameterIiv)(GLuint texture, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP GetTextureParameterfv)(GLuint texture, GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetTextureLevelParameteriv)(GLuint texture, GLint level, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP GetTextureLevelParameterfv)(GLuint texture, GLint level, GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetCompressedTextureImage)(GLuint texture, GLint level, GLsizei bufSize, void *pixels);
+ void (QOPENGLF_APIENTRYP GetTextureImage)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+ void (QOPENGLF_APIENTRYP BindTextureUnit)(GLuint unit, GLuint texture);
+ void (QOPENGLF_APIENTRYP GenerateTextureMipmap)(GLuint texture);
+ void (QOPENGLF_APIENTRYP TextureParameteriv)(GLuint texture, GLenum pname, const GLint *param);
+ void (QOPENGLF_APIENTRYP TextureParameterIuiv)(GLuint texture, GLenum pname, const GLuint *params);
+ void (QOPENGLF_APIENTRYP TextureParameterIiv)(GLuint texture, GLenum pname, const GLint *params);
+ void (QOPENGLF_APIENTRYP TextureParameteri)(GLuint texture, GLenum pname, GLint param);
+ void (QOPENGLF_APIENTRYP TextureParameterfv)(GLuint texture, GLenum pname, const GLfloat *param);
+ void (QOPENGLF_APIENTRYP TextureParameterf)(GLuint texture, GLenum pname, GLfloat param);
+ void (QOPENGLF_APIENTRYP CopyTextureSubImage3D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP CopyTextureSubImage2D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP CopyTextureSubImage1D)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+ void (QOPENGLF_APIENTRYP CompressedTextureSubImage3D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+ void (QOPENGLF_APIENTRYP CompressedTextureSubImage2D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+ void (QOPENGLF_APIENTRYP CompressedTextureSubImage1D)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+ void (QOPENGLF_APIENTRYP TextureSubImage3D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+ void (QOPENGLF_APIENTRYP TextureSubImage2D)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+ void (QOPENGLF_APIENTRYP TextureSubImage1D)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+ void (QOPENGLF_APIENTRYP TextureStorage3DMultisample)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+ void (QOPENGLF_APIENTRYP TextureStorage2DMultisample)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+ void (QOPENGLF_APIENTRYP TextureStorage3D)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+ void (QOPENGLF_APIENTRYP TextureStorage2D)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP TextureStorage1D)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
+ void (QOPENGLF_APIENTRYP TextureBufferRange)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
+ void (QOPENGLF_APIENTRYP TextureBuffer)(GLuint texture, GLenum internalformat, GLuint buffer);
+ void (QOPENGLF_APIENTRYP CreateTextures)(GLenum target, GLsizei n, GLuint *textures);
+ void (QOPENGLF_APIENTRYP GetNamedRenderbufferParameteriv)(GLuint renderbuffer, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP NamedRenderbufferStorageMultisample)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP NamedRenderbufferStorage)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP CreateRenderbuffers)(GLsizei n, GLuint *renderbuffers);
+ void (QOPENGLF_APIENTRYP GetNamedFramebufferAttachmentParameteriv)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP GetNamedFramebufferParameteriv)(GLuint framebuffer, GLenum pname, GLint *param);
+ GLenum (QOPENGLF_APIENTRYP CheckNamedFramebufferStatus)(GLuint framebuffer, GLenum target);
+ void (QOPENGLF_APIENTRYP BlitNamedFramebuffer)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+ void (QOPENGLF_APIENTRYP ClearNamedFramebufferfi)(GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil);
+ void (QOPENGLF_APIENTRYP ClearNamedFramebufferfv)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
+ void (QOPENGLF_APIENTRYP ClearNamedFramebufferuiv)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
+ void (QOPENGLF_APIENTRYP ClearNamedFramebufferiv)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
+ void (QOPENGLF_APIENTRYP InvalidateNamedFramebufferSubData)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP InvalidateNamedFramebufferData)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
+ void (QOPENGLF_APIENTRYP NamedFramebufferReadBuffer)(GLuint framebuffer, GLenum src);
+ void (QOPENGLF_APIENTRYP NamedFramebufferDrawBuffers)(GLuint framebuffer, GLsizei n, const GLenum *bufs);
+ void (QOPENGLF_APIENTRYP NamedFramebufferDrawBuffer)(GLuint framebuffer, GLenum buf);
+ void (QOPENGLF_APIENTRYP NamedFramebufferTextureLayer)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+ void (QOPENGLF_APIENTRYP NamedFramebufferTexture)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+ void (QOPENGLF_APIENTRYP NamedFramebufferParameteri)(GLuint framebuffer, GLenum pname, GLint param);
+ void (QOPENGLF_APIENTRYP NamedFramebufferRenderbuffer)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+ void (QOPENGLF_APIENTRYP CreateFramebuffers)(GLsizei n, GLuint *framebuffers);
+ void (QOPENGLF_APIENTRYP GetNamedBufferSubData)(GLuint buffer, GLintptr offset, GLsizei size, void *data);
+ void (QOPENGLF_APIENTRYP GetNamedBufferPointerv)(GLuint buffer, GLenum pname, GLvoid* *params);
+ void (QOPENGLF_APIENTRYP GetNamedBufferParameteri64v)(GLuint buffer, GLenum pname, GLint64 *params);
+ void (QOPENGLF_APIENTRYP GetNamedBufferParameteriv)(GLuint buffer, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP FlushMappedNamedBufferRange)(GLuint buffer, GLintptr offset, GLsizei length);
+ GLboolean (QOPENGLF_APIENTRYP UnmapNamedBuffer)(GLuint buffer);
+ GLvoid* (QOPENGLF_APIENTRYP MapNamedBufferRange)(GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
+ GLvoid* (QOPENGLF_APIENTRYP MapNamedBuffer)(GLuint buffer, GLenum access);
+ void (QOPENGLF_APIENTRYP ClearNamedBufferSubData)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
+ void (QOPENGLF_APIENTRYP ClearNamedBufferData)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+ void (QOPENGLF_APIENTRYP CopyNamedBufferSubData)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
+ void (QOPENGLF_APIENTRYP NamedBufferSubData)(GLuint buffer, GLintptr offset, GLsizei size, const void *data);
+ void (QOPENGLF_APIENTRYP NamedBufferData)(GLuint buffer, GLsizei size, const void *data, GLenum usage);
+ void (QOPENGLF_APIENTRYP NamedBufferStorage)(GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
+ void (QOPENGLF_APIENTRYP CreateBuffers)(GLsizei n, GLuint *buffers);
+ void (QOPENGLF_APIENTRYP GetTransformFeedbacki64_v)(GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
+ void (QOPENGLF_APIENTRYP GetTransformFeedbacki_v)(GLuint xfb, GLenum pname, GLuint index, GLint *param);
+ void (QOPENGLF_APIENTRYP GetTransformFeedbackiv)(GLuint xfb, GLenum pname, GLint *param);
+ void (QOPENGLF_APIENTRYP TransformFeedbackBufferRange)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
+ void (QOPENGLF_APIENTRYP TransformFeedbackBufferBase)(GLuint xfb, GLuint index, GLuint buffer);
+ void (QOPENGLF_APIENTRYP CreateTransformFeedbacks)(GLsizei n, GLuint *ids);
+ void (QOPENGLF_APIENTRYP ClipControl)(GLenum origin, GLenum depth);
};
@@ -872,9 +1088,9 @@ public:
void (QOPENGLF_APIENTRYP GetClipPlane)(GLenum plane, GLdouble *equation);
void (QOPENGLF_APIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
void (QOPENGLF_APIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
- void (QOPENGLF_APIENTRYP PixelMapusv)(GLenum map, GLint mapsize, const GLushort *values);
- void (QOPENGLF_APIENTRYP PixelMapuiv)(GLenum map, GLint mapsize, const GLuint *values);
- void (QOPENGLF_APIENTRYP PixelMapfv)(GLenum map, GLint mapsize, const GLfloat *values);
+ void (QOPENGLF_APIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values);
+ void (QOPENGLF_APIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values);
+ void (QOPENGLF_APIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values);
void (QOPENGLF_APIENTRYP PixelTransferi)(GLenum pname, GLint param);
void (QOPENGLF_APIENTRYP PixelTransferf)(GLenum pname, GLfloat param);
void (QOPENGLF_APIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor);
@@ -1119,7 +1335,9 @@ public:
void (QOPENGLF_APIENTRYP DisableClientState)(GLenum array);
void (QOPENGLF_APIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void (QOPENGLF_APIENTRYP ArrayElement)(GLint i);
-
+ void (QOPENGLF_APIENTRYP Indexubv)(const GLubyte *c);
+ void (QOPENGLF_APIENTRYP Indexub)(GLubyte c);
+ void (QOPENGLF_APIENTRYP GetPointerv)(GLenum pname, GLvoid* *params);
};
class QOpenGLFunctions_1_2_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
@@ -1130,37 +1348,37 @@ public:
static QOpenGLVersionStatus versionStatus();
// OpenGL 1.2 deprecated functions
- void (QOPENGLF_APIENTRYP ResetMinmax)(GLenum target);
- void (QOPENGLF_APIENTRYP ResetHistogram)(GLenum target);
- void (QOPENGLF_APIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink);
- void (QOPENGLF_APIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
- void (QOPENGLF_APIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint *params);
- void (QOPENGLF_APIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat *params);
- void (QOPENGLF_APIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
- void (QOPENGLF_APIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint *params);
- void (QOPENGLF_APIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat *params);
- void (QOPENGLF_APIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
- void (QOPENGLF_APIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
- void (QOPENGLF_APIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
- void (QOPENGLF_APIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint *params);
- void (QOPENGLF_APIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat *params);
- void (QOPENGLF_APIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid *image);
- void (QOPENGLF_APIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
- void (QOPENGLF_APIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
- void (QOPENGLF_APIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint *params);
- void (QOPENGLF_APIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params);
- void (QOPENGLF_APIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
- void (QOPENGLF_APIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params);
- void (QOPENGLF_APIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
- void (QOPENGLF_APIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
- void (QOPENGLF_APIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
- void (QOPENGLF_APIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
- void (QOPENGLF_APIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint *params);
- void (QOPENGLF_APIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat *params);
- void (QOPENGLF_APIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid *table);
- void (QOPENGLF_APIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
- void (QOPENGLF_APIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params);
void (QOPENGLF_APIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
+ void (QOPENGLF_APIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params);
+ void (QOPENGLF_APIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+ void (QOPENGLF_APIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid *table);
+ void (QOPENGLF_APIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+ void (QOPENGLF_APIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+ void (QOPENGLF_APIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+ void (QOPENGLF_APIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+ void (QOPENGLF_APIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params);
+ void (QOPENGLF_APIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
+ void (QOPENGLF_APIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params);
+ void (QOPENGLF_APIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint *params);
+ void (QOPENGLF_APIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+ void (QOPENGLF_APIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+ void (QOPENGLF_APIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid *image);
+ void (QOPENGLF_APIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+ void (QOPENGLF_APIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+ void (QOPENGLF_APIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+ void (QOPENGLF_APIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+ void (QOPENGLF_APIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+ void (QOPENGLF_APIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint *params);
+ void (QOPENGLF_APIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+ void (QOPENGLF_APIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink);
+ void (QOPENGLF_APIENTRYP ResetHistogram)(GLenum target);
+ void (QOPENGLF_APIENTRYP ResetMinmax)(GLenum target);
void (QOPENGLF_APIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
};
@@ -1340,6 +1558,69 @@ public:
};
+class QOpenGLFunctions_3_3_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
+{
+public:
+ QOpenGLFunctions_3_3_DeprecatedBackend(QOpenGLContext *context);
+
+ static QOpenGLVersionStatus versionStatus();
+
+ // OpenGL 3.3 deprecated functions
+ void (QOPENGLF_APIENTRYP SecondaryColorP3uiv)(GLenum type, const GLuint *color);
+ void (QOPENGLF_APIENTRYP SecondaryColorP3ui)(GLenum type, GLuint color);
+ void (QOPENGLF_APIENTRYP ColorP4uiv)(GLenum type, const GLuint *color);
+ void (QOPENGLF_APIENTRYP ColorP4ui)(GLenum type, GLuint color);
+ void (QOPENGLF_APIENTRYP ColorP3uiv)(GLenum type, const GLuint *color);
+ void (QOPENGLF_APIENTRYP ColorP3ui)(GLenum type, GLuint color);
+ void (QOPENGLF_APIENTRYP NormalP3uiv)(GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP NormalP3ui)(GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP4uiv)(GLenum texture, GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP4ui)(GLenum texture, GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP3uiv)(GLenum texture, GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP3ui)(GLenum texture, GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP2uiv)(GLenum texture, GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP2ui)(GLenum texture, GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP1uiv)(GLenum texture, GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP MultiTexCoordP1ui)(GLenum texture, GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP TexCoordP4uiv)(GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP TexCoordP4ui)(GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP TexCoordP3uiv)(GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP TexCoordP3ui)(GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP TexCoordP2uiv)(GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP TexCoordP2ui)(GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP TexCoordP1uiv)(GLenum type, const GLuint *coords);
+ void (QOPENGLF_APIENTRYP TexCoordP1ui)(GLenum type, GLuint coords);
+ void (QOPENGLF_APIENTRYP VertexP4uiv)(GLenum type, const GLuint *value);
+ void (QOPENGLF_APIENTRYP VertexP4ui)(GLenum type, GLuint value);
+ void (QOPENGLF_APIENTRYP VertexP3uiv)(GLenum type, const GLuint *value);
+ void (QOPENGLF_APIENTRYP VertexP3ui)(GLenum type, GLuint value);
+ void (QOPENGLF_APIENTRYP VertexP2uiv)(GLenum type, const GLuint *value);
+ void (QOPENGLF_APIENTRYP VertexP2ui)(GLenum type, GLuint value);
+
+};
+
+class QOpenGLFunctions_4_5_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
+{
+public:
+ QOpenGLFunctions_4_5_DeprecatedBackend(QOpenGLContext *context);
+
+ static QOpenGLVersionStatus versionStatus();
+
+ // OpenGL 4.5 deprecated functions
+ void (QOPENGLF_APIENTRYP GetnMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);
+ void (QOPENGLF_APIENTRYP GetnHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);
+ void (QOPENGLF_APIENTRYP GetnSeparableFilter)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span);
+ void (QOPENGLF_APIENTRYP GetnConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image);
+ void (QOPENGLF_APIENTRYP GetnColorTable)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table);
+ void (QOPENGLF_APIENTRYP GetnPolygonStipple)(GLsizei bufSize, GLubyte *pattern);
+ void (QOPENGLF_APIENTRYP GetnPixelMapusv)(GLenum map, GLsizei bufSize, GLushort *values);
+ void (QOPENGLF_APIENTRYP GetnPixelMapuiv)(GLenum map, GLsizei bufSize, GLuint *values);
+ void (QOPENGLF_APIENTRYP GetnPixelMapfv)(GLenum map, GLsizei bufSize, GLfloat *values);
+ void (QOPENGLF_APIENTRYP GetnMapiv)(GLenum target, GLenum query, GLsizei bufSize, GLint *v);
+ void (QOPENGLF_APIENTRYP GetnMapfv)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
+ void (QOPENGLF_APIENTRYP GetnMapdv)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
+
+};
#else
diff --git a/src/gui/opengl/qopenglversionfunctionsfactory.cpp b/src/gui/opengl/qopenglversionfunctionsfactory.cpp
index 35fe14ca54..ef9fcd4acd 100644
--- a/src/gui/opengl/qopenglversionfunctionsfactory.cpp
+++ b/src/gui/opengl/qopenglversionfunctionsfactory.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -43,6 +43,10 @@
#include "qopenglversionfunctionsfactory_p.h"
#if !defined(QT_OPENGL_ES_2)
+#include "qopenglfunctions_4_5_core.h"
+#include "qopenglfunctions_4_5_compatibility.h"
+#include "qopenglfunctions_4_4_core.h"
+#include "qopenglfunctions_4_4_compatibility.h"
#include "qopenglfunctions_4_3_core.h"
#include "qopenglfunctions_4_3_compatibility.h"
#include "qopenglfunctions_4_2_core.h"
@@ -80,7 +84,11 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVe
if (versionProfile.hasProfiles()) {
switch (versionProfile.profile()) {
case QSurfaceFormat::CoreProfile:
- if (major == 4 && minor == 3)
+ if (major == 4 && minor == 5)
+ return new QOpenGLFunctions_4_5_Core;
+ else if (major == 4 && minor == 4)
+ return new QOpenGLFunctions_4_4_Core;
+ else if (major == 4 && minor == 3)
return new QOpenGLFunctions_4_3_Core;
else if (major == 4 && minor == 2)
return new QOpenGLFunctions_4_2_Core;
@@ -95,7 +103,11 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVe
break;
case QSurfaceFormat::CompatibilityProfile:
- if (major == 4 && minor == 3)
+ if (major == 4 && minor == 5)
+ return new QOpenGLFunctions_4_5_Compatibility;
+ else if (major == 4 && minor == 4)
+ return new QOpenGLFunctions_4_4_Compatibility;
+ else if (major == 4 && minor == 3)
return new QOpenGLFunctions_4_3_Compatibility;
else if (major == 4 && minor == 2)
return new QOpenGLFunctions_4_2_Compatibility;
diff --git a/src/gui/opengl/qopenglversionfunctionsfactory_p.h b/src/gui/opengl/qopenglversionfunctionsfactory_p.h
index 00a26f1112..4795a42658 100644
--- a/src/gui/opengl/qopenglversionfunctionsfactory_p.h
+++ b/src/gui/opengl/qopenglversionfunctionsfactory_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp
index d3eadf9ae1..2a1b7f4bf4 100644
--- a/src/gui/opengl/qopenglvertexarrayobject.cpp
+++ b/src/gui/opengl/qopenglvertexarrayobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sean Harmer <sean.harmer@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -144,6 +144,11 @@ bool QOpenGLVertexArrayObjectPrivate::create()
qWarning("QOpenGLVertexArrayObject::create() requires a valid current OpenGL context");
return false;
}
+
+ //Fail early, if context is the same as ctx, it means we have tried to initialize for this context and failed
+ if (ctx == context)
+ return false;
+
context = ctx;
QObject::connect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed()));
@@ -161,12 +166,10 @@ bool QOpenGLVertexArrayObjectPrivate::create()
if (format.version() >= qMakePair<int, int>(3,2)) {
vaoFuncs.core_3_2 = ctx->versionFunctions<QOpenGLFunctions_3_2_Core>();
vaoFuncsType = Core_3_2;
- vaoFuncs.core_3_2->initializeOpenGLFunctions();
vaoFuncs.core_3_2->glGenVertexArrays(1, &vao);
} else if (format.majorVersion() >= 3) {
vaoFuncs.core_3_0 = ctx->versionFunctions<QOpenGLFunctions_3_0>();
vaoFuncsType = Core_3_0;
- vaoFuncs.core_3_0->initializeOpenGLFunctions();
vaoFuncs.core_3_0->glGenVertexArrays(1, &vao);
} else
#endif
@@ -186,11 +189,16 @@ bool QOpenGLVertexArrayObjectPrivate::create()
void QOpenGLVertexArrayObjectPrivate::destroy()
{
+ Q_Q(QOpenGLVertexArrayObject);
+
+ if (context) {
+ QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed()));
+ context = 0;
+ }
+
if (!vao)
return;
- Q_Q(QOpenGLVertexArrayObject);
-
switch (vaoFuncsType) {
#ifndef QT_OPENGL_ES_2
case Core_3_2:
@@ -209,10 +217,6 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
break;
}
- Q_ASSERT(context);
- QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed()));
- context = 0;
-
vao = 0;
}
diff --git a/src/gui/opengl/qopenglvertexarrayobject.h b/src/gui/opengl/qopenglvertexarrayobject.h
index 56f8f95851..3e01d31202 100644
--- a/src/gui/opengl/qopenglvertexarrayobject.h
+++ b/src/gui/opengl/qopenglvertexarrayobject.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sean Harmer <sean.harmer@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qopenglvertexarrayobject_p.h b/src/gui/opengl/qopenglvertexarrayobject_p.h
index 366d7ae2f6..8cfa711269 100644
--- a/src/gui/opengl/qopenglvertexarrayobject_p.h
+++ b/src/gui/opengl/qopenglvertexarrayobject_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sean Harmer <sean.harmer@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qrbtree_p.h b/src/gui/opengl/qrbtree_p.h
index d63138ae09..ee3c72b5d8 100644
--- a/src/gui/opengl/qrbtree_p.h
+++ b/src/gui/opengl/qrbtree_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qtriangulatingstroker.cpp b/src/gui/opengl/qtriangulatingstroker.cpp
index 204c6a62ef..cfbf8a75c5 100644
--- a/src/gui/opengl/qtriangulatingstroker.cpp
+++ b/src/gui/opengl/qtriangulatingstroker.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/opengl/qtriangulatingstroker_p.h b/src/gui/opengl/qtriangulatingstroker_p.h
index 79b5e8745f..dd46cbe1e5 100644
--- a/src/gui/opengl/qtriangulatingstroker_p.h
+++ b/src/gui/opengl/qtriangulatingstroker_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -134,11 +134,11 @@ inline void QTriangulatingStroker::normalVector(float x1, float y1, float x2, fl
float pw;
if (dx == 0)
- pw = m_width / qAbs(dy);
+ pw = m_width / std::abs(dy);
else if (dy == 0)
- pw = m_width / qAbs(dx);
+ pw = m_width / std::abs(dx);
else
- pw = m_width / sqrt(dx*dx + dy*dy);
+ pw = m_width / std::sqrt(dx*dx + dy*dy);
*nx = -dy * pw;
*ny = dx * pw;
diff --git a/src/gui/opengl/qtriangulator.cpp b/src/gui/opengl/qtriangulator.cpp
index f44c8adcf5..6574fe9975 100644
--- a/src/gui/opengl/qtriangulator.cpp
+++ b/src/gui/opengl/qtriangulator.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -49,8 +49,6 @@
#include <private/qopenglextensions_p.h>
#include <private/qrbtree_p.h>
-#include <math.h>
-
QT_BEGIN_NAMESPACE
//#define Q_TRIANGULATOR_DEBUG
@@ -441,8 +439,8 @@ T QMaxHeap<T>::pop()
// Copied from qhash.cpp
static const uchar prime_deltas[] = {
- 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 9, 25, 3,
- 1, 21, 3, 21, 7, 15, 9, 5, 3, 29, 15, 0, 0, 0, 0, 0
+ 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 17, 27, 3,
+ 1, 29, 3, 21, 7, 17, 15, 9, 43, 35, 15, 0, 0, 0, 0, 0
};
// Copied from qhash.cpp
@@ -457,7 +455,7 @@ static inline int primeForCount(int count)
int high = 32;
for (int i = 0; i < 5; ++i) {
int mid = (high + low) / 2;
- if (count >= 1 << mid)
+ if (uint(count) >= (1u << mid))
low = mid;
else
high = mid;
@@ -1700,8 +1698,8 @@ void QTriangulator<T>::ComplexToSimple::DebugDialog::paintEvent(QPaintEvent *)
QPodPoint q = vertices.at(splits.at(i).vertex);
QPodPoint u = vertices.at(edges.at(splits.at(i).edge).from) - q;
QPodPoint v = vertices.at(edges.at(splits.at(i).edge).to) - q;
- qreal uLen = sqrt(qreal(qDot(u, u)));
- qreal vLen = sqrt(qreal(qDot(v, v)));
+ qreal uLen = qSqrt(qDot(u, u));
+ qreal vLen = qSqrt(qDot(v, v));
if (uLen) {
u.x *= 2 * halfPointSize / uLen;
u.y *= 2 * halfPointSize / uLen;
@@ -1719,7 +1717,7 @@ void QTriangulator<T>::ComplexToSimple::DebugDialog::paintEvent(QPaintEvent *)
template <typename T>
void QTriangulator<T>::ComplexToSimple::DebugDialog::wheelEvent(QWheelEvent *event)
{
- qreal scale = exp(-0.001 * event->delta());
+ qreal scale = qExp(-0.001 * event->delta());
QPointF center = m_window.center();
QPointF delta = scale * (m_window.bottomRight() - center);
m_window = QRectF(center - delta, center + delta);
diff --git a/src/gui/opengl/qtriangulator_p.h b/src/gui/opengl/qtriangulator_p.h
index 599db9470d..0ab3f7496c 100644
--- a/src/gui/opengl/qtriangulator_p.h
+++ b/src/gui/opengl/qtriangulator_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 579c0bc2a9..2f2d3daaf8 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -42,11 +42,11 @@ HEADERS += \
painting/qrasterdefs_p.h \
painting/qrasterizer_p.h \
painting/qregion.h \
+ painting/qrgb.h \
painting/qstroker_p.h \
painting/qtextureglyphcache_p.h \
painting/qtransform.h \
painting/qplatformbackingstore.h \
- painting/qpaintbuffer_p.h \
painting/qpathsimplifier_p.h
@@ -89,11 +89,12 @@ SOURCES += \
painting/qtextureglyphcache.cpp \
painting/qtransform.cpp \
painting/qplatformbackingstore.cpp \
- painting/qpaintbuffer.cpp \
painting/qpathsimplifier.cpp
SSE2_SOURCES += painting/qdrawhelper_sse2.cpp
SSSE3_SOURCES += painting/qdrawhelper_ssse3.cpp
+SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp
+AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
!ios {
CONFIG += no_clang_integrated_as
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 4298c0c447..19074e4c47 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qbackingstore.h b/src/gui/painting/qbackingstore.h
index 86bd77d124..ee3c05f7a9 100644
--- a/src/gui/painting/qbackingstore.h
+++ b/src/gui/painting/qbackingstore.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index a741c94c16..8e0e76f787 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -40,7 +40,6 @@
#include <qmath.h>
#include <private/qnumeric_p.h>
-#include <private/qmath_p.h>
QT_BEGIN_NAMESPACE
@@ -363,7 +362,7 @@ static bool addCircle(const QBezier *b, qreal offset, QBezier *o)
cos_a = 1.;
if (cos_a < -1.)
cos_a = -1;
- angles[i] = qAcos(cos_a)/Q_PI;
+ angles[i] = qAcos(cos_a) * qreal(M_1_PI);
}
if (angles[0] + angles[1] > 1.) {
diff --git a/src/gui/painting/qbezier_p.h b/src/gui/painting/qbezier_p.h
index 3251cdeccb..dd1cd94acf 100644
--- a/src/gui/painting/qbezier_p.h
+++ b/src/gui/painting/qbezier_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 2da5dbb356..478fe6564c 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -245,7 +245,7 @@ static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl,
}
quint16 *dst = (quint16 *) destPixels;
- quint32 *src = (quint32 *) srcPixels;
+ const quint32 *src = (const quint32 *) srcPixels;
for (int y=0; y<h; ++y) {
for (int x=0; x<w; ++x) {
@@ -282,7 +282,7 @@ static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl,
}
}
dst = (quint16 *) (((uchar *) dst) + dbpl);
- src = (quint32 *) (((uchar *) src) + sbpl);
+ src = (const quint32 *) (((const uchar *) src) + sbpl);
}
}
@@ -764,7 +764,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGRs30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_Mono
0, // Format_Invalid,
@@ -789,7 +791,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_MonoLSB
0, // Format_Invalid,
@@ -814,7 +818,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_Indexed8
0, // Format_Invalid,
@@ -839,7 +845,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB32
0, // Format_Invalid,
@@ -864,7 +872,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB32
0, // Format_Invalid,
@@ -889,7 +899,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB32_Premultiplied
0, // Format_Invalid,
@@ -914,7 +926,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB16
0, // Format_Invalid,
@@ -939,7 +953,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB8565_Premultiplied
0, // Format_Invalid,
@@ -964,7 +980,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB666
0, // Format_Invalid,
@@ -989,7 +1007,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB6666_Premultiplied
0, // Format_Invalid,
@@ -1014,7 +1034,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB555
0, // Format_Invalid,
@@ -1039,7 +1061,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB8555_Premultiplied
0, // Format_Invalid,
@@ -1064,7 +1088,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB888
0, // Format_Invalid,
@@ -1089,7 +1115,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB444
0, // Format_Invalid,
@@ -1114,7 +1142,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB4444_Premultiplied
0, // Format_Invalid,
@@ -1139,7 +1169,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBX8888
0, // Format_Invalid,
@@ -1170,7 +1202,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBA8888
0, // Format_Invalid,
@@ -1195,7 +1229,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBA8888_Premultiplied
0, // Format_Invalid,
@@ -1226,7 +1262,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_BGR30
0, // Format_Invalid,
@@ -1251,7 +1289,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_A2BGR30_Premultiplied
0, // Format_Invalid,
@@ -1276,7 +1316,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB30
0, // Format_Invalid,
@@ -1301,7 +1343,9 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_A2RGB30_Premultiplied
0, // Format_Invalid,
@@ -1326,8 +1370,64 @@ SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
+ { // Format_Alpha8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0, // Format_ARGB4444_Premultiplied,
+ 0, // Format_RGBX8888,
+ 0, // Format_RGBA8888,
+ 0, // Format_RGBA8888_Premultiplied,
+ 0, // Format_BGR30,
+ 0, // Format_A2BGR30_Premultiplied,
+ 0, // Format_RGB30,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
+ },
+ { // Format_Grayscale8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0, // Format_ARGB4444_Premultiplied,
+ 0, // Format_RGBX8888,
+ 0, // Format_RGBA8888,
+ 0, // Format_RGBA8888_Premultiplied,
+ 0, // Format_BGR30,
+ 0, // Format_A2BGR30_Premultiplied,
+ 0, // Format_RGB30,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
+ }
};
@@ -1355,7 +1455,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_Mono
0, // Format_Invalid,
@@ -1380,7 +1482,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_MonoLSB
0, // Format_Invalid,
@@ -1405,7 +1509,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_Indexed8
0, // Format_Invalid,
@@ -1430,7 +1536,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB32
0, // Format_Invalid,
@@ -1455,7 +1563,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB32
0, // Format_Invalid,
@@ -1480,7 +1590,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB32_Premultiplied
0, // Format_Invalid,
@@ -1505,7 +1617,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB16
0, // Format_Invalid,
@@ -1530,7 +1644,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB8565_Premultiplied
0, // Format_Invalid,
@@ -1555,7 +1671,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB666
0, // Format_Invalid,
@@ -1580,7 +1698,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB6666_Premultiplied
0, // Format_Invalid,
@@ -1605,7 +1725,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB555
0, // Format_Invalid,
@@ -1630,7 +1752,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB8555_Premultiplied
0, // Format_Invalid,
@@ -1655,7 +1779,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB888
0, // Format_Invalid,
@@ -1680,7 +1806,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB444
0, // Format_Invalid,
@@ -1705,7 +1833,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB4444_Premultiplied
0, // Format_Invalid,
@@ -1730,7 +1860,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBX8888
0, // Format_Invalid,
@@ -1761,7 +1893,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBA8888
0, // Format_Invalid,
@@ -1786,7 +1920,9 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBA8888_Premultiplied
0, // Format_Invalid,
@@ -1818,6 +1954,8 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_BGR30
0, // Format_Invalid,
@@ -1843,6 +1981,7 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_RGB30,
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
+ 0, 0,
},
{ // Format_A2BGR30_Premultiplied
0, // Format_Invalid,
@@ -1868,6 +2007,7 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2BGR30_Premultiplied,
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_RGB30,
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
+ 0, 0,
},
{ // Format_RGB30
0, // Format_Invalid,
@@ -1893,6 +2033,7 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2BGR30_Premultiplied,
qt_blend_rgb30_on_rgb30, // Format_RGB30,
qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
+ 0, 0,
},
{ // Format_A2RGB30_Premultiplied
0, // Format_Invalid,
@@ -1917,8 +2058,63 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_BGR30,
qt_blend_a2bgr30pm_on_a2rgb30pm, // Format_A2BGR30_Premultiplied,
qt_blend_rgb30_on_rgb30, // Format_RGB30,
- qt_blend_a2rgb30pm_on_a2rgb30pm // Format_A2RGB30_Premultiplied,
+ qt_blend_a2rgb30pm_on_a2rgb30pm, // Format_A2RGB30_Premultiplied,
+ 0, 0,
},
+ { // Format_Alpha8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0, // Format_ARGB4444_Premultiplied,
+ 0, // Format_RGBX8888,
+ 0, // Format_RGBA8888,
+ 0, // Format_RGBA8888_Premultiplied,
+ 0, // Format_BGR30,
+ 0, // Format_A2BGR30_Premultiplied,
+ 0, // Format_RGB30,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
+ },
+ { // Format_Grayscale8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0, // Format_ARGB4444_Premultiplied,
+ 0, // Format_RGBX8888,
+ 0, // Format_RGBA8888,
+ 0, // Format_RGBA8888_Premultiplied,
+ 0, // Format_BGR30,
+ 0, // Format_A2BGR30_Premultiplied,
+ 0, // Format_RGB30,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
+ }
};
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
@@ -1945,7 +2141,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_Mono
0, // Format_Invalid,
@@ -1970,7 +2168,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_MonoLSB
0, // Format_Invalid,
@@ -1995,7 +2195,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_Indexed8
0, // Format_Invalid,
@@ -2020,7 +2222,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB32
0, // Format_Invalid,
@@ -2045,7 +2249,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB32
0, // Format_Invalid,
@@ -2070,7 +2276,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB32_Premultiplied
0, // Format_Invalid,
@@ -2095,7 +2303,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB16
0, // Format_Invalid,
@@ -2120,7 +2330,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB8565_Premultiplied
0, // Format_Invalid,
@@ -2145,7 +2357,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB666
0, // Format_Invalid,
@@ -2170,7 +2384,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB6666_Premultiplied
0, // Format_Invalid,
@@ -2195,7 +2411,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB555
0, // Format_Invalid,
@@ -2220,7 +2438,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB8555_Premultiplied
0, // Format_Invalid,
@@ -2245,7 +2465,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB888
0, // Format_Invalid,
@@ -2270,7 +2492,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB444
0, // Format_Invalid,
@@ -2295,7 +2519,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_ARGB4444_Premultiplied
0, // Format_Invalid,
@@ -2320,7 +2546,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBX8888
0, // Format_Invalid,
@@ -2351,7 +2579,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBA8888
0, // Format_Invalid,
@@ -2376,7 +2606,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGBA8888_Premultiplied
0, // Format_Invalid,
@@ -2407,7 +2639,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_BGR30
0, // Format_Invalid,
@@ -2432,7 +2666,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_A2BGR30_Premultiplied
0, // Format_Invalid,
@@ -2457,7 +2693,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_RGB30
0, // Format_Invalid,
@@ -2482,7 +2720,9 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
{ // Format_A2RGB30_Premultiplied
0, // Format_Invalid,
@@ -2507,7 +2747,63 @@ SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFo
0, // Format_BGR30,
0, // Format_A2BGR30_Premultiplied,
0, // Format_RGB30,
- 0 // Format_A2RGB30_Premultiplied,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
+ },
+ { // Format_Alpha8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0, // Format_ARGB4444_Premultiplied,
+ 0, // Format_RGBX8888,
+ 0, // Format_RGBA8888,
+ 0, // Format_RGBA8888_Premultiplied,
+ 0, // Format_BGR30,
+ 0, // Format_A2BGR30_Premultiplied,
+ 0, // Format_RGB30,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
+ },
+ { // Format_Grayscale8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0, // Format_ARGB4444_Premultiplied,
+ 0, // Format_RGBX8888,
+ 0, // Format_RGBA8888,
+ 0, // Format_RGBA8888_Premultiplied,
+ 0, // Format_BGR30,
+ 0, // Format_A2BGR30_Premultiplied,
+ 0, // Format_RGB30,
+ 0, // Format_A2RGB30_Premultiplied,
+ 0, // Format_Alpha8
+ 0, // Format_Grayscale8
},
};
diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h
index f81f2be9b4..4435421cd0 100644
--- a/src/gui/painting/qblendfunctions_p.h
+++ b/src/gui/painting/qblendfunctions_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qblittable.cpp b/src/gui/painting/qblittable.cpp
index a3451c0cd3..a06b83c96a 100644
--- a/src/gui/painting/qblittable.cpp
+++ b/src/gui/painting/qblittable.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qblittable_p.h b/src/gui/painting/qblittable_p.h
index 45ee4b0fdc..47218f2f35 100644
--- a/src/gui/painting/qblittable_p.h
+++ b/src/gui/painting/qblittable_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index d136f3a903..5bf8387400 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -35,6 +35,7 @@
#include "qpixmap.h"
#include "qbitmap.h"
#include "qpixmapcache.h"
+#include "qplatformpixmap.h"
#include "qdatastream.h"
#include "qvariant.h"
#include "qline.h"
@@ -950,9 +951,34 @@ bool QBrush::operator==(const QBrush &b) const
switch (d->style) {
case Qt::TexturePattern:
{
- const QPixmap &us = (static_cast<QTexturedBrushData *>(d.data()))->pixmap();
- const QPixmap &them = (static_cast<QTexturedBrushData *>(b.d.data()))->pixmap();
- return ((us.isNull() && them.isNull()) || us.cacheKey() == them.cacheKey());
+ // Note this produces false negatives if the textures have identical data,
+ // but does not share the same data in memory. Since equality is likely to
+ // be used to avoid iterating over the data for a texture update, this should
+ // still be better than doing an accurate comparison.
+ const QPixmap *us = 0, *them = 0;
+ qint64 cacheKey1, cacheKey2;
+ if (qHasPixmapTexture(*this)) {
+ us = (static_cast<QTexturedBrushData *>(d.data()))->m_pixmap;
+ cacheKey1 = us->cacheKey();
+ } else
+ cacheKey1 = (static_cast<QTexturedBrushData *>(d.data()))->image().cacheKey();
+
+ if (qHasPixmapTexture(b)) {
+ them = (static_cast<QTexturedBrushData *>(b.d.data()))->m_pixmap;
+ cacheKey2 = them->cacheKey();
+ } else
+ cacheKey2 = (static_cast<QTexturedBrushData *>(b.d.data()))->image().cacheKey();
+
+ if (cacheKey1 != cacheKey2)
+ return false;
+ if (!us == !them) // both images or both pixmaps
+ return true;
+ // Only raster QPixmaps use the same cachekeys as QImages.
+ if (us && us->handle()->classId() == QPlatformPixmap::RasterClass)
+ return true;
+ if (them && them->handle()->classId() == QPlatformPixmap::RasterClass)
+ return true;
+ return false;
}
case Qt::LinearGradientPattern:
case Qt::RadialGradientPattern:
@@ -996,8 +1022,9 @@ QDebug operator<<(QDebug dbg, const QBrush &b)
"TexturePattern" // 24
};
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QBrush(" << b.color() << ',' << BRUSH_STYLES[b.style()] << ')';
- return dbg.space();
+ return dbg;
}
#endif
@@ -1029,7 +1056,10 @@ QDataStream &operator<<(QDataStream &s, const QBrush &b)
s << style << b.color();
if (b.style() == Qt::TexturePattern) {
- s << b.texture();
+ if (s.version() >= QDataStream::Qt_5_5)
+ s << b.textureImage();
+ else
+ s << b.texture();
} else if (s.version() >= QDataStream::Qt_4_0 && gradient_style) {
const QGradient *gradient = b.gradient();
int type_as_int = int(gradient->type());
@@ -1089,10 +1119,17 @@ QDataStream &operator>>(QDataStream &s, QBrush &b)
QColor color;
s >> style;
s >> color;
+ b = QBrush(color);
if (style == Qt::TexturePattern) {
- QPixmap pm;
- s >> pm;
- b = QBrush(color, pm);
+ if (s.version() >= QDataStream::Qt_5_5) {
+ QImage img;
+ s >> img;
+ b.setTextureImage(qMove(img));
+ } else {
+ QPixmap pm;
+ s >> pm;
+ b.setTexture(qMove(pm));
+ }
} else if (style == Qt::LinearGradientPattern
|| style == Qt::RadialGradientPattern
|| style == Qt::ConicalGradientPattern) {
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index ff652fe288..a3b88a50ef 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -167,7 +167,6 @@ typedef QVector<QGradientStop> QGradientStops;
class Q_GUI_EXPORT QGradient
{
Q_GADGET
- Q_ENUMS(Type Spread CoordinateMode)
public:
enum Type {
LinearGradient,
@@ -175,18 +174,21 @@ public:
ConicalGradient,
NoGradient
};
+ Q_ENUM(Type)
enum Spread {
PadSpread,
ReflectSpread,
RepeatSpread
};
+ Q_ENUM(Spread)
enum CoordinateMode {
LogicalMode,
StretchToDeviceMode,
ObjectBoundingMode
};
+ Q_ENUM(CoordinateMode)
enum InterpolationMode {
ColorInterpolation,
@@ -235,7 +237,7 @@ private:
qreal cx, cy, angle;
} conical;
} m_data;
- void *dummy;
+ void *dummy; // ### Qt 6: replace with actual content (CoordinateMode, InterpolationMode, ...)
};
inline void QGradient::setSpread(Spread aspread)
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 77fa989351..a6b44cde15 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -38,7 +38,6 @@
#include "qvariant.h"
#include "qdebug.h"
-#include <math.h>
#include <stdio.h>
#include <limits.h>
@@ -506,16 +505,13 @@ QString QColor::name() const
QString QColor::name(NameFormat format) const
{
- QString s;
switch (format) {
case HexRgb:
- s.sprintf("#%02x%02x%02x", red(), green(), blue());
- break;
+ return QString::asprintf("#%02x%02x%02x", red(), green(), blue());
case HexArgb:
- s.sprintf("#%02x%02x%02x%02x", alpha(), red(), green(), blue());
- break;
+ return QString::asprintf("#%02x%02x%02x%02x", alpha(), red(), green(), blue());
}
- return s;
+ return QString();
}
/*!
@@ -2395,6 +2391,7 @@ void QColor::invalidate()
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QColor &c)
{
+ QDebugStateSaver saver(dbg);
if (!c.isValid())
dbg.nospace() << "QColor(Invalid)";
else if (c.spec() == QColor::Rgb)
@@ -2407,7 +2404,7 @@ QDebug operator<<(QDebug dbg, const QColor &c)
else if (c.spec() == QColor::Hsl)
dbg.nospace() << "QColor(AHSL " << c.alphaF() << ", " << c.hslHueF() << ", " << c.hslSaturationF() << ", " << c.lightnessF() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index b68504c865..06c218365b 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -65,7 +65,7 @@ public:
QColor(QRgb rgb);
QColor(const QString& name);
QColor(const char *name);
- QColor(const QColor &color);
+ QColor(const QColor &color); // ### Qt 6: remove, the trivial one is fine.
QColor(Spec spec);
bool isValid() const;
diff --git a/src/gui/painting/qcolor_p.cpp b/src/gui/painting/qcolor_p.cpp
index 882d08f402..4ebe74ce4f 100644
--- a/src/gui/painting/qcolor_p.cpp
+++ b/src/gui/painting/qcolor_p.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qcolor_p.h b/src/gui/painting/qcolor_p.h
index 137a3f56e9..d896022ac1 100644
--- a/src/gui/painting/qcolor_p.h
+++ b/src/gui/painting/qcolor_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index c416b9e044..8fb5f4fd3f 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -34,7 +34,6 @@
#include "qcosmeticstroker_p.h"
#include "private/qpainterpath_p.h"
#include <qdebug.h>
-#include <math.h>
QT_BEGIN_NAMESPACE
@@ -438,8 +437,9 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal
int y = (y1 + 32) >> 6;
int ys = (y2 + 32) >> 6;
+ int round = (xinc > 0) ? 32 : 0;
if (y != ys) {
- x += ( ((((y << 6) + 32 - y1))) * xinc ) >> 6;
+ x += ( ((((y << 6) + round - y1))) * xinc ) >> 6;
if (swapped) {
lastPixel.x = x >> 16;
@@ -469,8 +469,9 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal
int x = (x1 + 32) >> 6;
int xs = (x2 + 32) >> 6;
+ int round = (yinc > 0) ? 32 : 0;
if (x != xs) {
- y += ( ((((x << 6) + 32 - x1))) * yinc ) >> 6;
+ y += ( ((((x << 6) + round - x1))) * yinc ) >> 6;
if (swapped) {
lastPixel.x = x;
@@ -757,9 +758,10 @@ static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
int y = (y1 + 32) >> 6;
int ys = (y2 + 32) >> 6;
+ int round = (xinc > 0) ? 32 : 0;
if (y != ys) {
- x += ( ((((y << 6) + 32 - y1))) * xinc ) >> 6;
+ x += ( ((((y << 6) + round - y1))) * xinc ) >> 6;
// calculate first and last pixel and perform dropout control
QCosmeticStroker::Point first;
@@ -833,9 +835,10 @@ static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
int x = (x1 + 32) >> 6;
int xs = (x2 + 32) >> 6;
+ int round = (yinc > 0) ? 32 : 0;
if (x != xs) {
- y += ( ((((x << 6) + 32 - x1))) * yinc ) >> 6;
+ y += ( ((((x << 6) + round - x1))) * yinc ) >> 6;
// calculate first and last pixel to perform dropout control
QCosmeticStroker::Point first;
diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h
index d20b8a8e61..389163dac8 100644
--- a/src/gui/painting/qcosmeticstroker_p.h
+++ b/src/gui/painting/qcosmeticstroker_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qcssutil.cpp b/src/gui/painting/qcssutil.cpp
index dff258f138..e150b65920 100644
--- a/src/gui/painting/qcssutil.cpp
+++ b/src/gui/painting/qcssutil.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qcssutil_p.h b/src/gui/painting/qcssutil_p.h
index a2db1d07e4..fac6e55dda 100644
--- a/src/gui/painting/qcssutil_p.h
+++ b/src/gui/painting/qcssutil_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h
index c003a454e9..0a4a3d5c9e 100644
--- a/src/gui/painting/qdatabuffer_p.h
+++ b/src/gui/painting/qdatabuffer_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 9c1b2e707d..538389f15f 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,11 +45,11 @@
#include <private/qpaintengine_raster_p.h>
#include <private/qpainter_p.h>
#include <private/qdrawhelper_x86_p.h>
+#include <private/qdrawingprimitive_sse2_p.h>
#include <private/qdrawhelper_neon_p.h>
#if defined(QT_COMPILER_SUPPORTS_MIPS_DSP) || defined(QT_COMPILER_SUPPORTS_MIPS_DSPR2)
#include <private/qdrawhelper_mips_dsp_p.h>
#endif
-#include <private/qmath_p.h>
#include <private/qguiapplication_p.h>
#include <qmath.h>
@@ -69,8 +69,6 @@ enum {
// must be multiple of 4 for easier SIMD implementations
static const int buffer_size = 2048;
-#ifdef Q_COMPILER_CONSTEXPR
-
template<QImage::Format> Q_DECL_CONSTEXPR uint redWidth();
template<QImage::Format> Q_DECL_CONSTEXPR uint redShift();
template<QImage::Format> Q_DECL_CONSTEXPR uint greenWidth();
@@ -264,6 +262,29 @@ static const uint *QT_FASTCALL convertRGBFromRGB32(uint *buffer, const uint *src
}
template<QImage::Format Format>
+static const uint *QT_FASTCALL convertARGBPMFromRGB32(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ Q_CONSTEXPR uint alphaMask = ((1 << alphaWidth<Format>()) - 1);
+ Q_CONSTEXPR uint redMask = ((1 << redWidth<Format>()) - 1);
+ Q_CONSTEXPR uint greenMask = ((1 << greenWidth<Format>()) - 1);
+ Q_CONSTEXPR uint blueMask = ((1 << blueWidth<Format>()) - 1);
+
+ Q_CONSTEXPR uchar redRightShift = 24 - redWidth<Format>();
+ Q_CONSTEXPR uchar greenRightShift = 16 - greenWidth<Format>();
+ Q_CONSTEXPR uchar blueRightShift = 8 - blueWidth<Format>();
+
+ for (int i = 0; i < count; ++i) {
+ Q_CONSTEXPR uint alpha = (0xff & alphaMask) << alphaShift<Format>();
+ const uint red = ((src[i] >> redRightShift) & redMask) << redShift<Format>();
+ const uint green = ((src[i] >> greenRightShift) & greenMask) << greenShift<Format>();
+ const uint blue = ((src[i] >> blueRightShift) & blueMask) << blueShift<Format>();
+ buffer[i] = alpha | red | green | blue;
+ }
+ return buffer;
+}
+
+template<QImage::Format Format>
static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uint *src, int count,
const QPixelLayout *, const QRgb *)
{
@@ -287,6 +308,8 @@ static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uin
return buffer;
}
+#ifdef Q_COMPILER_CONSTEXPR
+
template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutRGB()
{
return QPixelLayout{
@@ -311,181 +334,10 @@ template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixe
true, bitsPerPixel<Format>(),
convertARGBPMToARGB32PM<Format>,
convertARGBPMFromARGB32PM<Format>,
- 0
+ convertARGBPMFromRGB32<Format>
};
}
-#else // CONSTEXPR
-
-static const uint *QT_FASTCALL convertToARGB32PM(uint *buffer, const uint *src, int count,
- const QPixelLayout *layout, const QRgb *)
-{
- Q_ASSERT(layout->redWidth >= 4);
- Q_ASSERT(layout->greenWidth >= 4);
- Q_ASSERT(layout->blueWidth >= 4);
- Q_ASSERT(layout->alphaWidth >= 4);
-
- const uint redMask = ((1 << layout->redWidth) - 1);
- const uint greenMask = ((1 << layout->greenWidth) - 1);
- const uint blueMask = ((1 << layout->blueWidth) - 1);
-
- const uchar redLeftShift = 8 - layout->redWidth;
- const uchar greenLeftShift = 8 - layout->greenWidth;
- const uchar blueLeftShift = 8 - layout->blueWidth;
-
- const uchar redRightShift = 2 * layout->redWidth - 8;
- const uchar greenRightShift = 2 * layout->greenWidth - 8;
- const uchar blueRightShift = 2 * layout->blueWidth - 8;
-
- const uint alphaMask = ((1 << layout->alphaWidth) - 1);
- const uchar alphaLeftShift = 8 - layout->alphaWidth;
- const uchar alphaRightShift = 2 * layout->alphaWidth - 8;
-
- if (layout->premultiplied) {
- for (int i = 0; i < count; ++i) {
- uint alpha = (src[i] >> layout->alphaShift) & alphaMask;
- uint red = (src[i] >> layout->redShift) & redMask;
- uint green = (src[i] >> layout->greenShift) & greenMask;
- uint blue = (src[i] >> layout->blueShift) & blueMask;
-
- alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift);
- red = qMin(alpha, (red << redLeftShift) | (red >> redRightShift));
- green = qMin(alpha, (green << greenLeftShift) | (green >> greenRightShift));
- blue = qMin(alpha, (blue << blueLeftShift) | (blue >> blueRightShift));
- buffer[i] = (alpha << 24) | (red << 16) | (green << 8) | blue;
- }
- } else {
- for (int i = 0; i < count; ++i) {
- uint alpha = (src[i] >> layout->alphaShift) & alphaMask;
- uint red = (src[i] >> layout->redShift) & redMask;
- uint green = (src[i] >> layout->greenShift) & greenMask;
- uint blue = (src[i] >> layout->blueShift) & blueMask;
-
- alpha = (alpha << alphaLeftShift) | (alpha >> alphaRightShift);
- red = (red << redLeftShift) | (red >> redRightShift);
- green = (green << greenLeftShift) | (green >> greenRightShift);
- blue = (blue << blueLeftShift) | (blue >> blueRightShift);
- buffer[i] = qPremultiply((alpha << 24) | (red << 16) | (green << 8) | blue);
- }
- }
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertToRGB32(uint *buffer, const uint *src, int count,
- const QPixelLayout *layout, const QRgb *)
-{
- Q_ASSERT(layout->redWidth >= 4);
- Q_ASSERT(layout->greenWidth >= 4);
- Q_ASSERT(layout->blueWidth >= 4);
- Q_ASSERT(layout->alphaWidth == 0);
-
- const uint redMask = ((1 << layout->redWidth) - 1);
- const uint greenMask = ((1 << layout->greenWidth) - 1);
- const uint blueMask = ((1 << layout->blueWidth) - 1);
-
- const uchar redLeftShift = 8 - layout->redWidth;
- const uchar greenLeftShift = 8 - layout->greenWidth;
- const uchar blueLeftShift = 8 - layout->blueWidth;
-
- const uchar redRightShift = 2 * layout->redWidth - 8;
- const uchar greenRightShift = 2 * layout->greenWidth - 8;
- const uchar blueRightShift = 2 * layout->blueWidth - 8;
-
- for (int i = 0; i < count; ++i) {
- uint red = (src[i] >> layout->redShift) & redMask;
- uint green = (src[i] >> layout->greenShift) & greenMask;
- uint blue = (src[i] >> layout->blueShift) & blueMask;
-
- red = (red << redLeftShift) | (red >> redRightShift);
- green = (green << greenLeftShift) | (green >> greenRightShift);
- blue = (blue << blueLeftShift) | (blue >> blueRightShift);
- buffer[i] = 0xff000000 | (red << 16) | (green << 8) | blue;
- }
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertFromARGB32PM(uint *buffer, const uint *src, int count,
- const QPixelLayout *layout, const QRgb *)
-{
- Q_ASSERT(layout->redWidth <= 8);
- Q_ASSERT(layout->greenWidth <= 8);
- Q_ASSERT(layout->blueWidth <= 8);
- Q_ASSERT(layout->alphaWidth <= 8);
-
- const uint redMask = (1 << layout->redWidth) - 1;
- const uint greenMask = (1 << layout->greenWidth) - 1;
- const uint blueMask = (1 << layout->blueWidth) - 1;
- const uint alphaMask = (1 << layout->alphaWidth) - 1;
-
- const uchar redRightShift = 24 - layout->redWidth;
- const uchar greenRightShift = 16 - layout->greenWidth;
- const uchar blueRightShift = 8 - layout->blueWidth;
- const uchar alphaRightShift = 32 - layout->alphaWidth;
-
- if (!layout->premultiplied) {
- for (int i = 0; i < count; ++i)
- buffer[i] = qUnpremultiply(src[i]);
- src = buffer;
- }
- for (int i = 0; i < count; ++i) {
- uint red = ((src[i] >> redRightShift) & redMask) << layout->redShift;
- uint green = ((src[i] >> greenRightShift) & greenMask) << layout->greenShift;
- uint blue = ((src[i] >> blueRightShift) & blueMask) << layout->blueShift;
- uint alpha = ((src[i] >> alphaRightShift) & alphaMask) << layout->alphaShift;
- buffer[i] = red | green | blue | alpha;
- }
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertFromRGB32(uint *buffer, const uint *src, int count,
- const QPixelLayout *layout, const QRgb *)
-{
- Q_ASSERT(layout->redWidth <= 8);
- Q_ASSERT(layout->greenWidth <= 8);
- Q_ASSERT(layout->blueWidth <= 8);
- Q_ASSERT(layout->alphaWidth == 0);
- Q_ASSERT(!layout->premultiplied);
-
- const uint redMask = (1 << layout->redWidth) - 1;
- const uint greenMask = (1 << layout->greenWidth) - 1;
- const uint blueMask = (1 << layout->blueWidth) - 1;
-
- const uchar redRightShift = 24 - layout->redWidth;
- const uchar greenRightShift = 16 - layout->greenWidth;
- const uchar blueRightShift = 8 - layout->blueWidth;
-
- for (int i = 0; i < count; ++i) {
- uint red = ((src[i] >> redRightShift) & redMask) << layout->redShift;
- uint green = ((src[i] >> greenRightShift) & greenMask) << layout->greenShift;
- uint blue = ((src[i] >> blueRightShift) & blueMask) << layout->blueShift;
- buffer[i] = red | green | blue;
- }
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertRGB16ToRGB32(uint *buffer, const uint *src, int count,
- const QPixelLayout *, const QRgb *)
-{
- for (int i = 0; i < count; ++i)
- buffer[i] = qConvertRgb16To32(src[i]);
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertRGB16FromRGB32(uint *buffer, const uint *src, int count,
- const QPixelLayout *, const QRgb *)
-{
- for (int i = 0; i < count; ++i)
- buffer[i] = qConvertRgb32To16(src[i]);
- return buffer;
-}
-
-static const uint *QT_FASTCALL convertRGB16FromARGB32PM(uint *buffer, const uint *src, int count,
- const QPixelLayout *, const QRgb *)
-{
- for (int i = 0; i < count; ++i)
- buffer[i] = qConvertRgb32To16(qUnpremultiply(src[i]));
- return buffer;
-}
#endif
// To convert in place, let 'dest' and 'src' be the same.
@@ -506,9 +358,7 @@ static const uint *QT_FASTCALL convertPassThrough(uint *, const uint *src, int,
static const uint *QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count,
const QPixelLayout *, const QRgb *)
{
- for (int i = 0; i < count; ++i)
- buffer[i] = qPremultiply(src[i]);
- return buffer;
+ return qt_convertARGB32ToARGB32PM(buffer, src, count);
}
static const uint *QT_FASTCALL convertRGBA8888PMToARGB32PM(uint *buffer, const uint *src, int count,
@@ -520,10 +370,24 @@ static const uint *QT_FASTCALL convertRGBA8888PMToARGB32PM(uint *buffer, const u
}
static const uint *QT_FASTCALL convertRGBA8888ToARGB32PM(uint *buffer, const uint *src, int count,
- const QPixelLayout *, const QRgb *)
+ const QPixelLayout *, const QRgb *)
+{
+ return qt_convertRGBA8888ToARGB32PM(buffer, src, count);
+}
+
+static const uint *QT_FASTCALL convertAlpha8ToRGB32(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
{
for (int i = 0; i < count; ++i)
- buffer[i] = qPremultiply(RGBA2ARGB(src[i]));
+ buffer[i] = qRgba(0, 0, 0, src[i]);
+ return buffer;
+}
+
+static const uint *QT_FASTCALL convertGrayscale8ToRGB32(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qRgb(src[i], src[i], src[i]);
return buffer;
}
@@ -603,6 +467,30 @@ static const uint *QT_FASTCALL convertRGB30FromARGB32PM(uint *buffer, const uint
return buffer;
}
+static const uint *QT_FASTCALL convertAlpha8FromARGB32PM(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qAlpha(src[i]);
+ return buffer;
+}
+
+static const uint *QT_FASTCALL convertGrayscale8FromRGB32(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qGray(src[i]);
+ return buffer;
+}
+
+static const uint *QT_FASTCALL convertGrayscale8FromARGB32PM(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qGray(qUnpremultiply(src[i]));
+ return buffer;
+}
+
template <QPixelLayout::BPP bpp> static
uint QT_FASTCALL fetchPixel(const uchar *src, int index);
@@ -718,10 +606,10 @@ QPixelLayout qPixelLayouts[QImage::NImageFormats] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP1LSB, convertIndexedToARGB32PM, 0, 0 }, // Format_MonoLSB
{ 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertIndexedToARGB32PM, 0, 0 }, // Format_Indexed8
// Technically using convertPassThrough to convert from ARGB32PM to RGB32 is wrong,
- // but everywhere this generic conversion would be wrong is currently overloaed.
+ // but everywhere this generic conversion would be wrong is currently overloaded.
{ 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP32, convertPassThrough, convertPassThrough, convertPassThrough }, // Format_RGB32
- { 8, 16, 8, 8, 8, 0, 8, 24, false, QPixelLayout::BPP32, convertARGB32ToARGB32PM, convertARGB32FromARGB32PM, 0 }, // Format_ARGB32
- { 8, 16, 8, 8, 8, 0, 8, 24, true, QPixelLayout::BPP32, convertPassThrough, convertPassThrough, 0 }, // Format_ARGB32_Premultiplied
+ { 8, 16, 8, 8, 8, 0, 8, 24, false, QPixelLayout::BPP32, convertARGB32ToARGB32PM, convertARGB32FromARGB32PM, convertPassThrough }, // Format_ARGB32
+ { 8, 16, 8, 8, 8, 0, 8, 24, true, QPixelLayout::BPP32, convertPassThrough, convertPassThrough, convertPassThrough }, // Format_ARGB32_Premultiplied
#ifdef Q_COMPILER_CONSTEXPR
pixelLayoutRGB<QImage::Format_RGB16>(),
pixelLayoutARGBPM<QImage::Format_ARGB8565_Premultiplied>(),
@@ -733,29 +621,58 @@ QPixelLayout qPixelLayouts[QImage::NImageFormats] = {
pixelLayoutRGB<QImage::Format_RGB444>(),
pixelLayoutARGBPM<QImage::Format_ARGB4444_Premultiplied>(),
#else
- { 5, 11, 6, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertRGB16ToRGB32, convertRGB16FromARGB32PM, convertRGB16FromRGB32 }, // Format_RGB16
- { 5, 19, 6, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM, 0 }, // Format_ARGB8565_Premultiplied
- { 6, 12, 6, 6, 6, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM, convertFromRGB32 }, // Format_RGB666
- { 6, 12, 6, 6, 6, 0, 6, 18, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM, 0 }, // Format_ARGB6666_Premultiplied
- { 5, 10, 5, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM, convertFromRGB32 }, // Format_RGB555
- { 5, 18, 5, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24, convertToARGB32PM, convertFromARGB32PM, 0 }, // Format_ARGB8555_Premultiplied
- { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP24, convertToRGB32, convertFromARGB32PM, convertFromRGB32 }, // Format_RGB888
- { 4, 8, 4, 4, 4, 0, 0, 0, false, QPixelLayout::BPP16, convertToRGB32, convertFromARGB32PM, convertFromRGB32 }, // Format_RGB444
- { 4, 8, 4, 4, 4, 0, 4, 12, true, QPixelLayout::BPP16, convertToARGB32PM, convertFromARGB32PM, 0 }, // Format_ARGB4444_Premultiplied
+ { 5, 11, 6, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16,
+ convertToRGB32<QImage::Format_RGB16>,
+ convertRGBFromARGB32PM<QImage::Format_RGB16>,
+ convertRGBFromRGB32<QImage::Format_RGB16>},
+ { 5, 19, 6, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24,
+ convertARGBPMToARGB32PM<QImage::Format_ARGB8565_Premultiplied>,
+ convertARGBPMFromARGB32PM<QImage::Format_ARGB8565_Premultiplied>,
+ convertARGBPMFromRGB32<QImage::Format_ARGB8565_Premultiplied>},
+ { 6, 12, 6, 6, 6, 0, 0, 0, false, QPixelLayout::BPP24,
+ convertToRGB32<QImage::Format_RGB666>,
+ convertRGBFromARGB32PM<QImage::Format_RGB666>,
+ convertRGBFromRGB32<QImage::Format_RGB666>},
+ { 6, 12, 6, 6, 6, 0, 6, 18, true, QPixelLayout::BPP24,
+ convertARGBPMToARGB32PM<QImage::Format_ARGB6666_Premultiplied>,
+ convertARGBPMFromARGB32PM<QImage::Format_ARGB6666_Premultiplied>,
+ convertARGBPMFromRGB32<QImage::Format_ARGB6666_Premultiplied>},
+ { 5, 10, 5, 5, 5, 0, 0, 0, false, QPixelLayout::BPP16,
+ convertToRGB32<QImage::Format_RGB555>,
+ convertRGBFromARGB32PM<QImage::Format_RGB555>,
+ convertRGBFromRGB32<QImage::Format_RGB555> },
+ { 5, 18, 5, 13, 5, 8, 8, 0, true, QPixelLayout::BPP24,
+ convertARGBPMToARGB32PM<QImage::Format_ARGB8555_Premultiplied>,
+ convertARGBPMFromARGB32PM<QImage::Format_ARGB8555_Premultiplied>,
+ convertARGBPMFromRGB32<QImage::Format_ARGB8555_Premultiplied>},
+ { 8, 16, 8, 8, 8, 0, 0, 0, false, QPixelLayout::BPP24,
+ convertToRGB32<QImage::Format_RGB888>,
+ convertRGBFromARGB32PM<QImage::Format_RGB888>,
+ convertRGBFromRGB32<QImage::Format_RGB888>},
+ { 4, 8, 4, 4, 4, 0, 0, 0, false, QPixelLayout::BPP16,
+ convertToRGB32<QImage::Format_RGB444>,
+ convertRGBFromARGB32PM<QImage::Format_RGB444>,
+ convertRGBFromRGB32<QImage::Format_RGB444>},
+ { 4, 8, 4, 4, 4, 0, 4, 12, true, QPixelLayout::BPP16,
+ convertARGBPMToARGB32PM<QImage::Format_ARGB4444_Premultiplied>,
+ convertARGBPMFromARGB32PM<QImage::Format_ARGB4444_Premultiplied>,
+ convertARGBPMFromRGB32<QImage::Format_ARGB4444_Premultiplied>},
#endif
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
{ 8, 24, 8, 16, 8, 8, 0, 0, false, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBXFromARGB32PM, convertRGBXFromRGB32 }, // Format_RGBX8888
- { 8, 24, 8, 16, 8, 8, 8, 0, false, QPixelLayout::BPP32, convertRGBA8888ToARGB32PM, convertRGBA8888FromARGB32PM, 0 }, // Format_RGBA8888
- { 8, 24, 8, 16, 8, 8, 8, 0, true, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBA8888PMFromARGB32PM, 0 }, // Format_RGBA8888_Premultiplied
+ { 8, 24, 8, 16, 8, 8, 8, 0, false, QPixelLayout::BPP32, convertRGBA8888ToARGB32PM, convertRGBA8888FromARGB32PM, convertRGBXFromRGB32 }, // Format_RGBA8888
+ { 8, 24, 8, 16, 8, 8, 8, 0, true, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBA8888PMFromARGB32PM, convertRGBXFromRGB32}, // Format_RGBA8888_Premultiplied
#else
{ 8, 0, 8, 8, 8, 16, 0, 24, false, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBXFromARGB32PM, convertRGBXFromRGB32 }, // Format_RGBX8888
- { 8, 0, 8, 8, 8, 16, 8, 24, false, QPixelLayout::BPP32, convertRGBA8888ToARGB32PM, convertRGBA8888FromARGB32PM, 0 }, // Format_RGBA8888 (ABGR32)
- { 8, 0, 8, 8, 8, 16, 8, 24, true, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBA8888PMFromARGB32PM, 0 }, // Format_RGBA8888_Premultiplied
+ { 8, 0, 8, 8, 8, 16, 8, 24, false, QPixelLayout::BPP32, convertRGBA8888ToARGB32PM, convertRGBA8888FromARGB32PM, convertRGBXFromRGB32 }, // Format_RGBA8888 (ABGR32)
+ { 8, 0, 8, 8, 8, 16, 8, 24, true, QPixelLayout::BPP32, convertRGBA8888PMToARGB32PM, convertRGBA8888PMFromARGB32PM, convertRGBXFromRGB32 }, // Format_RGBA8888_Premultiplied
#endif
{ 10, 20, 10, 10, 10, 0, 0, 30, false, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderBGR>, convertRGB30FromARGB32PM<PixelOrderBGR>, convertRGB30FromRGB32<PixelOrderBGR> }, // Format_BGR30
- { 10, 20, 10, 10, 10, 0, 2, 30, true, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderBGR>, convertA2RGB30PMFromARGB32PM<PixelOrderBGR>, 0 }, // Format_A2BGR30_Premultiplied
+ { 10, 20, 10, 10, 10, 0, 2, 30, true, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderBGR>, convertA2RGB30PMFromARGB32PM<PixelOrderBGR>, convertRGB30FromRGB32<PixelOrderBGR> }, // Format_A2BGR30_Premultiplied
{ 10, 0, 10, 10, 10, 20, 0, 30, false, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderRGB>, convertRGB30FromARGB32PM<PixelOrderRGB>, convertRGB30FromRGB32<PixelOrderRGB> }, // Format_RGB30
- { 10, 0, 10, 10, 10, 20, 2, 30, true, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderRGB>, convertA2RGB30PMFromARGB32PM<PixelOrderRGB>, 0 }, // Format_A2RGB30_Premultiplied
+ { 10, 0, 10, 10, 10, 20, 2, 30, true, QPixelLayout::BPP32, convertA2RGB30PMToARGB32PM<PixelOrderRGB>, convertA2RGB30PMFromARGB32PM<PixelOrderRGB>, convertRGB30FromRGB32<PixelOrderRGB> }, // Format_A2RGB30_Premultiplied
+ { 0, 0, 0, 0, 0, 0, 8, 0, false, QPixelLayout::BPP8, convertAlpha8ToRGB32, convertAlpha8FromARGB32PM, 0 }, // Format_Alpha8
+ { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertGrayscale8ToRGB32, convertGrayscale8FromARGB32PM, convertGrayscale8FromRGB32 } // Format_Grayscale8
};
FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = {
@@ -867,6 +784,8 @@ static DestFetchProc destFetchProc[QImage::NImageFormats] =
destFetch, // Format_A2BGR30_Premultiplied
destFetch, // Format_RGB30
destFetch, // Format_A2RGB30_Premultiplied
+ destFetch, // Format_Alpha8
+ destFetch, // Format_Grayscale8
};
/*
@@ -974,10 +893,9 @@ static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, con
while (length) {
int l = qMin(length, buffer_size);
const uint *ptr = 0;
- if (layout->convertFromRGB32) {
- Q_ASSERT(!layout->premultiplied && !layout->alphaWidth);
+ if (!layout->premultiplied && !layout->alphaWidth)
ptr = layout->convertFromRGB32(buf, buffer, l, layout, 0);
- } else
+ else
ptr = layout->convertFromARGB32PM(buf, buffer, l, layout, 0);
store(dest, ptr, x, l);
length -= l;
@@ -1011,6 +929,8 @@ static DestStoreProc destStoreProc[QImage::NImageFormats] =
destStore, // Format_A2BGR30_Premultiplied
destStore, // Format_RGB30
destStore, // Format_A2RGB30_Premultiplied
+ destStore, // Format_Alpha8
+ destStore, // Format_Grayscale8
};
/*
@@ -1475,7 +1395,7 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
lim -= 3;
for (; f < lim; x += 4, f += 4) {
// Load 4 pixels from s1, and split the alpha-green and red-blue component
- __m128i top = _mm_loadu_si128((__m128i*)((const uint *)(s1)+x));
+ __m128i top = _mm_loadu_si128((const __m128i*)((const uint *)(s1)+x));
__m128i topAG = _mm_srli_epi16(top, 8);
__m128i topRB = _mm_and_si128(top, colorMask);
// Multiplies each colour component by idisty
@@ -1483,7 +1403,7 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
topRB = _mm_mullo_epi16 (topRB, idisty_);
// Same for the s2 vector
- __m128i bottom = _mm_loadu_si128((__m128i*)((const uint *)(s2)+x));
+ __m128i bottom = _mm_loadu_si128((const __m128i*)((const uint *)(s2)+x));
__m128i bottomAG = _mm_srli_epi16(bottom, 8);
__m128i bottomRB = _mm_and_si128(bottom, colorMask);
bottomAG = _mm_mullo_epi16 (bottomAG, disty_);
@@ -1560,7 +1480,7 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
b++;
fx += fdx;
}
- } else if ((fdx < 0 && fdx > -(fixed_scale / 8)) || fabs(data->m22) < (1./8.)) { // scale up more than 8x
+ } else if ((fdx < 0 && fdx > -(fixed_scale / 8)) || std::abs(data->m22) < (1./8.)) { // scale up more than 8x
int y1 = (fy >> 16);
int y2;
fetchTransformedBilinear_pixelBounds<blendType>(image_height, image_y1, image_y2, y1, y2);
@@ -1719,7 +1639,7 @@ static const uint * QT_FASTCALL fetchTransformedBilinearARGB32PM(uint *buffer, c
}
}
} else { //rotation
- if (fabs(data->m11) > 8 || fabs(data->m22) > 8) {
+ if (std::abs(data->m11) > 8 || std::abs(data->m22) > 8) {
//if we are zooming more than 8 times, we use 8bit precision for the position.
while (b < end) {
int x1 = (fx >> 16);
@@ -2072,7 +1992,7 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut);
layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut);
- if ((fdx < 0 && fdx > -(fixed_scale / 8)) || fabs(data->m22) < (1./8.)) { // scale up more than 8x
+ if ((fdx < 0 && fdx > -(fixed_scale / 8)) || std::abs(data->m22) < (1./8.)) { // scale up more than 8x
int disty = (fy & 0x0000ffff) >> 8;
for (int i = 0; i < len; ++i) {
uint tl = buf1[i * 2 + 0];
@@ -2131,7 +2051,7 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
layout->convertToARGB32PM(buf1, buf1, len * 2, layout, clut);
layout->convertToARGB32PM(buf2, buf2, len * 2, layout, clut);
- if (fabs(data->m11) > 8 || fabs(data->m22) > 8) {
+ if (std::abs(data->m11) > 8 || std::abs(data->m22) > 8) {
//if we are zooming more than 8 times, we use 8bit precision for the position.
for (int i = 0; i < len; ++i) {
uint tl = buf1[i * 2 + 0];
@@ -2266,6 +2186,8 @@ static SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = {
fetchUntransformed, // Format_A2BGR30_Premultiplied
fetchUntransformed, // Format_RGB30
fetchUntransformed, // Format_A2RGB30_Premultiplied
+ fetchUntransformed, // Alpha8
+ fetchUntransformed, // Grayscale8
},
// Tiled
{
@@ -2291,7 +2213,9 @@ static SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = {
fetchUntransformed, // BGR30
fetchUntransformed, // A2BGR30_Premultiplied
fetchUntransformed, // RGB30
- fetchUntransformed // A2RGB30_Premultiplied
+ fetchUntransformed, // A2RGB30_Premultiplied
+ fetchUntransformed, // Alpha8
+ fetchUntransformed, // Grayscale8
},
// Transformed
{
@@ -2318,6 +2242,8 @@ static SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = {
fetchTransformed<BlendTransformed>, // A2BGR30_Premultiplied
fetchTransformed<BlendTransformed>, // RGB30
fetchTransformed<BlendTransformed>, // A2RGB30_Premultiplied
+ fetchTransformed<BlendTransformed>, // Alpah8
+ fetchTransformed<BlendTransformed>, // Grayscale8
},
{
0, // TransformedTiled
@@ -2343,6 +2269,8 @@ static SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = {
fetchTransformed<BlendTransformedTiled>, // A2BGR30_Premultiplied
fetchTransformed<BlendTransformedTiled>, // RGB30
fetchTransformed<BlendTransformedTiled>, // A2RGB30_Premultiplied
+ fetchTransformed<BlendTransformedTiled>, // Alpha8
+ fetchTransformed<BlendTransformedTiled>, // Grayscale8
},
{
0, // Bilinear
@@ -2368,6 +2296,8 @@ static SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = {
fetchTransformedBilinear<BlendTransformedBilinear>, // A2BGR30_Premultiplied
fetchTransformedBilinear<BlendTransformedBilinear>, // RGB30
fetchTransformedBilinear<BlendTransformedBilinear>, // A2RGB30_Premultiplied
+ fetchTransformedBilinear<BlendTransformedBilinear>, // Alpha8
+ fetchTransformedBilinear<BlendTransformedBilinear>, // Grayscale8
},
{
0, // BilinearTiled
@@ -2392,7 +2322,9 @@ static SourceFetchProc sourceFetch[NBlendTypes][QImage::NImageFormats] = {
fetchTransformedBilinear<BlendTransformedBilinearTiled>, // BGR30
fetchTransformedBilinear<BlendTransformedBilinearTiled>, // A2BGR30_Premultiplied
fetchTransformedBilinear<BlendTransformedBilinearTiled>, // RGB30
- fetchTransformedBilinear<BlendTransformedBilinearTiled> // A2RGB30_Premultiplied
+ fetchTransformedBilinear<BlendTransformedBilinearTiled>, // A2RGB30_Premultiplied
+ fetchTransformedBilinear<BlendTransformedBilinearTiled>, // Alpha8
+ fetchTransformedBilinear<BlendTransformedBilinearTiled>, // Grayscale8
},
};
@@ -2553,6 +2485,8 @@ static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Op
+ data->dy + data->m12 * (x + qreal(0.5));
bool affine = !data->m13 && !data->m23;
+ const qreal inv2pi = M_1_PI / 2.0;
+
const uint *end = buffer + length;
if (affine) {
rx -= data->gradient.conical.center.x;
@@ -2560,7 +2494,7 @@ static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Op
while (buffer < end) {
qreal angle = qAtan2(ry, rx) + data->gradient.conical.angle;
- *buffer = qt_gradient_pixel(&data->gradient, 1 - angle / (2*Q_PI));
+ *buffer = qt_gradient_pixel(&data->gradient, 1 - angle * inv2pi);
rx += data->m11;
ry += data->m12;
@@ -2576,7 +2510,7 @@ static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Op
rx/rw - data->gradient.conical.center.y)
+ data->gradient.conical.angle;
- *buffer = qt_gradient_pixel(&data->gradient, 1. - angle / (2*Q_PI));
+ *buffer = qt_gradient_pixel(&data->gradient, 1 - angle * inv2pi);
rx += data->m11;
ry += data->m12;
@@ -2590,32 +2524,10 @@ static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Op
return b;
}
-#if defined(Q_CC_RVCT)
-// Force ARM code generation for comp_func_* -methods
-# pragma push
-# pragma arm
-# if defined(Q_PROCESSOR_ARM_V6)
-static __forceinline void preload(const uint *start)
-{
- asm( "pld [start]" );
-}
-static const uint L2CacheLineLength = 32;
-static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint);
-# define PRELOAD_INIT(x) preload(x);
-# define PRELOAD_INIT2(x,y) PRELOAD_INIT(x) PRELOAD_INIT(y)
-# define PRELOAD_COND(x) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts);
-// Two consecutive preloads stall, so space them out a bit by using different modulus.
-# define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \
- if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts);
-# endif // Q_PROCESSOR_ARM_V6
-#endif // Q_CC_RVCT
-
-#if !defined(Q_CC_RVCT) || !defined(Q_PROCESSOR_ARM_V6)
# define PRELOAD_INIT(x)
# define PRELOAD_INIT2(x,y)
# define PRELOAD_COND(x)
# define PRELOAD_COND2(x,y)
-#endif
/* The constant alpha factor describes an alpha factor that gets applied
to the result of the composition operation combining it with the destination.
@@ -3770,11 +3682,7 @@ static inline int soft_light_op(int dst, int src, int da, int sa)
else if (4 * dst <= da)
return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025;
else {
-# ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2
- return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025;
-# else
return (dst * sa * 255 + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025;
-# endif
}
}
@@ -3982,11 +3890,6 @@ void QT_FASTCALL comp_func_Exclusion(uint *Q_DECL_RESTRICT dest, const uint *Q_D
comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha));
}
-#if defined(Q_CC_RVCT)
-// Restore pragma state from previous #pragma arm
-# pragma pop
-#endif
-
void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest,
int length,
uint color,
@@ -4779,7 +4682,7 @@ static void blend_untransformed_argb(int count, const QSpan *spans, void *userDa
length = image_width - sx;
if (length > 0) {
const int coverage = (spans->coverage * data->texture.const_alpha) >> 8;
- const uint *src = (uint *)data->texture.scanLine(sy) + sx;
+ const uint *src = (const uint *)data->texture.scanLine(sy) + sx;
uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x;
op.func(dest, src, length, coverage);
}
@@ -4878,7 +4781,7 @@ static void blend_untransformed_rgb565(int count, const QSpan *spans, void *user
length = image_width - sx;
if (length > 0) {
quint16 *dest = (quint16 *)data->rasterBuffer->scanLine(spans->y) + x;
- const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx;
+ const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
if (coverage == 255) {
memcpy(dest, src, length * sizeof(quint16));
} else {
@@ -4977,7 +4880,7 @@ static void blend_tiled_argb(int count, const QSpan *spans, void *userData)
int l = qMin(image_width - sx, length);
if (buffer_size < l)
l = buffer_size;
- const uint *src = (uint *)data->texture.scanLine(sy) + sx;
+ const uint *src = (const uint *)data->texture.scanLine(sy) + sx;
uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x;
op.func(dest, src, l, coverage);
x += l;
@@ -5036,7 +4939,7 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
if (buffer_size < l)
l = buffer_size;
quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + tx;
- const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx;
+ const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
memcpy(dest, src, l * sizeof(quint16));
length -= l;
tx += l;
@@ -5070,7 +4973,7 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
if (buffer_size < l)
l = buffer_size;
quint16 *dest = ((quint16 *)data->rasterBuffer->scanLine(spans->y)) + x;
- const quint16 *src = (quint16 *)data->texture.scanLine(sy) + sx;
+ const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha);
x += l;
length -= l;
@@ -5146,8 +5049,8 @@ static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, voi
fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2);
fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2);
- const quint16 *src1 = (quint16*)data->texture.scanLine(y1);
- const quint16 *src2 = (quint16*)data->texture.scanLine(y2);
+ const quint16 *src1 = (const quint16*)data->texture.scanLine(y1);
+ const quint16 *src2 = (const quint16*)data->texture.scanLine(y2);
quint16 tl = src1[x1];
const quint16 tr = src1[x2];
quint16 bl = src2[x1];
@@ -5233,8 +5136,8 @@ static void blend_transformed_bilinear_rgb565(int count, const QSpan *spans, voi
fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_minx, src_maxx, x1, x2);
fetchTransformedBilinear_pixelBounds<BlendTransformedBilinear>(0, src_miny, src_maxy, y1, y2);
- const quint16 *src1 = (quint16 *)data->texture.scanLine(y1);
- const quint16 *src2 = (quint16 *)data->texture.scanLine(y2);
+ const quint16 *src1 = (const quint16 *)data->texture.scanLine(y1);
+ const quint16 *src2 = (const quint16 *)data->texture.scanLine(y2);
quint16 tl = src1[x1];
const quint16 tr = src1[x2];
quint16 bl = src2[x1];
@@ -5430,7 +5333,7 @@ static void blend_transformed_rgb565(int count, const QSpan *spans, void *userDa
const int px = qBound(0, x >> 16, image_width - 1);
const int py = qBound(0, y >> 16, image_height - 1);
- *b = ((quint16 *)data->texture.scanLine(py))[px];
+ *b = ((const quint16 *)data->texture.scanLine(py))[px];
++b;
x += fdx;
@@ -5489,7 +5392,7 @@ static void blend_transformed_rgb565(int count, const QSpan *spans, void *userDa
const int px = qBound(0, int(tx) - (tx < 0), image_width - 1);
const int py = qBound(0, int(ty) - (ty < 0), image_height - 1);
- *b = ((quint16 *)data->texture.scanLine(py))[px];
+ *b = ((const quint16 *)data->texture.scanLine(py))[px];
++b;
x += fdx;
@@ -5533,7 +5436,7 @@ static void blend_transformed_tiled_argb(int count, const QSpan *spans, void *us
void *t = data->rasterBuffer->scanLine(spans->y);
uint *target = ((uint *)t) + spans->x;
- uint *image_bits = (uint *)data->texture.imageData;
+ const uint *image_bits = (const uint *)data->texture.imageData;
const qreal cx = spans->x + qreal(0.5);
const qreal cy = spans->y + qreal(0.5);
@@ -5588,7 +5491,7 @@ static void blend_transformed_tiled_argb(int count, const QSpan *spans, void *us
void *t = data->rasterBuffer->scanLine(spans->y);
uint *target = ((uint *)t) + spans->x;
- uint *image_bits = (uint *)data->texture.imageData;
+ const uint *image_bits = (const uint *)data->texture.imageData;
const qreal cx = spans->x + qreal(0.5);
const qreal cy = spans->y + qreal(0.5);
@@ -5699,7 +5602,7 @@ static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *
if (py < 0)
py += image_height;
- *b = ((quint16 *)data->texture.scanLine(py))[px];
+ *b = ((const quint16 *)data->texture.scanLine(py))[px];
++b;
x += fdx;
@@ -5765,7 +5668,7 @@ static void blend_transformed_tiled_rgb565(int count, const QSpan *spans, void *
if (py < 0)
py += image_height;
- *b = ((quint16 *)data->texture.scanLine(py))[px];
+ *b = ((const quint16 *)data->texture.scanLine(py))[px];
++b;
x += fdx;
@@ -5815,6 +5718,8 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
blend_untransformed_generic,
blend_untransformed_generic,
blend_untransformed_generic,
+ blend_untransformed_generic,
+ blend_untransformed_generic,
},
// Tiled
{
@@ -5841,6 +5746,8 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
blend_tiled_generic,
blend_tiled_generic,
blend_tiled_generic,
+ blend_tiled_generic,
+ blend_tiled_generic,
},
// Transformed
{
@@ -5867,6 +5774,8 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
blend_src_generic,
blend_src_generic,
blend_src_generic,
+ blend_src_generic,
+ blend_src_generic,
},
// TransformedTiled
{
@@ -5892,6 +5801,7 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
blend_src_generic,
blend_src_generic,
blend_src_generic,
+ blend_src_generic,
blend_src_generic
},
// Bilinear
@@ -5919,6 +5829,8 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
blend_src_generic,
blend_src_generic,
blend_src_generic,
+ blend_src_generic,
+ blend_src_generic,
},
// BilinearTiled
{
@@ -5945,6 +5857,8 @@ static const ProcessSpans processTextureSpans[NBlendTypes][QImage::NImageFormats
blend_src_generic, // A2BGR30_Premultiplied
blend_src_generic, // RGB30
blend_src_generic, // A2RGB30_Premultiplied
+ blend_src_generic, // Alpha8
+ blend_src_generic, // Grayscale8
}
};
@@ -6468,6 +6382,22 @@ static void qt_rectfill_nonpremul_rgba(QRasterBuffer *rasterBuffer,
ARGB2RGBA(qUnpremultiply(color)), x, y, width, height, rasterBuffer->bytesPerLine());
}
+static void qt_rectfill_alpha(QRasterBuffer *rasterBuffer,
+ int x, int y, int width, int height,
+ quint32 color)
+{
+ qt_rectfill<quint8>(reinterpret_cast<quint8 *>(rasterBuffer->buffer()),
+ qAlpha(color), x, y, width, height, rasterBuffer->bytesPerLine());
+}
+
+static void qt_rectfill_gray(QRasterBuffer *rasterBuffer,
+ int x, int y, int width, int height,
+ quint32 color)
+{
+ qt_rectfill<quint8>(reinterpret_cast<quint8 *>(rasterBuffer->buffer()),
+ qGray(color), x, y, width, height, rasterBuffer->bytesPerLine());
+}
+
// Map table for destination image format. Contains function pointers
// for blends of various types unto the destination
@@ -6652,6 +6582,20 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
0,
0
},
+ // Format_Alpha8
+ {
+ blend_color_generic,
+ blend_src_generic,
+ 0, 0, 0,
+ qt_rectfill_alpha
+ },
+ // Format_Grayscale8
+ {
+ blend_color_generic,
+ blend_src_generic,
+ 0, 0, 0,
+ qt_rectfill_gray
+ },
};
#if defined(Q_CC_MSVC) && !defined(_MIPS_)
@@ -6790,6 +6734,32 @@ void qInitDrawhelperAsm()
}
#endif // SSSE3
+#if QT_COMPILER_SUPPORTS_SSE4_1
+ if (qCpuHasFeature(SSE4_1)) {
+#if !defined(__SSE4_1__)
+ extern const uint *QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ extern const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_sse4;
+#endif
+ extern const uint *QT_FASTCALL convertARGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ extern const uint *QT_FASTCALL convertRGBA8888FromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ extern const uint *QT_FASTCALL convertRGBXFromARGB32PM_sse4(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ qPixelLayouts[QImage::Format_ARGB32].convertFromARGB32PM = convertARGB32FromARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_RGBA8888].convertFromARGB32PM = convertRGBA8888FromARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_RGBX8888].convertFromARGB32PM = convertRGBXFromARGB32PM_sse4;
+ }
+#endif
+
+#if QT_COMPILER_SUPPORTS_AVX2 && !defined(__AVX2__)
+ if (qCpuHasFeature(AVX2)) {
+ extern const uint *QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ extern const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, const uint *src, int count, const QPixelLayout *, const QRgb *);
+ qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_avx2;
+ qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_avx2;
+ }
+#endif
+
functionForModeAsm = qt_functionForMode_SSE2;
functionForModeSolidAsm = qt_functionForModeSolid_SSE2;
#endif // SSE2
diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp
new file mode 100644
index 0000000000..5716be682b
--- /dev/null
+++ b/src/gui/painting/qdrawhelper_avx2.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <private/qdrawhelper_p.h>
+
+#if defined(QT_COMPILER_SUPPORTS_AVX2)
+
+QT_BEGIN_NAMESPACE
+
+const uint *QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ return qt_convertARGB32ToARGB32PM(buffer, src, count);
+}
+
+const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ return qt_convertRGBA8888ToARGB32PM(buffer, src, count);
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/painting/qdrawhelper_mips_dsp.cpp b/src/gui/painting/qdrawhelper_mips_dsp.cpp
index 764e7763a8..721b228395 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp.cpp
+++ b/src/gui/painting/qdrawhelper_mips_dsp.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdrawhelper_mips_dsp_asm.S b/src/gui/painting/qdrawhelper_mips_dsp_asm.S
index 26b48f9d62..1d88dac354 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp_asm.S
+++ b/src/gui/painting/qdrawhelper_mips_dsp_asm.S
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qdrawhelper_mips_dsp_p.h b/src/gui/painting/qdrawhelper_mips_dsp_p.h
index e33ce28ca0..ca05c9273f 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp_p.h
+++ b/src/gui/painting/qdrawhelper_mips_dsp_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdrawhelper_mips_dspr2_asm.S b/src/gui/painting/qdrawhelper_mips_dspr2_asm.S
index c7a603eebe..85ec66537b 100644
--- a/src/gui/painting/qdrawhelper_mips_dspr2_asm.S
+++ b/src/gui/painting/qdrawhelper_mips_dspr2_asm.S
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index 2f1452f430..7e12e62151 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdrawhelper_neon_asm.S b/src/gui/painting/qdrawhelper_neon_asm.S
index d9a549d0e3..42a2084bbd 100644
--- a/src/gui/painting/qdrawhelper_neon_asm.S
+++ b/src/gui/painting/qdrawhelper_neon_asm.S
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/gui/painting/qdrawhelper_neon_p.h b/src/gui/painting/qdrawhelper_neon_p.h
index 4dfd37da71..bd030a8bf3 100644
--- a/src/gui/painting/qdrawhelper_neon_p.h
+++ b/src/gui/painting/qdrawhelper_neon_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 695fbbdbbd..480ba4c97b 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -46,6 +46,7 @@
//
#include "QtCore/qglobal.h"
+#include "QtCore/qmath.h"
#include "QtGui/qcolor.h"
#include "QtGui/qpainter.h"
#include "QtGui/qimage.h"
@@ -55,16 +56,10 @@
#endif
#include "private/qrasterdefs_p.h"
#include <private/qsimd_p.h>
-#include <private/qmath_p.h>
QT_BEGIN_NAMESPACE
-#if defined(Q_CC_RVCT)
-// RVCT doesn't like static template functions
-# define Q_STATIC_TEMPLATE_FUNCTION
-# define Q_ALWAYS_INLINE __forceinline
-# define Q_DECL_RESTRICT
-#elif defined(Q_CC_GNU)
+#if defined(Q_CC_GNU)
# define Q_STATIC_TEMPLATE_FUNCTION static
# define Q_ALWAYS_INLINE inline __attribute__((always_inline))
# define Q_DECL_RESTRICT __restrict__
@@ -555,10 +550,6 @@ public:
}
};
-#if defined(Q_CC_RVCT)
-# pragma push
-# pragma arm
-#endif
static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) {
uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
@@ -570,9 +561,6 @@ static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b
x |= t;
return x;
}
-#if defined(Q_CC_RVCT)
-# pragma pop
-#endif
#if QT_POINTER_SIZE == 8 // 64-bit versions
@@ -604,10 +592,6 @@ static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b
return x;
}
-#if defined(Q_CC_RVCT)
-# pragma push
-# pragma arm
-#endif
static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) {
uint t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
@@ -619,10 +603,6 @@ static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) {
x |= t;
return x;
}
-#if defined(Q_CC_RVCT)
-# pragma pop
-#endif
-
#endif
@@ -664,14 +644,7 @@ static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16_32(uint x, uint a) {
return t;
}
-#if defined(Q_CC_RVCT)
-# pragma push
-# pragma arm
-#endif
static Q_ALWAYS_INLINE int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
-#if defined(Q_CC_RVCT)
-# pragma pop
-#endif
static Q_ALWAYS_INLINE uint BYTE_MUL_RGB30(uint x, uint a) {
uint xa = x >> 30;
@@ -693,11 +666,6 @@ static Q_ALWAYS_INLINE uint qAlphaRgb30(uint c)
return a;
}
-
-// FIXME: Remove when all Qt modules have stopped using PREMUL and INV_PREMUL
-#define PREMUL(x) qPremultiply(x)
-#define INV_PREMUL(p) qUnpremultiply(p)
-
struct quint24 {
quint24(uint value);
operator uint() const;
@@ -801,7 +769,7 @@ do { \
do { \
/* Duff's device */ \
ushort *_d = (ushort*)(dest); \
- const ushort *_s = (ushort*)(src); \
+ const ushort *_s = (const ushort*)(src); \
int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
@@ -925,6 +893,22 @@ inline int qBlue565(quint16 rgb) {
return (b << 3) | (b >> 2);
}
+
+static Q_ALWAYS_INLINE const uint *qt_convertARGB32ToARGB32PM(uint *buffer, const uint *src, int count)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qPremultiply(src[i]);
+ return buffer;
+}
+
+static Q_ALWAYS_INLINE const uint *qt_convertRGBA8888ToARGB32PM(uint *buffer, const uint *src, int count)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qPremultiply(RGBA2ARGB(src[i]));
+ return buffer;
+}
+
+
const uint qt_bayer_matrix[16][16] = {
{ 0x1, 0xc0, 0x30, 0xf0, 0xc, 0xcc, 0x3c, 0xfc,
0x3, 0xc3, 0x33, 0xf3, 0xf, 0xcf, 0x3f, 0xff},
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 77889b3c35..84eb3b7909 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -111,7 +111,7 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
}
for (; x < w-3; x += 4) {
- __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]);
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) {
const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
__m128i result;
@@ -162,7 +162,7 @@ void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uin
// 2) composition with SSE2
for (; x < length - 3; x += 4) {
- const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]);
const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
const __m128i result = _mm_adds_epu8(srcVector, dstVector);
@@ -185,7 +185,7 @@ void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uin
const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
// 2) composition with SSE2
for (; x < length - 3; x += 4) {
- const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]);
const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
__m128i result = _mm_adds_epu8(srcVector, dstVector);
@@ -218,7 +218,7 @@ void QT_FASTCALL comp_func_Source_sse2(uint *dst, const uint *src, int length, u
const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
const __m128i oneMinusConstAlpha = _mm_set1_epi16(ialpha);
for (; x < length - 3; x += 4) {
- const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]);
__m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
INTERPOLATE_PIXEL_255_SSE2(dstVector, srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half)
_mm_store_si128((__m128i *)&dst[x], dstVector);
@@ -484,9 +484,7 @@ void qt_bitmapblit16_sse2(QRasterBuffer *rasterBuffer, int x, int y,
const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16);
const __m128i c128 = _mm_set1_epi16(c);
-#if defined(Q_CC_MSVC)
-# pragma warning(disable: 4309) // truncation of constant value
-#endif
+QT_WARNING_DISABLE_MSVC(4309) // truncation of constant value
const __m128i maskmask = _mm_set_epi16(0x0101, 0x0202, 0x0404, 0x0808,
0x1010, 0x2020, 0x4040, 0x8080);
const __m128i maskadd = _mm_set_epi16(0x7f7f, 0x7e7e, 0x7c7c, 0x7878,
@@ -539,18 +537,7 @@ public:
static inline Int32x4 v_toInt(Float32x4 x) { return _mm_cvttps_epi32(x); }
- // pre-VS 2008 doesn't have cast intrinsics, whereas 2008 and later requires it
- // (same deal with gcc prior to 4.0)
-#if (defined(Q_CC_MSVC) && _MSC_VER < 1500) || (defined(Q_CC_GNU) && __GNUC__ < 4)
- static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b)
- {
- union Convert { Int32x4 vi; Float32x4 vf; } convert;
- convert.vf = _mm_cmpgt_ps(a, b);
- return convert.vi;
- }
-#else
static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
-#endif
};
const uint * QT_FASTCALL qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data,
diff --git a/src/gui/painting/qdrawhelper_sse4.cpp b/src/gui/painting/qdrawhelper_sse4.cpp
new file mode 100644
index 0000000000..43a3958997
--- /dev/null
+++ b/src/gui/painting/qdrawhelper_sse4.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <private/qdrawhelper_p.h>
+#include <private/qdrawingprimitive_sse2_p.h>
+
+#if defined(QT_COMPILER_SUPPORTS_SSE4_1)
+
+QT_BEGIN_NAMESPACE
+
+const uint *QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ return qt_convertARGB32ToARGB32PM(buffer, src, count);
+}
+
+const uint *QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ return qt_convertRGBA8888ToARGB32PM(buffer, src, count);
+}
+
+const uint *QT_FASTCALL convertARGB32FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = qUnpremultiply_sse4(src[i]);
+ return buffer;
+}
+
+const uint *QT_FASTCALL convertRGBA8888FromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = ARGB2RGBA(qUnpremultiply_sse4(src[i]));
+ return buffer;
+}
+
+const uint *QT_FASTCALL convertRGBXFromARGB32PM_sse4(uint *buffer, const uint *src, int count,
+ const QPixelLayout *, const QRgb *)
+{
+ for (int i = 0; i < count; ++i)
+ buffer[i] = ARGB2RGBA(0xff000000 | qUnpremultiply_sse4(src[i]));
+ return buffer;
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/painting/qdrawhelper_sse_p.h b/src/gui/painting/qdrawhelper_sse_p.h
deleted file mode 100644
index a1f878b5c0..0000000000
--- a/src/gui/painting/qdrawhelper_sse_p.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDRAWHELPER_SSE_P_H
-#define QDRAWHELPER_SSE_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <private/qdrawhelper_mmx_p.h>
-
-#ifdef QT_COMPILER_SUPPORTS_SSE
-
-#ifdef QT_LINUXBASE
-// this is an evil hack - the posix_memalign declaration in LSB
-// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431
-# define posix_memalign _lsb_hack_posix_memalign
-# include <xmmintrin.h>
-# undef posix_memalign
-#else
-# include <xmmintrin.h>
-#endif
-
-QT_BEGIN_NAMESPACE
-
-#ifndef _MM_SHUFFLE
-#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \
- (((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | (fp0))
-#endif
-
-struct QSSEIntrinsics : public QMMXIntrinsics
-{
- static inline m64 alpha(m64 x) {
- return _mm_shuffle_pi16 (x, _MM_SHUFFLE(3, 3, 3, 3));
- }
-
- static inline m64 _load_alpha(uint x, const m64 &mmx_0x0000) {
- m64 t = _mm_unpacklo_pi8(_mm_cvtsi32_si64(x), mmx_0x0000);
- return _mm_shuffle_pi16 (t, _MM_SHUFFLE(0, 0, 0, 0));
- }
-};
-
-template <class MM>
-inline void qt_memfill32_sse_template(quint32 *dest, quint32 value, int count)
-{
- if (count < 7) {
- switch (count) {
- case 6: *dest++ = value;
- case 5: *dest++ = value;
- case 4: *dest++ = value;
- case 3: *dest++ = value;
- case 2: *dest++ = value;
- case 1: *dest = value;
- }
- return;
- };
-
- __m64 *dst64 = reinterpret_cast<__m64*>(dest);
- const __m64 value64 = _mm_set_pi32(value, value);
- int count64 = count / 2;
-
- int n = (count64 + 3) / 4;
- switch (count64 & 0x3) {
- case 0: do { _mm_stream_pi(dst64++, value64);
- case 3: _mm_stream_pi(dst64++, value64);
- case 2: _mm_stream_pi(dst64++, value64);
- case 1: _mm_stream_pi(dst64++, value64);
- } while (--n > 0);
- }
-
- if (count & 0x1)
- dest[count - 1] = value;
-
- MM::end();
-}
-
-template <class MM>
-inline void qt_bitmapblit16_sse_template(QRasterBuffer *rasterBuffer,
- int x, int y,
- quint32 color,
- const uchar *src,
- int width, int height, int stride)
-{
- const quint16 c = qConvertRgb32To16(color);
- quint16 *dest = reinterpret_cast<quint16*>(rasterBuffer->scanLine(y)) + x;
- const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint16);
-
- const __m64 c64 = _mm_set1_pi16(c);
-#ifdef Q_CC_MSVC
-# pragma warning(disable: 4309) // truncation of constant value
-#endif
- const __m64 maskmask1 = _mm_set_pi16(0x1010, 0x2020, 0x4040, 0x8080);
- const __m64 maskadd1 = _mm_set_pi16(0x7070, 0x6060, 0x4040, 0x0000);
-
- if (width > 4) {
- const __m64 maskmask2 = _mm_set_pi16(0x0101, 0x0202, 0x0404, 0x0808);
- const __m64 maskadd2 = _mm_set_pi16(0x7f7f, 0x7e7e, 0x7c7c, 0x7878);
-
- while (height--) {
- for (int x = 0; x < width; x += 8) {
- const quint8 s = src[x >> 3];
- if (!s)
- continue;
- __m64 mask1 = _mm_set1_pi8(s);
- __m64 mask2 = mask1;
- mask1 = _m_pand(mask1, maskmask1);
- mask1 = _mm_add_pi16(mask1, maskadd1);
- _mm_maskmove_si64(c64, mask1, (char*)(dest + x));
- mask2 = _m_pand(mask2, maskmask2);
- mask2 = _mm_add_pi16(mask2, maskadd2);
- _mm_maskmove_si64(c64, mask2, (char*)(dest + x + 4));
- }
- dest += destStride;
- src += stride;
- }
- } else {
- while (height--) {
- const quint8 s = *src;
- if (s) {
- __m64 mask1 = _mm_set1_pi8(s);
- mask1 = _m_pand(mask1, maskmask1);
- mask1 = _mm_add_pi16(mask1, maskadd1);
- _mm_maskmove_si64(c64, mask1, (char*)(dest));
- }
- dest += destStride;
- src += stride;
- }
- }
-
- MM::end();
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_COMPILER_SUPPORTS_SSE
-#endif // QDRAWHELPER_SSE_P_H
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index b403e189f7..fff4145d21 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -53,7 +53,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
*/
#define BLENDING_LOOP(palignrOffset, length)\
for (; x-minusOffsetToAlignSrcOn16Bytes < length-7; x += 4) { \
- const __m128i srcVectorLastLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes + 4]);\
+ const __m128i srcVectorLastLoaded = _mm_load_si128((const __m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes + 4]);\
const __m128i srcVector = _mm_alignr_epi8(srcVectorLastLoaded, srcVectorPrevLoaded, palignrOffset); \
const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \
@@ -97,7 +97,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
See the SSE2 version for more documentation on the algorithm itself. */\
const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\
for (; x < length-3; x += 4) { \
- const __m128i srcVector = _mm_load_si128((__m128i *)&src[x]); \
+ const __m128i srcVector = _mm_load_si128((const __m128i *)&src[x]); \
const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \
_mm_store_si128((__m128i *)&dst[x], srcVector); \
@@ -113,7 +113,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src)
} /* end for() */\
} else if ((length - x) >= 8) {\
/* We use two vectors to extract the src: prevLoaded for the first pixels, lastLoaded for the current pixels. */\
- __m128i srcVectorPrevLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\
+ __m128i srcVectorPrevLoaded = _mm_load_si128((const __m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\
const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;\
\
const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\
diff --git a/src/gui/painting/qdrawhelper_x86_p.h b/src/gui/painting/qdrawhelper_x86_p.h
index 4dd5692a00..4d203c4f9d 100644
--- a/src/gui/painting/qdrawhelper_x86_p.h
+++ b/src/gui/painting/qdrawhelper_x86_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index 2b4cdc286e..4d0790a502 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -171,7 +171,7 @@ QT_BEGIN_NAMESPACE
} \
\
for (; x < length-3; x += 4) { \
- const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]); \
+ const __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]); \
BLEND_SOURCE_OVER_ARGB32_SSE2_helper(dst, srcVector, nullVector, half, one, colorMask, alphaMask) \
} \
for (; x < length; ++x) { \
@@ -207,7 +207,7 @@ QT_BEGIN_NAMESPACE
} \
\
for (; x < length-3; x += 4) { \
- __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]); \
+ __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[x]); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) { \
BYTE_MUL_SSE2(srcVector, srcVector, constAlphaVector, colorMask, half); \
\
@@ -236,4 +236,25 @@ QT_END_NAMESPACE
#endif // __SSE2__
+QT_BEGIN_NAMESPACE
+#if QT_COMPILER_SUPPORTS_HERE(SSE4_1)
+QT_FUNCTION_TARGET(SSE4_1)
+inline QRgb qUnpremultiply_sse4(QRgb p)
+{
+ const uint alpha = qAlpha(p);
+ const uint invAlpha = qt_inv_premul_factor[alpha];
+ const __m128i via = _mm_set1_epi32(invAlpha);
+ const __m128i vr = _mm_set1_epi32(0x8000);
+ __m128i vl = _mm_cvtepu8_epi32(_mm_cvtsi32_si128(p));
+ vl = _mm_mullo_epi32(vl, via);
+ vl = _mm_add_epi32(vl, vr);
+ vl = _mm_srai_epi32(vl, 16);
+ vl = _mm_insert_epi32(vl, alpha, 3);
+ vl = _mm_packus_epi32(vl, _mm_setzero_si128());
+ vl = _mm_packus_epi16(vl, _mm_setzero_si128());
+ return _mm_cvtsi128_si32(vl);
+}
+#endif
+QT_END_NAMESPACE
+
#endif // QDRAWINGPRIMITIVE_SSE2_P_H
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index 9e8e36dd9d..12ba67c124 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qemulationpaintengine_p.h b/src/gui/painting/qemulationpaintengine_p.h
index b4481a067c..ab35e9b23e 100644
--- a/src/gui/painting/qemulationpaintengine_p.h
+++ b/src/gui/painting/qemulationpaintengine_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h
index 68314d0434..c29dacae3d 100644
--- a/src/gui/painting/qfixed_p.h
+++ b/src/gui/painting/qfixed_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qgammatables.cpp b/src/gui/painting/qgammatables.cpp
index 76c1c84631..83c31bbe95 100644
--- a/src/gui/painting/qgammatables.cpp
+++ b/src/gui/painting/qgammatables.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 614d95ace1..b536028fe3 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -480,10 +480,10 @@
ras.area = 0;
ras.cover = 0;
+ ras.ex = ex;
+ ras.ey = ey;
}
- ras.ex = ex;
- ras.ey = ey;
ras.invalid = ( (unsigned)ey >= (unsigned)ras.count_ey ||
ex >= ras.count_ex );
}
@@ -670,38 +670,64 @@
}
/* vertical line - avoid calling gray_render_scanline */
- incr = 1;
-
if ( dx == 0 )
{
TCoord ex = TRUNC( ras.x );
TCoord two_fx = (TCoord)( ( ras.x - SUBPIXELS( ex ) ) << 1 );
- TPos area;
+ TPos area, max_ey1;
first = ONE_PIXEL;
if ( dy < 0 )
- {
first = 0;
- incr = -1;
- }
delta = (int)( first - fy1 );
ras.area += (TArea)two_fx * delta;
ras.cover += delta;
- ey1 += incr;
-
- gray_set_cell( &ras, ex, ey1 );
delta = (int)( first + first - ONE_PIXEL );
area = (TArea)two_fx * delta;
- while ( ey1 != ey2 )
- {
- ras.area += area;
- ras.cover += delta;
- ey1 += incr;
+ max_ey1 = ras.count_ey + ras.min_ey;
+ if (dy < 0) {
+ if (ey1 > max_ey1) {
+ ey1 = (max_ey1 > ey2) ? max_ey1 : ey2;
+ gray_set_cell( &ras, ex, ey1 );
+ } else {
+ ey1--;
+ gray_set_cell( &ras, ex, ey1 );
+ }
+ while ( ey1 > ey2 && ey1 >= ras.min_ey)
+ {
+ ras.area += area;
+ ras.cover += delta;
+ ey1--;
+
+ gray_set_cell( &ras, ex, ey1 );
+ }
+ if (ey1 != ey2) {
+ ey1 = ey2;
+ gray_set_cell( &ras, ex, ey1 );
+ }
+ } else {
+ if (ey1 < ras.min_ey) {
+ ey1 = (ras.min_ey < ey2) ? ras.min_ey : ey2;
+ gray_set_cell( &ras, ex, ey1 );
+ } else {
+ ey1++;
+ gray_set_cell( &ras, ex, ey1 );
+ }
+ while ( ey1 < ey2 && ey1 < max_ey1)
+ {
+ ras.area += area;
+ ras.cover += delta;
+ ey1++;
- gray_set_cell( &ras, ex, ey1 );
+ gray_set_cell( &ras, ex, ey1 );
+ }
+ if (ey1 != ey2) {
+ ey1 = ey2;
+ gray_set_cell( &ras, ex, ey1 );
+ }
}
delta = (int)( fy2 - ONE_PIXEL + first );
diff --git a/src/gui/painting/qgrayraster_p.h b/src/gui/painting/qgrayraster_p.h
index 9a2ef3a413..8d1dec6b80 100644
--- a/src/gui/painting/qgrayraster_p.h
+++ b/src/gui/painting/qgrayraster_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp
index 4934a18747..58e9112dd6 100644
--- a/src/gui/painting/qimagescale.cpp
+++ b/src/gui/painting/qimagescale.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -107,12 +107,12 @@ qt_qimageScaleFunc qt_qimageScaleRgb = qt_qimageScaleAARGB;
namespace QImageScale {
struct QImageScaleInfo {
int *xpoints;
- unsigned int **ypoints;
+ const unsigned int **ypoints;
int *xapoints, *yapoints;
int xup_yup;
};
- unsigned int** qimageCalcYPoints(unsigned int *src, int sw, int sh,
+ const unsigned int** qimageCalcYPoints(const unsigned int *src, int sw, int sh,
int dh);
int* qimageCalcXPoints(int sw, int dw);
int* qimageCalcApoints(int s, int d, int up);
@@ -139,10 +139,10 @@ using namespace QImageScale;
#define INV_YAP (256 - yapoints[dyy + y])
#define YAP (yapoints[dyy + y])
-unsigned int** QImageScale::qimageCalcYPoints(unsigned int *src,
+const unsigned int** QImageScale::qimageCalcYPoints(const unsigned int *src,
int sw, int sh, int dh)
{
- unsigned int **p;
+ const unsigned int **p;
int i, j = 0, rv = 0;
qint64 val, inc;
@@ -150,7 +150,7 @@ unsigned int** QImageScale::qimageCalcYPoints(unsigned int *src,
dh = -dh;
rv = 1;
}
- p = new unsigned int* [dh+1];
+ p = new const unsigned int* [dh+1];
int up = qAbs(dh) >= sh;
val = up ? 0x8000 * sh / dh - 0x8000 : 0;
@@ -161,7 +161,7 @@ unsigned int** QImageScale::qimageCalcYPoints(unsigned int *src,
}
if(rv){
for(i = dh / 2; --i >= 0; ){
- unsigned int *tmp = p[i];
+ const unsigned int *tmp = p[i];
p[i] = p[dh - i - 1];
p[dh - i - 1] = tmp;
}
@@ -282,7 +282,7 @@ QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img,
isi->xpoints = qimageCalcXPoints(img.width(), scw);
if(!isi->xpoints)
return(qimageFreeScaleInfo(isi));
- isi->ypoints = qimageCalcYPoints((unsigned int *)img.scanLine(0),
+ isi->ypoints = qimageCalcYPoints((const unsigned int *)img.scanLine(0),
img.bytesPerLine() / 4, img.height(), sch);
if (!isi->ypoints)
return(qimageFreeScaleInfo(isi));
@@ -304,9 +304,10 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest,
int dxx, int dyy, int dx, int dy, int dw,
int dh, int dow, int sow)
{
- unsigned int *sptr, *dptr;
+ const unsigned int *sptr;
+ unsigned int *dptr;
int x, y, end;
- unsigned int **ypoints = isi->ypoints;
+ const unsigned int **ypoints = isi->ypoints;
int *xpoints = isi->xpoints;
int *xapoints = isi->xapoints;
int *yapoints = isi->yapoints;
@@ -323,7 +324,7 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest,
for(x = dxx; x < end; x++){
int r, g, b, a;
int rr, gg, bb, aa;
- unsigned int *pix;
+ const unsigned int *pix;
if(XAP > 0){
pix = ypoints[dyy + y] + xpoints[x];
@@ -374,7 +375,7 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest,
else{
for(x = dxx; x < end; x++){
int r, g, b, a;
- unsigned int *pix;
+ const unsigned int *pix;
if(XAP > 0){
pix = ypoints[dyy + y] + xpoints[x];
@@ -403,7 +404,7 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest,
else if(isi->xup_yup == 1){
/*\ 'Correct' version, with math units prepared for MMXification \*/
int Cy, j;
- unsigned int *pix;
+ const unsigned int *pix;
int r, g, b, a, rr, gg, bb, aa;
int yap;
@@ -477,7 +478,7 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest,
else if(isi->xup_yup == 2){
/*\ 'Correct' version, with math units prepared for MMXification \*/
int Cx, j;
- unsigned int *pix;
+ const unsigned int *pix;
int r, g, b, a, rr, gg, bb, aa;
int xap;
@@ -555,7 +556,7 @@ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest,
|*| psllw (16 - d), %mmb; pmulh %mmc, %mmb
\*/
int Cx, Cy, i, j;
- unsigned int *pix;
+ const unsigned int *pix;
int a, r, g, b, ax, rx, gx, bx;
int xap, yap;
@@ -663,9 +664,10 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int *dest,
int dxx, int dyy, int dx, int dy, int dw,
int dh, int dow, int sow)
{
- unsigned int *sptr, *dptr;
+ const unsigned int *sptr;
+ unsigned int *dptr;
int x, y, end;
- unsigned int **ypoints = isi->ypoints;
+ const unsigned int **ypoints = isi->ypoints;
int *xpoints = isi->xpoints;
int *xapoints = isi->xapoints;
int *yapoints = isi->yapoints;
@@ -682,7 +684,7 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int *dest,
for(x = dxx; x < end; x++){
int r = 0, g = 0, b = 0;
int rr = 0, gg = 0, bb = 0;
- unsigned int *pix;
+ const unsigned int *pix;
if(XAP > 0){
pix = ypoints[dyy + y] + xpoints[x];
@@ -725,7 +727,7 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int *dest,
else{
for(x = dxx; x < end; x++){
int r = 0, g = 0, b = 0;
- unsigned int *pix;
+ const unsigned int *pix;
if(XAP > 0){
pix = ypoints[dyy + y] + xpoints[x];
@@ -751,7 +753,7 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int *dest,
else if(isi->xup_yup == 1){
/*\ 'Correct' version, with math units prepared for MMXification \*/
int Cy, j;
- unsigned int *pix;
+ const unsigned int *pix;
int r, g, b, rr, gg, bb;
int yap;
@@ -816,7 +818,7 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int *dest,
else if(isi->xup_yup == 2){
/*\ 'Correct' version, with math units prepared for MMXification \*/
int Cx, j;
- unsigned int *pix;
+ const unsigned int *pix;
int r, g, b, rr, gg, bb;
int xap;
@@ -882,7 +884,7 @@ static void qt_qimageScaleAARGB(QImageScaleInfo *isi, unsigned int *dest,
else{
/*\ 'Correct' version, with math units prepared for MMXification \*/
int Cx, Cy, i, j;
- unsigned int *pix;
+ const unsigned int *pix;
int r, g, b, rx, gx, bx;
int xap, yap;
diff --git a/src/gui/painting/qimagescale_p.h b/src/gui/painting/qimagescale_p.h
index 61767dd905..512ec6488e 100644
--- a/src/gui/painting/qimagescale_p.h
+++ b/src/gui/painting/qimagescale_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qmath_p.h b/src/gui/painting/qmath_p.h
index fedcb3bd3e..13f82a82bb 100644
--- a/src/gui/painting/qmath_p.h
+++ b/src/gui/painting/qmath_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,21 +45,13 @@
// We mean it.
//
-#include <math.h>
#include <qmath.h>
QT_BEGIN_NAMESPACE
-static const qreal Q_PI = qreal(3.14159265358979323846); // pi
-static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi
-static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2
+static const qreal Q_PI = qreal(M_PI); // pi
static const qreal Q_MM_PER_INCH = 25.4;
-inline int qIntSqrtInt(int v)
-{
- return static_cast<int>(qSqrt(static_cast<qreal>(v)));
-}
-
QT_END_NAMESPACE
#endif // QMATH_P_H
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 9a59408e52..acedc6a7ba 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1130,6 +1130,7 @@ QDataStream &operator>>(QDataStream &s, QMatrix &m)
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QMatrix &m)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QMatrix("
<< "11=" << m.m11()
<< " 12=" << m.m12()
@@ -1138,7 +1139,7 @@ QDebug operator<<(QDebug dbg, const QMatrix &m)
<< " dx=" << m.dx()
<< " dy=" << m.dy()
<< ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index f09c5cbec4..ddffa8a8b9 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index b55f3b0dcc..f205cb1c5e 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -473,6 +473,21 @@ QT_IMPL_MEMROTATE(quint16)
QT_IMPL_MEMROTATE(quint24)
QT_IMPL_MEMROTATE(quint8)
+void qt_memrotate90_8(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+ qt_memrotate90(srcPixels, w, h, sbpl, destPixels, dbpl);
+}
+
+void qt_memrotate180_8(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+ qt_memrotate180(srcPixels, w, h, sbpl, destPixels, dbpl);
+}
+
+void qt_memrotate270_8(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
+{
+ qt_memrotate270(srcPixels, w, h, sbpl, destPixels, dbpl);
+}
+
void qt_memrotate90_16(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl)
{
qt_memrotate90((const ushort *)srcPixels, w, h, sbpl, (ushort *)destPixels, dbpl);
@@ -529,6 +544,8 @@ MemRotateFunc qMemRotateFunctions[QImage::NImageFormats][3] =
{ qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 }, // Format_A2BGR30_Premultiplied,
{ qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 }, // Format_RGB30,
{ qt_memrotate90_32, qt_memrotate180_32, qt_memrotate270_32 }, // Format_A2RGB30_Premultiplied,
+ { qt_memrotate90_8, qt_memrotate180_8, qt_memrotate270_8 }, // Format_Alpha8,
+ { qt_memrotate90_8, qt_memrotate180_8, qt_memrotate270_8 }, // Format_Grayscale8,
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h
index 24b23da57d..ece6e94765 100644
--- a/src/gui/painting/qmemrotate_p.h
+++ b/src/gui/painting/qmemrotate_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index 358f8c2b19..84061a5c25 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h
index 4e3a4bfb9a..9d75e12619 100644
--- a/src/gui/painting/qoutlinemapper_p.h
+++ b/src/gui/painting/qoutlinemapper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp
index fb3e860a7d..3adc5e9411 100644
--- a/src/gui/painting/qpagedpaintdevice.cpp
+++ b/src/gui/painting/qpagedpaintdevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpagedpaintdevice.h b/src/gui/painting/qpagedpaintdevice.h
index 10d18c4ae2..8d5f677bc5 100644
--- a/src/gui/painting/qpagedpaintdevice.h
+++ b/src/gui/painting/qpagedpaintdevice.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpagedpaintdevice_p.h b/src/gui/painting/qpagedpaintdevice_p.h
index a17f1606ae..62f69747db 100644
--- a/src/gui/painting/qpagedpaintdevice_p.h
+++ b/src/gui/painting/qpagedpaintdevice_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpagelayout.cpp b/src/gui/painting/qpagelayout.cpp
index 4531a0558d..f443bbd5ac 100644
--- a/src/gui/painting/qpagelayout.cpp
+++ b/src/gui/painting/qpagelayout.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 John Layt <jlayt@kde.org>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -942,6 +942,7 @@ QRect QPageLayout::paintRectPixels(int resolution) const
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QPageLayout &layout)
{
+ QDebugStateSaver saver(dbg);
if (layout.isValid()) {
QString output = QStringLiteral("QPageLayout(%1, %2, l:%3 r:%4 t:%5 b:%6 %7)");
QString units;
@@ -976,7 +977,7 @@ QDebug operator<<(QDebug dbg, const QPageLayout &layout)
} else {
dbg.nospace() << "QPageLayout()";
}
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qpagelayout.h b/src/gui/painting/qpagelayout.h
index 252e65bc23..17e5eeece2 100644
--- a/src/gui/painting/qpagelayout.h
+++ b/src/gui/painting/qpagelayout.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 John Layt <jlayt@kde.org>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp
index 92a14119c8..c0aae603b7 100644
--- a/src/gui/painting/qpagesize.cpp
+++ b/src/gui/painting/qpagesize.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 John Layt <jlayt@kde.org>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1854,6 +1854,7 @@ QSize QPageSize::sizePixels(PageSizeId pageSizeId, int resolution)
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QPageSize &pageSize)
{
+ QDebugStateSaver saver(dbg);
if (pageSize.isValid()) {
QString output = QStringLiteral("QPageSize(\"%1\", \"%2\", %3x%4pt, %5)");
output = output.arg(pageSize.name())
@@ -1865,7 +1866,7 @@ QDebug operator<<(QDebug dbg, const QPageSize &pageSize)
} else {
dbg.nospace() << "QPageSize()";
}
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h
index d12c51513f..00e22a243f 100644
--- a/src/gui/painting/qpagesize.h
+++ b/src/gui/painting/qpagesize.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 John Layt <jlayt@kde.org>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
deleted file mode 100644
index be147ec842..0000000000
--- a/src/gui/painting/qpaintbuffer.cpp
+++ /dev/null
@@ -1,2209 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qmath.h>
-#include <private/qpainterpath_p.h>
-#include <private/qpaintbuffer_p.h>
-//#include <private/qtextengine_p.h>
-#include <private/qfontengine_p.h>
-#include <private/qemulationpaintengine_p.h>
-#include <private/qimage_p.h>
-#include <qstatictext.h>
-#include <private/qstatictext_p.h>
-
-#include <QDebug>
-
-// #define QPAINTBUFFER_DEBUG_DRAW
-
-QT_BEGIN_NAMESPACE
-
-extern void qt_format_text(const QFont &font,
- const QRectF &_r, int tf, const QTextOption *option, const QString& str, QRectF *brect,
- int tabstops, int* tabarray, int tabarraylen,
- QPainter *painter);
-
-QTextItemIntCopy::QTextItemIntCopy(const QTextItem &item)
- : m_item(static_cast<const QTextItemInt &>(item))
-{
- QChar *chars = new QChar[m_item.num_chars];
- unsigned short *logClusters = new unsigned short[m_item.num_chars];
- memcpy(chars, m_item.chars, m_item.num_chars * sizeof(QChar));
- memcpy(logClusters, m_item.logClusters, m_item.num_chars * sizeof(unsigned short));
- m_item.chars = chars;
- m_item.logClusters = logClusters;
-
- char *glyphLayoutData = new char[m_item.glyphs.numGlyphs * QGlyphLayout::SpaceNeeded];
- QGlyphLayout glyphs(glyphLayoutData, m_item.glyphs.numGlyphs);
- memcpy(glyphs.offsets, m_item.glyphs.offsets, m_item.glyphs.numGlyphs * sizeof(QFixedPoint));
- memcpy(glyphs.glyphs, m_item.glyphs.glyphs, m_item.glyphs.numGlyphs * sizeof(glyph_t));
- memcpy(glyphs.advances, m_item.glyphs.advances, m_item.glyphs.numGlyphs * sizeof(QFixed));
- memcpy(glyphs.justifications, m_item.glyphs.justifications, m_item.glyphs.numGlyphs * sizeof(QGlyphJustification));
- memcpy(glyphs.attributes, m_item.glyphs.attributes, m_item.glyphs.numGlyphs * sizeof(QGlyphAttributes));
- m_item.glyphs = glyphs;
-
- m_font = *m_item.f;
- m_item.f = &m_font;
-
- m_item.fontEngine->ref.ref(); // Increment reference count.
-}
-
-QTextItemIntCopy::~QTextItemIntCopy()
-{
- delete [] m_item.chars;
- delete [] m_item.logClusters;
- delete [] m_item.glyphs.data();
- if (!m_item.fontEngine->ref.deref())
- delete m_item.fontEngine;
-}
-
-/************************************************************************
- *
- * QPaintBufferPrivate
- *
- ************************************************************************/
-
-QPaintBufferPrivate::QPaintBufferPrivate()
- : ref(1), engine(0), penWidthAdjustment(0)
- , calculateBoundingRect(true)
- , cache(0)
-{
-}
-
-QPaintBufferPrivate::~QPaintBufferPrivate()
-{
- for (int i = 0; i < commands.size(); ++i) {
- const QPaintBufferCommand &cmd = commands.at(i);
- if (cmd.id == QPaintBufferPrivate::Cmd_DrawTextItem)
- delete reinterpret_cast<QTextItemIntCopy *>(qvariant_cast<void *>(variants.at(cmd.offset)));
- }
-}
-
-
-inline void QPaintBufferPrivate::updateBoundingRect(const QRectF &br)
-{
- // transform to device coords and adjust for pen width
- Q_ASSERT(engine && engine->painter());
- QPainter *painter = engine->painter();
- const QTransform transform = painter->transform();
- QRectF devRect = transform.mapRect(br);
- if (penWidthAdjustment > 0) {
- devRect = devRect.adjusted(-penWidthAdjustment, -penWidthAdjustment,
- penWidthAdjustment, penWidthAdjustment);
- }
-
- if (boundingRect.isEmpty()) {
- boundingRect = devRect;
- } else {
- qreal min_x = qMin(devRect.left(), boundingRect.left());
- qreal min_y = qMin(devRect.top(), boundingRect.top());
- qreal max_x = qMax(devRect.right(), boundingRect.right());
- qreal max_y = qMax(devRect.bottom(), boundingRect.bottom());
- boundingRect = QRectF(min_x, min_y, max_x - min_x, max_y - min_y);
- }
- if (painter->hasClipping())
- boundingRect &= transform.mapRect(painter->clipRegion().boundingRect());
-}
-
-
-/************************************************************************
- *
- * QPaintBuffer
- *
- ************************************************************************/
-
-
-
-QPaintBuffer::QPaintBuffer()
- : d_ptr(new QPaintBufferPrivate)
-{
-}
-
-QPaintBuffer::~QPaintBuffer()
-{
- if (!d_ptr->ref.deref())
- delete d_ptr;
-}
-
-QPaintBuffer::QPaintBuffer(const QPaintBuffer &other)
- : QPaintDevice(), d_ptr(other.d_ptr)
-{
- d_ptr->ref.ref();
-}
-
-QPaintEngine *QPaintBuffer::paintEngine() const
-{
- QPaintBufferPrivate *d = const_cast<QPaintBuffer *>(this)->d_ptr;
- if (!d->engine)
- d->engine = new QPaintBufferEngine(d);
- return d->engine;
-}
-
-
-int QPaintBuffer::metric(PaintDeviceMetric metric) const
-{
- int val = 0;
- switch (metric) {
- case PdmWidth:
- val = qCeil(d_ptr->boundingRect.width());
- break;
- case PdmHeight:
- val = qCeil(d_ptr->boundingRect.height());
- break;
- case PdmDpiX:
- case PdmPhysicalDpiX:
- val = qt_defaultDpiX();
- break;
- case PdmDpiY:
- case PdmPhysicalDpiY:
- val = qt_defaultDpiY();
- break;
- default:
- val = QPaintDevice::metric(metric);
- }
-
- return val;
-}
-
-int QPaintBuffer::devType() const
-{
- return QInternal::PaintBuffer;
-}
-
-QPaintBuffer &QPaintBuffer::operator=(const QPaintBuffer &other)
-{
- if (other.d_ptr != d_ptr) {
- QPaintBufferPrivate *data = other.d_ptr;
- data->ref.ref();
- if (d_ptr->ref.deref())
- delete d_ptr;
- d_ptr = data;
- }
- return *this;
-}
-
-bool QPaintBuffer::isEmpty() const
-{
- return d_ptr->commands.isEmpty();
-}
-
-
-
-void QPaintBuffer::draw(QPainter *painter, int frame) const
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBuffer::draw() --------------------------------";
-
- Q_D(const QPaintBuffer);
- printf("Float buffer:");
- for (int i=0; i<d->floats.size(); i++) {
- if ((i % 10) == 0) {
- printf("\n%4d-%4d: ", i, i+9);
- }
- printf("%4.2f ", d->floats[i]);
- }
- printf("\n");
-
- printf("Int Buffer:");
- for (int i=0; i<d->ints.size(); i++) {
- if ((i % 10) == 0) {
- printf("\n%4d-%4d: ", i, i+10);
- }
- printf("%5d", d->ints[i]);
- }
- printf("\n");
-#endif
-
- processCommands(painter, frameStartIndex(frame), frameEndIndex(frame));
-
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBuffer::draw() -------------------------------- DONE!";
-#endif
-}
-
-int QPaintBuffer::frameStartIndex(int frame) const
-{
- return (frame == 0) ? 0 : d_ptr->frames.at(frame - 1);
-}
-
-int QPaintBuffer::frameEndIndex(int frame) const
-{
- return (frame == d_ptr->frames.size()) ? d_ptr->commands.size() : d_ptr->frames.at(frame);
-}
-
-int QPaintBuffer::processCommands(QPainter *painter, int begin, int end) const
-{
- if (!painter || !painter->isActive())
- return 0;
-
- QPaintEngineEx *xengine = painter->paintEngine()->isExtended()
- ? (QPaintEngineEx *) painter->paintEngine() : 0;
- if (xengine) {
- QPaintEngineExReplayer player;
- player.processCommands(*this, painter, begin, end);
- } else {
- QPainterReplayer player;
- player.processCommands(*this, painter, begin, end);
- }
-
- int depth = 0;
- for (int i = begin; i < end; ++i) {
- const QPaintBufferCommand &cmd = d_ptr->commands.at(i);
- if (cmd.id == QPaintBufferPrivate::Cmd_Save)
- ++depth;
- else if (cmd.id == QPaintBufferPrivate::Cmd_Restore)
- --depth;
- }
- return depth;
-}
-
-#ifndef QT_NO_DEBUG_STREAM
-QString QPaintBuffer::commandDescription(int command) const
-{
- QString desc;
- QDebug debug(&desc);
-
- const QPaintBufferCommand &cmd = d_ptr->commands.at(command);
-
- switch (cmd.id) {
- case QPaintBufferPrivate::Cmd_Save: {
- debug << "Cmd_Save";
- break; }
-
- case QPaintBufferPrivate::Cmd_Restore: {
- debug << "Cmd_Restore";
- break; }
-
- case QPaintBufferPrivate::Cmd_SetBrush: {
- QBrush brush = qvariant_cast<QBrush>(d_ptr->variants.at(cmd.offset));
- debug << "Cmd_SetBrush: " << brush;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetBrushOrigin: {
- debug << "Cmd_SetBrushOrigin: " << d_ptr->variants.at(cmd.offset).toPointF();
- break; }
-
- case QPaintBufferPrivate::Cmd_SetCompositionMode: {
- QPainter::CompositionMode mode = (QPainter::CompositionMode) cmd.extra;
- debug << "ExCmd_SetCompositionMode, mode: " << mode;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetOpacity: {
- debug << "ExCmd_SetOpacity: " << d_ptr->variants.at(cmd.offset).toDouble();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawVectorPath: {
- debug << "ExCmd_DrawVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2;
- break; }
-
- case QPaintBufferPrivate::Cmd_StrokeVectorPath: {
- QPen pen = qvariant_cast<QPen>(d_ptr->variants.at(cmd.extra));
- debug << "ExCmd_StrokeVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2 << pen;
- break; }
-
- case QPaintBufferPrivate::Cmd_FillVectorPath: {
- QBrush brush = qvariant_cast<QBrush>(d_ptr->variants.at(cmd.extra));
- debug << "ExCmd_FillVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2 << brush;
- break; }
-
- case QPaintBufferPrivate::Cmd_FillRectBrush: {
- QBrush brush = qvariant_cast<QBrush>(d_ptr->variants.at(cmd.extra));
- QRectF *rect = (QRectF *)(d_ptr->floats.constData() + cmd.offset);
- debug << "ExCmd_FillRectBrush, offset: " << cmd.offset << " rect: " << *rect << " brush: " << brush;
- break; }
-
- case QPaintBufferPrivate::Cmd_FillRectColor: {
- QColor color = qvariant_cast<QColor>(d_ptr->variants.at(cmd.extra));
- QRectF *rect = (QRectF *)(d_ptr->floats.constData() + cmd.offset);
- debug << "ExCmd_FillRectBrush, offset: " << cmd.offset << " rect: " << *rect << " color: " << color;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolygonF: {
- debug << "ExCmd_DrawPolygonF, offset: " << cmd.offset << " size: " << cmd.size
- << " mode: " << cmd.extra
- << d_ptr->floats.at(cmd.offset)
- << d_ptr->floats.at(cmd.offset+1);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolygonI: {
- debug << "ExCmd_DrawPolygonI, offset: " << cmd.offset << " size: " << cmd.size
- << " mode: " << cmd.extra
- << d_ptr->ints.at(cmd.offset)
- << d_ptr->ints.at(cmd.offset+1);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawEllipseF: {
- debug << "ExCmd_DrawEllipseF, offset: " << cmd.offset;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawLineF: {
- debug << "ExCmd_DrawLineF, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawLineI: {
- debug << "ExCmd_DrawLineI, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPointsF: {
- debug << "ExCmd_DrawPointsF, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPointsI: {
- debug << "ExCmd_DrawPointsI, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolylineF: {
- debug << "ExCmd_DrawPolylineF, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolylineI: {
- debug << "ExCmd_DrawPolylineI, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawRectF: {
- debug << "ExCmd_DrawRectF, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawRectI: {
- debug << "ExCmd_DrawRectI, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetClipEnabled: {
- bool clipEnabled = d_ptr->variants.at(cmd.offset).toBool();
- debug << "ExCmd_SetClipEnabled:" << clipEnabled;
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipVectorPath: {
- QVectorPathCmd path(d_ptr, cmd);
- debug << "ExCmd_ClipVectorPath:" << path().elementCount();
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipRect: {
- QRect rect(QPoint(d_ptr->ints.at(cmd.offset), d_ptr->ints.at(cmd.offset + 1)),
- QPoint(d_ptr->ints.at(cmd.offset + 2), d_ptr->ints.at(cmd.offset + 3)));
- debug << "ExCmd_ClipRect:" << rect << cmd.extra;
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipRegion: {
- QRegion region(d_ptr->variants.at(cmd.offset).value<QRegion>());
- debug << "ExCmd_ClipRegion:" << region.boundingRect() << cmd.extra;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetPen: {
- QPen pen = qvariant_cast<QPen>(d_ptr->variants.at(cmd.offset));
- debug << "Cmd_SetPen: " << pen;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetTransform: {
- QTransform xform = qvariant_cast<QTransform>(d_ptr->variants.at(cmd.offset));
- debug << "Cmd_SetTransform, offset: " << cmd.offset << xform;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetRenderHints: {
- debug << "Cmd_SetRenderHints, hints: " << cmd.extra;
- break; }
-
- case QPaintBufferPrivate::Cmd_SetBackgroundMode: {
- debug << "Cmd_SetBackgroundMode: " << cmd.extra;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawConvexPolygonF: {
- debug << "Cmd_DrawConvexPolygonF, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawConvexPolygonI: {
- debug << "Cmd_DrawConvexPolygonI, offset: " << cmd.offset << " size: " << cmd.size;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawEllipseI: {
- debug << "Cmd_DrawEllipseI, offset: " << cmd.offset;
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPixmapRect: {
- QPixmap pm(d_ptr->variants.at(cmd.offset).value<QPixmap>());
- QRectF r(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1),
- d_ptr->floats.at(cmd.extra+2), d_ptr->floats.at(cmd.extra+3));
-
- QRectF sr(d_ptr->floats.at(cmd.extra+4), d_ptr->floats.at(cmd.extra+5),
- d_ptr->floats.at(cmd.extra+6), d_ptr->floats.at(cmd.extra+7));
- debug << "Cmd_DrawPixmapRect:" << r << sr << pm.size();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPixmapPos: {
- QPixmap pm(d_ptr->variants.at(cmd.offset).value<QPixmap>());
- QPointF pos(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1));
- debug << "Cmd_DrawPixmapPos:" << pos << pm.size();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawTiledPixmap: {
- QPixmap pm(d_ptr->variants.at(cmd.offset).value<QPixmap>());
- QRectF r(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1),
- d_ptr->floats.at(cmd.extra+2), d_ptr->floats.at(cmd.extra+3));
-
- QPointF offset(d_ptr->floats.at(cmd.extra+4), d_ptr->floats.at(cmd.extra+5));
- debug << "Cmd_DrawTiledPixmap:" << r << offset << pm.size();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawImageRect: {
- QImage image(d_ptr->variants.at(cmd.offset).value<QImage>());
- QRectF r(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1),
- d_ptr->floats.at(cmd.extra+2), d_ptr->floats.at(cmd.extra+3));
- QRectF sr(d_ptr->floats.at(cmd.extra+4), d_ptr->floats.at(cmd.extra+5),
- d_ptr->floats.at(cmd.extra+6), d_ptr->floats.at(cmd.extra+7));
- debug << "Cmd_DrawImageRect:" << r << sr << image.size();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawImagePos: {
- QImage image(d_ptr->variants.at(cmd.offset).value<QImage>());
- QPointF pos(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1));
- debug << "Cmd_DrawImagePos:" << pos << image.size();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawText: {
- QPointF pos(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1));
- QList<QVariant> variants(d_ptr->variants.at(cmd.offset).value<QList<QVariant> >());
-
- QFont font(variants.at(0).value<QFont>());
- QString text(variants.at(1).value<QString>());
-
- debug << "Cmd_DrawText:" << pos << text << font.family();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawTextItem: {
- QPointF pos(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1));
- QTextItemIntCopy *tiCopy = reinterpret_cast<QTextItemIntCopy *>(qvariant_cast<void *>(d_ptr->variants.at(cmd.offset)));
- QTextItemInt &ti = (*tiCopy)();
- QString text(ti.text());
-
- debug << "Cmd_DrawTextItem:" << pos << " " << text;
- break; }
- case QPaintBufferPrivate::Cmd_SystemStateChanged: {
- QRegion systemClip(d_ptr->variants.at(cmd.offset).value<QRegion>());
-
- debug << "Cmd_SystemStateChanged:" << systemClip;
- break; }
- case QPaintBufferPrivate::Cmd_Translate: {
- QPointF delta(d_ptr->floats.at(cmd.extra), d_ptr->floats.at(cmd.extra+1));
- debug << "Cmd_Translate:" << delta;
- break; }
- case QPaintBufferPrivate::Cmd_DrawStaticText: {
- debug << "Cmd_DrawStaticText";
- break; }
- }
-
- return desc;
-}
-#endif
-
-QRectF QPaintBuffer::boundingRect() const
-{
- return d_ptr->boundingRect;
-}
-
-void QPaintBuffer::setBoundingRect(const QRectF &rect)
-{
- d_ptr->boundingRect = rect;
- d_ptr->calculateBoundingRect = false;
-}
-
-
-class QPaintBufferEnginePrivate : public QPaintEngineExPrivate
-{
- Q_DECLARE_PUBLIC(QPaintBufferEngine)
-public:
- void systemStateChanged() {
- Q_Q(QPaintBufferEngine);
- q->buffer->addCommand(QPaintBufferPrivate::Cmd_SystemStateChanged, QVariant(systemClip));
- }
-
- QTransform last;
-};
-
-
-/************************************************************************
- *
- * QPaintBufferEngine
- *
- ************************************************************************/
-
-QPaintBufferEngine::QPaintBufferEngine(QPaintBufferPrivate *b)
- : QPaintEngineEx(*(new QPaintBufferEnginePrivate))
- , buffer(b)
- , m_begin_detected(false)
- , m_save_detected(false)
- , m_stream_raw_text_items(false)
-{
-}
-
-bool QPaintBufferEngine::begin(QPaintDevice *)
-{
- Q_D(QPaintBufferEngine);
- painter()->save();
- d->systemStateChanged();
- return true;
-}
-
-bool QPaintBufferEngine::end()
-{
- painter()->restore();
- m_created_state = 0;
- return true;
-}
-
-QPainterState *QPaintBufferEngine::createState(QPainterState *orig) const
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: createState, orig=" << orig << ", current=" << state();
-#endif
-
- Q_ASSERT(!m_begin_detected);
- Q_ASSERT(!m_save_detected);
-
- if (orig == 0) {
- m_begin_detected = true;
- return new QPainterState();
- } else {
- m_save_detected = true;
- return new QPainterState(orig);
- }
-}
-
-void QPaintBufferEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: clip vpath:" << path.elementCount() << "op:" << op;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_ClipVectorPath, path);
- cmd->extra = op;
-}
-
-void QPaintBufferEngine::clip(const QRect &rect, Qt::ClipOperation op)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: clip rect:" << rect << "op:" << op;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_ClipRect, (int *) &rect, 4, 1);
- cmd->extra = op;
-}
-
-void QPaintBufferEngine::clip(const QRegion &region, Qt::ClipOperation op)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: clip region br:" << region.boundingRect() << "op:" << op;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_ClipRegion, QVariant(region));
- cmd->extra = op;
-}
-
-void QPaintBufferEngine::clip(const QPainterPath &path, Qt::ClipOperation op)
-{
- // ### TODO
-// QPaintBufferCommand *cmd =
-// buffer->addCommand(QPaintBufferPrivate::Cmd_ClipPath, QVariant(path));
-// cmd->extra = op;
- QPaintEngineEx::clip(path, op);
-}
-
-void QPaintBufferEngine::clipEnabledChanged()
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: clip enable change" << state()->clipEnabled;
-#endif
-
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetClipEnabled, state()->clipEnabled);
-}
-
-void QPaintBufferEngine::penChanged()
-{
- const QPen &pen = state()->pen;
-
- if (!buffer->commands.isEmpty()
- && buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetPen) {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: penChanged (compressed)" << state()->pen;
-#endif
- buffer->variants[buffer->commands.last().offset] = pen;
- return;
- }
-
- if (buffer->calculateBoundingRect) {
- if (pen.style() == Qt::NoPen) {
- buffer->penWidthAdjustment = 0;
- } else {
- qreal penWidth = (pen.widthF() == 0) ? 1 : pen.widthF();
- QPointF transformedWidth(penWidth, penWidth);
- if (!qt_pen_is_cosmetic(pen, state()->renderHints))
- transformedWidth = painter()->transform().map(transformedWidth);
- buffer->penWidthAdjustment = transformedWidth.x() / 2.0;
- }
- }
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: penChanged" << state()->pen;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetPen, pen);
-}
-
-void QPaintBufferEngine::brushChanged()
-{
- const QBrush &brush = state()->brush;
-
- if (!buffer->commands.isEmpty()
- && buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetBrush) {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: brushChanged (compressed)" << state()->brush;
-#endif
- buffer->variants[buffer->commands.last().offset] = brush;
- return;
- }
-
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: brushChanged" << state()->brush;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetBrush, brush);
-}
-
-void QPaintBufferEngine::brushOriginChanged()
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: brush origin changed" << state()->brushOrigin;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetBrushOrigin, state()->brushOrigin);
-}
-
-void QPaintBufferEngine::opacityChanged()
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: opacity changed" << state()->opacity;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetOpacity, state()->opacity);
-}
-
-void QPaintBufferEngine::compositionModeChanged()
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: composition mode" << state()->composition_mode;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetCompositionMode);
- cmd->extra = state()->composition_mode;
-}
-
-void QPaintBufferEngine::renderHintsChanged()
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: render hints changed" << state()->renderHints;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetRenderHints);
- cmd->extra = state()->renderHints;
-}
-
-void QPaintBufferEngine::transformChanged()
-{
- Q_D(QPaintBufferEngine);
- const QTransform &transform = state()->matrix;
-
- QTransform delta;
-
- bool invertible = false;
- if (transform.type() <= QTransform::TxScale && transform.type() == d->last.type())
- delta = transform * d->last.inverted(&invertible);
-
- d->last = transform;
-
- if (invertible && delta.type() == QTransform::TxNone)
- return;
-
- if (invertible && delta.type() == QTransform::TxTranslate) {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: transformChanged (translate only) " << state()->matrix;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_Translate);
-
- qreal data[] = { delta.dx(), delta.dy() };
- cmd->extra = buffer->addData((qreal *) data, 2);
- return;
- }
-
- // ### accumulate, like in QBrush case...
- if (!buffer->commands.isEmpty()
- && buffer->commands.last().id == QPaintBufferPrivate::Cmd_SetTransform) {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: transformChanged (compressing) " << state()->matrix;
-#endif
- buffer->variants[buffer->commands.last().offset] = state()->matrix;
- return;
- }
-
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: transformChanged:" << state()->matrix;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_SetTransform, state()->matrix);
-}
-
-void QPaintBufferEngine::backgroundModeChanged()
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintEngineBuffer: background mode changed" << state()->bgMode;
-#endif
- QPaintBufferCommand *cmd = buffer->addCommand(QPaintBufferPrivate::Cmd_SetBackgroundMode);
- cmd->extra = state()->bgMode;
-}
-
-void QPaintBufferEngine::draw(const QVectorPath &path)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: draw vpath:" << path.elementCount();
-#endif
-
- bool hasBrush = qbrush_style(state()->brush) != Qt::NoBrush;
- bool hasPen = qpen_style(state()->pen) != Qt::NoPen
- && qbrush_style(qpen_brush(state()->pen)) != Qt::NoBrush;
-
- if (hasPen || hasBrush)
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawVectorPath, path);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- else
- qDebug() << " - no pen or brush active, discarded...\n";
-#endif
-
-// if (buffer->calculateBoundingRect) {
-// QRealRect r = path.controlPointRect();
-// buffer->updateBoundingRect(QRectF(r.x1, r.y1, r.x2 - r.x1, r.y2 - r.y1));
-// }
-}
-
-void QPaintBufferEngine::fill(const QVectorPath &path, const QBrush &brush)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: fill vpath:" << path.elementCount() << brush;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_FillVectorPath, path);
- cmd->extra = buffer->addData(QVariant(brush));
-// if (buffer->calculateBoundingRect) {
-// QRealRect r = path.controlPointRect();
-// buffer->updateBoundingRect(QRectF(r.x1, r.y1, r.x2 - r.x1, r.y2 - r.y1));
-// }
-}
-
-void QPaintBufferEngine::stroke(const QVectorPath &path, const QPen &pen)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: stroke vpath:" << path.elementCount() << pen;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_StrokeVectorPath, path);
- cmd->extra = buffer->addData(QVariant(pen));
-// if (buffer->calculateBoundingRect) {
-// QRealRect r = path.controlPointRect();
-// buffer->updateBoundingRect(QRectF(r.x1, r.y1, r.x2 - r.x1, r.y2 - r.y1));
-// }
-}
-
-void QPaintBufferEngine::fillRect(const QRectF &rect, const QBrush &brush)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: fillRect brush:" << rect << brush;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_FillRectBrush, (qreal *) &rect, 4, 1);
- cmd->extra = buffer->addData(brush);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(rect);
-}
-
-void QPaintBufferEngine::fillRect(const QRectF &rect, const QColor &color)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: fillRect color:" << rect << color;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_FillRectColor, (qreal *) &rect, 4, 1);
- cmd->extra = buffer->addData(color);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(rect);
-}
-
-void QPaintBufferEngine::drawRects(const QRect *rects, int rectCount)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawRectsI:" << rectCount;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawRectI, (int *) rects, 4 * rectCount, rectCount);
- cmd->extra = rectCount;
-
- if (buffer->calculateBoundingRect) {
- if (rectCount == 1) {
- buffer->updateBoundingRect(rects[0]);
- } else {
- int min_x = rects[0].left();
- int min_y = rects[0].top();
- int max_x = rects[0].left() + rects[0].width();
- int max_y = rects[0].top() + rects[0].height();
- for (int i=1; i< rectCount; ++i) {
- if (rects[i].left() < min_x)
- min_x = rects[i].left();
- if (rects[i].top() < min_y)
- min_y = rects[i].top();
- if (rects[i].right() > max_x)
- max_x = rects[i].left() + rects[i].width();
- if (rects[i].bottom() > max_y)
- max_y = rects[i].top() + rects[i].height();
-
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
- }
-}
-
-void QPaintBufferEngine::drawRects(const QRectF *rects, int rectCount)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawRectsF:" << rectCount;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawRectF, (qreal *) rects, 4 * rectCount, rectCount);
- cmd->extra = rectCount;
-
- if (buffer->calculateBoundingRect) {
- if (rectCount == 1) {
- buffer->updateBoundingRect(rects[0]);
- } else {
- qreal min_x = rects[0].left();
- qreal min_y = rects[0].top();
- qreal max_x = rects[0].right();
- qreal max_y = rects[0].bottom();
- for (int i=1; i< rectCount; ++i) {
- if (rects[i].left() < min_x)
- min_x = rects[i].left();
- if (rects[i].top() < min_y)
- min_y = rects[i].top();
- if (rects[i].right() > max_x)
- max_x = rects[i].right();
- if (rects[i].bottom() > max_y)
- max_y = rects[i].bottom();
-
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
- }
-}
-
-void QPaintBufferEngine::drawLines(const QLine *lines, int lineCount)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawLinesI:" << lineCount;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawLineI, (int *) lines, 4 * lineCount, lineCount);
- cmd->extra = lineCount;
-
- if (buffer->calculateBoundingRect) {
- int min_x = lines[0].p1().x();
- int min_y = lines[0].p1().y();
- int max_x = lines[0].p2().x();
- int max_y = lines[0].p2().y();
- if (min_x > max_x)
- qSwap(min_x, max_x);
- if (min_y > max_y)
- qSwap(min_y, max_y);
- for (int i=1; i < lineCount; ++i) {
- int p1_x = lines[i].p1().x();
- int p1_y = lines[i].p1().y();
- int p2_x = lines[i].p2().x();
- int p2_y = lines[i].p2().y();
- if (p1_x > p2_x) {
- min_x = qMin(p2_x, min_x);
- max_x = qMax(p1_x, max_x);
- } else {
- min_x = qMin(p1_x, min_x);
- max_x = qMax(p2_x, max_x);
- }
- if (p1_y > p2_y) {
- min_y = qMin(p2_y, min_y);
- max_y = qMax(p1_y, max_y);
- } else {
- min_y = qMin(p1_y, min_y);
- max_y = qMax(p2_y, max_y);
- }
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
-}
-
-void QPaintBufferEngine::drawLines(const QLineF *lines, int lineCount)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawLinesF:" << lineCount;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawLineF, (qreal *) lines, 4 * lineCount, lineCount);
- cmd->extra = lineCount;
-
- if (buffer->calculateBoundingRect) {
- qreal min_x = lines[0].p1().x();
- qreal min_y = lines[0].p1().y();
- qreal max_x = lines[0].p2().x();
- qreal max_y = lines[0].p2().y();
- if (min_x > max_x)
- qSwap(min_x, max_x);
- if (min_y > max_y)
- qSwap(min_y, max_y);
- for (int i=1; i < lineCount; ++i) {
- qreal p1_x = lines[i].p1().x();
- qreal p1_y = lines[i].p1().y();
- qreal p2_x = lines[i].p2().x();
- qreal p2_y = lines[i].p2().y();
- if (p1_x > p2_x) {
- min_x = qMin(p2_x, min_x);
- max_x = qMax(p1_x, max_x);
- } else {
- min_x = qMin(p1_x, min_x);
- max_x = qMax(p2_x, max_x);
- }
- if (p1_y > p2_y) {
- min_y = qMin(p2_y, min_y);
- max_y = qMax(p1_y, max_y);
- } else {
- min_y = qMin(p1_y, min_y);
- max_y = qMax(p2_y, max_y);
- }
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
-}
-
-void QPaintBufferEngine::drawEllipse(const QRectF &r)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawEllipseF:" << r;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawEllipseF, (qreal *) &r, 4, 1);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(r);
-}
-
-void QPaintBufferEngine::drawEllipse(const QRect &r)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawEllipseI:" << r;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawEllipseI, (int *) &r, 4, 1);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(r);
-}
-
-void QPaintBufferEngine::drawPath(const QPainterPath &path)
-{
-// #ifdef QPAINTBUFFER_DEBUG_DRAW
-// qDebug() << "QPaintBufferEngine: drawPath: element count:" << path.elementCount();
-// #endif
-// // ### Path -> QVariant
-// // buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPath, QVariant(path));
- QPaintEngineEx::drawPath(path);
-
-// if (buffer->calculateBoundingRect)
-// buffer->updateBoundingRect(path.boundingRect());
-}
-
-void QPaintBufferEngine::drawPoints(const QPoint *points, int pointCount)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPointsI: " << pointCount;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPointsI, (int *) points, 2 * pointCount, pointCount);
-
- if (buffer->calculateBoundingRect) {
- int min_x = points[0].x();
- int min_y = points[0].y();
- int max_x = points[0].x()+1;
- int max_y = points[0].y()+1;
- for (int i=1; i<pointCount; ++i) {
- int x = points[i].x();
- int y = points[i].y();
- min_x = qMin(min_x, x);
- min_y = qMin(min_y, y);
- max_x = qMax(max_x, x+1);
- max_y = qMax(max_y, y+1);
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
-}
-
-void QPaintBufferEngine::drawPoints(const QPointF *points, int pointCount)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPointsF: " << pointCount;
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPointsF, (qreal *) points, 2 * pointCount, pointCount);
-
- if (buffer->calculateBoundingRect) {
- qreal min_x = points[0].x();
- qreal min_y = points[0].y();
- qreal max_x = points[0].x()+1;
- qreal max_y = points[0].y()+1;
- for (int i=1; i<pointCount; ++i) {
- qreal x = points[i].x();
- qreal y = points[i].y();
- min_x = qMin(min_x, x);
- min_y = qMin(min_y, y);
- max_x = qMax(max_x, x+1);
- max_y = qMax(max_y, y+1);
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
-}
-
-void QPaintBufferEngine::drawPolygon(const QPoint *pts, int count, PolygonDrawMode mode)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPolygonI: size:" << count << ", mode:" << mode;
-#endif
- if (mode == QPaintEngine::OddEvenMode || mode == QPaintEngine::WindingMode) {
- QPaintBufferCommand *cmd = buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPolygonI,
- (int *) pts, 2 * count, count);
- cmd->extra = mode;
- } else if (mode == QPaintEngine::PolylineMode) {
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPolylineI, (int *) pts, 2 * count, count);
- } else {
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawConvexPolygonI, (int *) pts, 2 * count, count);
- }
-
- if (buffer->calculateBoundingRect) {
- int min_x = pts[0].x();
- int min_y = pts[0].y();
- int max_x = pts[0].x();
- int max_y = pts[0].y();
- for (int i=1; i<count; ++i) {
- int x = pts[i].x();
- int y = pts[i].y();
- min_x = qMin(min_x, x);
- min_y = qMin(min_y, y);
- max_x = qMax(max_x, x);
- max_y = qMax(max_y, y);
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
-}
-
-void QPaintBufferEngine::drawPolygon(const QPointF *pts, int count, PolygonDrawMode mode)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPolygonF: size:" << count << ", mode:" << mode;
-#endif
- if (mode == QPaintEngine::OddEvenMode || mode == QPaintEngine::WindingMode) {
- QPaintBufferCommand *cmd = buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPolygonF,
- (qreal *) pts, 2 * count, count);
- cmd->extra = mode;
- } else if (mode == QPaintEngine::PolylineMode) {
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPolylineF, (qreal *) pts, 2 * count, count);
- } else {
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawConvexPolygonF, (qreal *) pts, 2 * count, count);
- }
-
- if (buffer->calculateBoundingRect) {
- qreal min_x = pts[0].x();
- qreal min_y = pts[0].y();
- qreal max_x = pts[0].x();
- qreal max_y = pts[0].y();
- for (int i=1; i<count; ++i) {
- qreal x = pts[i].x();
- qreal y = pts[i].y();
- min_x = qMin(min_x, x);
- min_y = qMin(min_y, y);
- max_x = qMax(max_x, x);
- max_y = qMax(max_y, y);
- }
- buffer->updateBoundingRect(QRectF(min_x, min_y, max_x - min_x, max_y - min_y));
- }
-}
-
-void QPaintBufferEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPixmap: src/dest rects " << r << sr;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPixmapRect, QVariant(pm));
- cmd->extra = buffer->addData((qreal *) &r, 4);
- buffer->addData((qreal *) &sr, 4);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(r);
-}
-
-void QPaintBufferEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawPixmap: pos:" << pos;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPixmapPos, QVariant(pm));
- cmd->extra = buffer->addData((qreal *) &pos, 2);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(QRectF(pos, pm.size()));
-}
-
-static inline QImage qpaintbuffer_storable_image(const QImage &src)
-{
- QImageData *d = const_cast<QImage &>(src).data_ptr();
- return d->own_data ? src : src.copy();
-}
-
-void QPaintBufferEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
- Qt::ImageConversionFlags /*flags */)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawImage: src/dest rects " << r << sr;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawImageRect,
- QVariant(qpaintbuffer_storable_image(image)));
- cmd->extra = buffer->addData((qreal *) &r, 4);
- buffer->addData((qreal *) &sr, 4);
- // ### flags...
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(r);
-}
-
-void QPaintBufferEngine::drawImage(const QPointF &pos, const QImage &image)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawImage: pos:" << pos;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawImagePos,
- QVariant(qpaintbuffer_storable_image(image)));
- cmd->extra = buffer->addData((qreal *) &pos, 2);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(QRectF(pos, image.size()));
-}
-
-void QPaintBufferEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &s)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawTiledPixmap: src rect/offset:" << r << s;
-#endif
- QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawTiledPixmap, QVariant(pm));
- cmd->extra = buffer->addData((qreal *) &r, 4);
- buffer->addData((qreal *) &s, 2);
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(r);
-}
-
-void QPaintBufferEngine::drawStaticTextItem(QStaticTextItem *staticTextItem)
-{
- if (staticTextItem->usesRawFont) {
- QPaintEngineEx::drawStaticTextItem(staticTextItem); // Draw as path
- return;
- }
-
- QVariantList variants;
-
- variants << QVariant(staticTextItem->font);
- for (int i=0; i<staticTextItem->numGlyphs; ++i) {
- variants.append(staticTextItem->glyphs[i]);
- variants.append(staticTextItem->glyphPositions[i].toPointF());
- }
-
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawStaticText, QVariant(variants));
-}
-
-void QPaintBufferEngine::drawTextItem(const QPointF &pos, const QTextItem &ti)
-{
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: drawTextItem: pos:" << pos << ti.text();
-#endif
- if (m_stream_raw_text_items) {
- QPaintBufferCommand *cmd = buffer->addCommand(QPaintBufferPrivate::Cmd_DrawTextItem, QVariant::fromValue<void *>(new QTextItemIntCopy(ti)));
-
- QFont font(ti.font());
- font.setUnderline(false);
- font.setStrikeOut(false);
- font.setOverline(false);
-
- const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
- qreal justificationWidth = 0;
- if (si.justified)
- justificationWidth = si.width.toReal();
- int renderFlags = ti.renderFlags();
- qreal scaleFactor = font.d->dpi/qreal(qt_defaultDpiY());
-
- buffer->addData(QVariant(font));
- cmd->extra = buffer->addData((qreal *) &pos, 2);
- buffer->addData((qreal *) &justificationWidth, 1);
- buffer->addData((qreal *) &scaleFactor, 1);
- cmd->offset2 = buffer->addData((int *) &renderFlags, 1);
- } else {
- QList<QVariant> variants;
- variants << QVariant(ti.font()) << QVariant(ti.text());
- QPaintBufferCommand *cmd = buffer->addCommand(QPaintBufferPrivate::Cmd_DrawText, QVariant(variants));
- cmd->extra = buffer->addData((qreal *) &pos, 2);
- }
-
- if (buffer->calculateBoundingRect)
- buffer->updateBoundingRect(QRectF(pos, QSize(ti.width(), ti.ascent() + ti.descent() + 1)));
-}
-
-
-void QPaintBufferEngine::setState(QPainterState *s)
-{
- Q_D(QPaintBufferEngine);
- if (m_begin_detected) {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: setState: begin, ignoring.";
-#endif
- m_begin_detected = false;
- } else if (m_save_detected) {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: setState: save.";
-#endif
- m_save_detected = false;
- buffer->addCommand(QPaintBufferPrivate::Cmd_Save);
- } else {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << "QPaintBufferEngine: setState: restore.";
-#endif
- buffer->addCommand(QPaintBufferPrivate::Cmd_Restore);
- }
-
- d->last = s->matrix;
-
- QPaintEngineEx::setState(s);
-}
-
-
-/***********************************************************************
- *
- * class QPaintBufferPlayback_Painter
- *
- */
-
-// QFakeDevice is used to create fonts with a custom DPI
-//
-class QFakeDevice : public QPaintDevice
-{
-public:
- QFakeDevice() { dpi_x = qt_defaultDpiX(); dpi_y = qt_defaultDpiY(); }
- void setDpiX(int dpi) { dpi_x = dpi; }
- void setDpiY(int dpi) { dpi_y = dpi; }
- QPaintEngine *paintEngine() const { return 0; }
- int metric(PaintDeviceMetric m) const
- {
- switch(m) {
- case PdmPhysicalDpiX:
- case PdmDpiX:
- return dpi_x;
- case PdmPhysicalDpiY:
- case PdmDpiY:
- return dpi_y;
- default:
- return QPaintDevice::metric(m);
- }
- }
-
-private:
- int dpi_x;
- int dpi_y;
-};
-
-
-void QPainterReplayer::setupTransform(QPainter *_painter)
-{
- painter = _painter;
- m_world_matrix = painter->transform();
- m_world_matrix.scale(qreal(painter->device()->logicalDpiX()) / qreal(qt_defaultDpiX()),
- qreal(painter->device()->logicalDpiY()) / qreal(qt_defaultDpiY()));
- painter->setTransform(m_world_matrix);
-}
-
-void QPainterReplayer::processCommands(const QPaintBuffer &buffer, QPainter *p, int begin, int end)
-{
- d = buffer.d_ptr;
- painter = p;
-
- for (int cmdIndex = begin; cmdIndex < end; ++cmdIndex) {
- const QPaintBufferCommand &cmd = d->commands.at(cmdIndex);
- process(cmd);
- }
-}
-
-void QPaintBuffer::beginNewFrame()
-{
- if (!d_ptr->commands.isEmpty())
- d_ptr->frames << d_ptr->commands.size();
-}
-
-int QPaintBuffer::numFrames() const
-{
- return d_ptr->frames.size() + 1;
-}
-
-void QPainterReplayer::process(const QPaintBufferCommand &cmd)
-{
- switch (cmd.id) {
- case QPaintBufferPrivate::Cmd_Save: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_Save";
-#endif
- painter->save();
- break; }
-
- case QPaintBufferPrivate::Cmd_Restore: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_Restore";
-#endif
- painter->restore();
- break; }
-
- case QPaintBufferPrivate::Cmd_SetPen: {
- QPen pen = qvariant_cast<QPen>(d->variants.at(cmd.offset));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetPen: " << pen;
-#endif
- painter->setPen(pen);
- break; }
-
- case QPaintBufferPrivate::Cmd_SetBrush: {
- QBrush brush = qvariant_cast<QBrush>(d->variants.at(cmd.offset));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetBrush: " << brush;
-#endif
- painter->setBrush(brush);
- break; }
-
- case QPaintBufferPrivate::Cmd_SetBrushOrigin: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetBrushOrigin: " << d->variants.at(cmd.offset).toPointF();
-#endif
- painter->setBrushOrigin(d->variants.at(cmd.offset).toPointF());
- break; }
-
- case QPaintBufferPrivate::Cmd_SetTransform: {
- QTransform xform = qvariant_cast<QTransform>(d->variants.at(cmd.offset));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetTransform, offset: " << cmd.offset << xform;
-#endif
- painter->setTransform(xform * m_world_matrix);
- break; }
-
- case QPaintBufferPrivate::Cmd_Translate: {
- QPointF delta(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_Translate, offset: " << cmd.offset << delta;
-#endif
- painter->translate(delta.x(), delta.y());
- return;
- }
-
- case QPaintBufferPrivate::Cmd_SetCompositionMode: {
- QPainter::CompositionMode mode = (QPainter::CompositionMode) cmd.extra;
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetCompositionMode, mode: " << mode;
-#endif
- painter->setCompositionMode(mode);
- break; }
-
- case QPaintBufferPrivate::Cmd_SetRenderHints: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetRenderHints, hints: " << cmd.extra;
-#endif
- QPainter::RenderHints ph = painter->renderHints();
- QPainter::RenderHints nh = (QPainter::RenderHints) cmd.extra;
- QPainter::RenderHints xored = ph ^ nh;
- if (xored & QPainter::Antialiasing)
- painter->setRenderHint(QPainter::Antialiasing, nh & QPainter::Antialiasing);
- if (xored & QPainter::HighQualityAntialiasing)
- painter->setRenderHint(QPainter::HighQualityAntialiasing, nh & QPainter::HighQualityAntialiasing);
- if (xored & QPainter::TextAntialiasing)
- painter->setRenderHint(QPainter::TextAntialiasing, nh & QPainter::TextAntialiasing);
- if (xored & QPainter::SmoothPixmapTransform)
- painter->setRenderHint(QPainter::SmoothPixmapTransform, nh & QPainter::SmoothPixmapTransform);
- if (xored & QPainter::NonCosmeticDefaultPen)
- painter->setRenderHint(QPainter::NonCosmeticDefaultPen, nh & QPainter::NonCosmeticDefaultPen);
- if (xored & QPainter::Qt4CompatiblePainting)
- painter->setRenderHint(QPainter::Qt4CompatiblePainting, nh & QPainter::Qt4CompatiblePainting);
- break; }
-
- case QPaintBufferPrivate::Cmd_SetOpacity: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetOpacity: " << d->variants.at(cmd.offset).toDouble();
-#endif
- painter->setOpacity(d->variants.at(cmd.offset).toDouble());
- break; }
-
- case QPaintBufferPrivate::Cmd_SetBackgroundMode: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetBackgroundMode: " << cmd.extra;
-#endif
- painter->setBackgroundMode((Qt::BGMode)cmd.extra);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawVectorPath: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2;
-#endif
- QVectorPathCmd path(d, cmd);
- painter->drawPath(path().convertToPainterPath());
- break; }
-
- case QPaintBufferPrivate::Cmd_StrokeVectorPath: {
- QPen pen = qvariant_cast<QPen>(d->variants.at(cmd.extra));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_StrokeVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2;
-#endif
- QVectorPathCmd path(d, cmd);
- painter->strokePath(path().convertToPainterPath(), pen);
- break; }
-
- case QPaintBufferPrivate::Cmd_FillVectorPath: {
- QBrush brush = qvariant_cast<QBrush>(d->variants.at(cmd.extra));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_FillVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2 << brush;
-#endif
- QVectorPathCmd path(d, cmd);
- painter->fillPath(path().convertToPainterPath(), brush);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolygonF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPolygonF, offset: " << cmd.offset << " size: " << cmd.size
- << " mode: " << cmd.extra
- << d->floats.at(cmd.offset)
- << d->floats.at(cmd.offset+1);
-#endif
- Qt::FillRule fill = (QPaintEngine::PolygonDrawMode) cmd.extra == QPaintEngine::OddEvenMode
- ? Qt::OddEvenFill : Qt::WindingFill;
- painter->drawPolygon((QPointF *) (d->floats.constData() + cmd.offset), cmd.size, fill);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolygonI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPolygonI, offset: " << cmd.offset << " size: " << cmd.size
- << " mode: " << cmd.extra
- << d->ints.at(cmd.offset)
- << d->ints.at(cmd.offset+1);
-#endif
- Qt::FillRule fill = (QPaintEngine::PolygonDrawMode) cmd.extra == QPaintEngine::OddEvenMode
- ? Qt::OddEvenFill : Qt::WindingFill;
- painter->drawPolygon((QPoint *) (d->ints.constData() + cmd.offset), cmd.size, fill);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolylineF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPolylineF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawPolyline((QPointF *) (d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolylineI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPolylineI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawPolyline((QPoint *) (d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawConvexPolygonF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawConvexPolygonF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawConvexPolygon((QPointF *) (d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawConvexPolygonI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawConvexPolygonI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawConvexPolygon((QPoint *) (d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawEllipseF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawEllipseF, offset: " << cmd.offset;
-#endif
- painter->drawEllipse(*(QRectF *)(d->floats.constData() + cmd.offset));
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawEllipseI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawEllipseI, offset: " << cmd.offset;
-#endif
- painter->drawEllipse(*(QRect *)(d->ints.constData() + cmd.offset));
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawLineF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawLineF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawLines((QLineF *)(d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawLineI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawLineI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawLines((QLine *)(d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPointsF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPointsF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawPoints((QPointF *)(d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPointsI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPointsI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- painter->drawPoints((QPoint *)(d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPixmapRect: {
- QPixmap pm(d->variants.at(cmd.offset).value<QPixmap>());
- QRectF r(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1),
- d->floats.at(cmd.extra+2), d->floats.at(cmd.extra+3));
-
- QRectF sr(d->floats.at(cmd.extra+4), d->floats.at(cmd.extra+5),
- d->floats.at(cmd.extra+6), d->floats.at(cmd.extra+7));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPixmapRect:" << r << sr;
-#endif
- painter->drawPixmap(r, pm, sr);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPixmapPos: {
- QPixmap pm(d->variants.at(cmd.offset).value<QPixmap>());
- QPointF pos(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawPixmapPos:" << pos;
-#endif
- painter->drawPixmap(pos, pm);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawTiledPixmap: {
- QPixmap pm(d->variants.at(cmd.offset).value<QPixmap>());
- QRectF r(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1),
- d->floats.at(cmd.extra+2), d->floats.at(cmd.extra+3));
-
- QPointF offset(d->floats.at(cmd.extra+4), d->floats.at(cmd.extra+5));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawTiledPixmap:" << r << offset;
-#endif
- painter->drawTiledPixmap(r, pm, offset);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawImageRect: {
- QImage image(d->variants.at(cmd.offset).value<QImage>());
- QRectF r(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1),
- d->floats.at(cmd.extra+2), d->floats.at(cmd.extra+3));
- QRectF sr(d->floats.at(cmd.extra+4), d->floats.at(cmd.extra+5),
- d->floats.at(cmd.extra+6), d->floats.at(cmd.extra+7));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawImageRect:" << r << sr;
-#endif
- painter->drawImage(r, image, sr);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawImagePos: {
- QImage image(d->variants.at(cmd.offset).value<QImage>());
- QPointF pos(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawImagePos:" << pos;
-#endif
- painter->drawImage(pos, image);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawRectF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawRectF, offset: " << cmd.offset;
-#endif
- painter->drawRects((QRectF *)(d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawRectI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawRectI, offset: " << cmd.offset;
-#endif
- painter->drawRects((QRect *)(d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_FillRectBrush: {
- QBrush brush = qvariant_cast<QBrush>(d->variants.at(cmd.extra));
- QRectF *rect = (QRectF *)(d->floats.constData() + cmd.offset);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_FillRectBrush, offset: " << cmd.offset << " rect: " << *rect << " brush: " << brush;
-#endif
- painter->fillRect(*rect, brush);
- break; }
-
- case QPaintBufferPrivate::Cmd_FillRectColor: {
- QColor color = qvariant_cast<QColor>(d->variants.at(cmd.extra));
- QRectF *rect = (QRectF *)(d->floats.constData() + cmd.offset);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_FillRectBrush, offset: " << cmd.offset << " rect: " << *rect << " color: " << color;
-#endif
- painter->fillRect(*rect, color);
- break; }
-
- case QPaintBufferPrivate::Cmd_SetClipEnabled: {
- bool clipEnabled = d->variants.at(cmd.offset).toBool();
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SetClipEnabled:" << clipEnabled;
-#endif
- painter->setClipping(clipEnabled);
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipVectorPath: {
- QVectorPathCmd path(d, cmd);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_ClipVectorPath:" << path().elementCount();
-#endif
- painter->setClipPath(path().convertToPainterPath(), Qt::ClipOperation(cmd.extra));
- break; }
-
-
- case QPaintBufferPrivate::Cmd_ClipRect: {
- QRect rect(QPoint(d->ints.at(cmd.offset), d->ints.at(cmd.offset + 1)),
- QPoint(d->ints.at(cmd.offset + 2), d->ints.at(cmd.offset + 3)));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_ClipRect:" << rect << cmd.extra;
-#endif
- painter->setClipRect(rect, Qt::ClipOperation(cmd.extra));
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipRegion: {
- QRegion region(d->variants.at(cmd.offset).value<QRegion>());
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_ClipRegion:" << region.boundingRect() << cmd.extra;
-#endif
- painter->setClipRegion(region, Qt::ClipOperation(cmd.extra));
- break; }
-
-#if !defined(QT_NO_RAWFONT)
- case QPaintBufferPrivate::Cmd_DrawStaticText: {
-
- QVariantList variants(d->variants.at(cmd.offset).value<QVariantList>());
-
- QFont font = variants.at(0).value<QFont>();
-
- QVector<quint32> glyphIndexes;
- QVector<QPointF> positions;
-
- for (int i=0; i<(variants.size() - 1) / 2; ++i) {
- glyphIndexes.append(variants.at(i*2 + 1).toUInt());
- positions.append(variants.at(i*2 + 2).toPointF());
- }
-
- painter->setFont(font);
-
- QGlyphRun glyphs;
- glyphs.setRawFont(QRawFont::fromFont(font, QFontDatabase::Any));
- glyphs.setGlyphIndexes(glyphIndexes);
- glyphs.setPositions(positions);
-
- painter->drawGlyphRun(QPointF(), glyphs);
- break;
- }
-#endif
-
- case QPaintBufferPrivate::Cmd_DrawText: {
- QPointF pos(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
- QList<QVariant> variants(d->variants.at(cmd.offset).value<QList<QVariant> >());
-
- QFont font(variants.at(0).value<QFont>());
- QString text(variants.at(1).value<QString>());
-
- painter->setFont(font);
- painter->drawText(pos, text);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawTextItem: {
- QPointF pos(d->floats.at(cmd.extra), d->floats.at(cmd.extra+1));
- QTextItemIntCopy *tiCopy = reinterpret_cast<QTextItemIntCopy *>(qvariant_cast<void *>(d->variants.at(cmd.offset)));
- QTextItemInt &ti = (*tiCopy)();
- QString text(ti.text());
-
- QFont font(ti.font());
- font.setUnderline(false);
- font.setStrikeOut(false);
- font.setOverline(false);
-
- const QTextItemInt &si = static_cast<const QTextItemInt &>(ti);
- qreal justificationWidth = 0;
- if (si.justified)
- justificationWidth = si.width.toReal();
- qreal scaleFactor = font.d->dpi/qreal(qt_defaultDpiY());
-
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_DrawTextItem:" << pos << " " << text << " " << scaleFactor;
-#endif
-
- if (scaleFactor != 1.0) {
- QFont fnt(font);
- QFakeDevice fake;
- fake.setDpiX(qRound(scaleFactor*qt_defaultDpiX()));
- fake.setDpiY(qRound(scaleFactor*qt_defaultDpiY()));
- font = QFont(fnt, &fake);
- }
-
- int flags = Qt::TextSingleLine | Qt::TextDontClip | Qt::TextForceLeftToRight;
- QSizeF size(1, 1);
- if (justificationWidth > 0) {
- size.setWidth(justificationWidth);
- flags |= Qt::TextJustificationForced;
- flags |= Qt::AlignJustify;
- }
-
- QFontMetrics fm(font);
- QPointF pt(pos.x(), pos.y() - fm.ascent());
- qt_format_text(font, QRectF(pt, size), flags, /*opt*/0,
- text, /*brect=*/0, /*tabstops=*/0, /*...*/0, /*tabarraylen=*/0, painter);
- break; }
- case QPaintBufferPrivate::Cmd_SystemStateChanged: {
- QRegion systemClip(d->variants.at(cmd.offset).value<QRegion>());
-
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> Cmd_SystemStateChanged:" << systemClip;
-#endif
-
- painter->paintEngine()->setSystemClip(systemClip);
- painter->paintEngine()->d_ptr->systemStateChanged();
- break; }
- }
-}
-
-void QPaintEngineExReplayer::process(const QPaintBufferCommand &cmd)
-{
- Q_ASSERT(painter->paintEngine()->isExtended());
- QPaintEngineEx *xengine = static_cast<QPaintEngineEx *>(painter->paintEngine());
-
- switch (cmd.id) {
- case QPaintBufferPrivate::Cmd_SetBrushOrigin: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_SetBrushOrigin: " << d->variants.at(cmd.offset).toPointF();
-#endif
- xengine->state()->brushOrigin = d->variants.at(cmd.offset).toPointF();
- xengine->brushOriginChanged();
- break; }
-
- case QPaintBufferPrivate::Cmd_SetCompositionMode: {
- QPainter::CompositionMode mode = (QPainter::CompositionMode) cmd.extra;
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_SetCompositionMode, mode: " << mode;
-#endif
- xengine->state()->composition_mode = mode;
- xengine->compositionModeChanged();
- break; }
-
- case QPaintBufferPrivate::Cmd_SetOpacity: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_SetOpacity: " << d->variants.at(cmd.offset).toDouble();
-#endif
- xengine->state()->opacity = d->variants.at(cmd.offset).toDouble();
- xengine->opacityChanged();
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawVectorPath: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2;
-#endif
- QVectorPathCmd path(d, cmd);
- xengine->draw(path());
- break; }
-
- case QPaintBufferPrivate::Cmd_StrokeVectorPath: {
- QPen pen = qvariant_cast<QPen>(d->variants.at(cmd.extra));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_StrokeVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2;
-#endif
- QVectorPathCmd path(d, cmd);
- xengine->stroke(path(), pen);
- break; }
-
- case QPaintBufferPrivate::Cmd_FillVectorPath: {
- QBrush brush = qvariant_cast<QBrush>(d->variants.at(cmd.extra));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_FillVectorPath: size: " << cmd.size
-// << ", hints:" << d->ints[cmd.offset2+cmd.size]
- << "pts/elms:" << cmd.offset << cmd.offset2 << brush;
-#endif
- QVectorPathCmd path(d, cmd);
- xengine->fill(path(), brush);
- break; }
-
- case QPaintBufferPrivate::Cmd_FillRectBrush: {
- QBrush brush = qvariant_cast<QBrush>(d->variants.at(cmd.extra));
- QRectF *rect = (QRectF *)(d->floats.constData() + cmd.offset);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_FillRectBrush, offset: " << cmd.offset << " rect: " << *rect << " brush: " << brush;
-#endif
- xengine->fillRect(*rect, brush);
- break; }
-
- case QPaintBufferPrivate::Cmd_FillRectColor: {
- QColor color = qvariant_cast<QColor>(d->variants.at(cmd.extra));
- QRectF *rect = (QRectF *)(d->floats.constData() + cmd.offset);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_FillRectBrush, offset: " << cmd.offset << " rect: " << *rect << " color: " << color;
-#endif
- xengine->fillRect(*rect, color);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolygonF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawPolygonF, offset: " << cmd.offset << " size: " << cmd.size
- << " mode: " << cmd.extra
- << d->floats.at(cmd.offset)
- << d->floats.at(cmd.offset+1);
-#endif
- xengine->drawPolygon((QPointF *) (d->floats.constData() + cmd.offset), cmd.size,
- (QPaintEngine::PolygonDrawMode) cmd.extra);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolygonI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawPolygonI, offset: " << cmd.offset << " size: " << cmd.size
- << " mode: " << cmd.extra
- << d->ints.at(cmd.offset)
- << d->ints.at(cmd.offset+1);
-#endif
- xengine->drawPolygon((QPoint *) (d->ints.constData() + cmd.offset), cmd.size,
- (QPaintEngine::PolygonDrawMode) cmd.extra);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawEllipseF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawEllipseF, offset: " << cmd.offset;
-#endif
- xengine->drawEllipse(*(QRectF *)(d->floats.constData() + cmd.offset));
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawEllipseI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawEllipseI, offset: " << cmd.offset;
-#endif
- xengine->drawEllipse(*(QRect *)(d->ints.constData() + cmd.offset));
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawLineF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawLineF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawLines((QLineF *)(d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawLineI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawLineI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawLines((QLine *)(d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPointsF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawPointsF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawPoints((QPointF *)(d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPointsI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawPointsI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawPoints((QPoint *)(d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolylineF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawPolylineF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawPolygon((QPointF *) (d->floats.constData() + cmd.offset), cmd.size, QPaintEngine::PolylineMode);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawPolylineI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawPolylineI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawPolygon((QPoint *) (d->ints.constData() + cmd.offset), cmd.size, QPaintEngine::PolylineMode);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawRectF: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawRectF, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawRects((QRectF *) (d->floats.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_DrawRectI: {
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_DrawRectI, offset: " << cmd.offset << " size: " << cmd.size;
-#endif
- xengine->drawRects((QRect *) (d->ints.constData() + cmd.offset), cmd.size);
- break; }
-
- case QPaintBufferPrivate::Cmd_SetClipEnabled: {
- bool clipEnabled = d->variants.at(cmd.offset).toBool();
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_SetClipEnabled:" << clipEnabled;
-#endif
- xengine->state()->clipEnabled = clipEnabled;
- xengine->clipEnabledChanged();
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipVectorPath: {
- QVectorPathCmd path(d, cmd);
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_ClipVectorPath:" << path().elementCount();
-#endif
- xengine->clip(path(), Qt::ClipOperation(cmd.extra));
- break; }
-
-
- case QPaintBufferPrivate::Cmd_ClipRect: {
- QRect rect(QPoint(d->ints.at(cmd.offset), d->ints.at(cmd.offset + 1)),
- QPoint(d->ints.at(cmd.offset + 2), d->ints.at(cmd.offset + 3)));
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_ClipRect:" << rect << cmd.extra;
-#endif
- xengine->clip(rect, Qt::ClipOperation(cmd.extra));
- break; }
-
- case QPaintBufferPrivate::Cmd_ClipRegion: {
- QRegion region(d->variants.at(cmd.offset).value<QRegion>());
-#ifdef QPAINTBUFFER_DEBUG_DRAW
- qDebug() << " -> ExCmd_ClipRegion:" << region.boundingRect() << cmd.extra;
-#endif
- xengine->clip(region, Qt::ClipOperation(cmd.extra));
- break; }
-
- default:
- QPainterReplayer::process(cmd);
- break;
- }
-}
-
-QDataStream &operator<<(QDataStream &stream, const QPaintBufferCommand &command)
-{
- quint32 id = command.id;
- quint32 size = command.size;
- stream << id << size;
- stream << command.offset << command.offset2 << command.extra;
- return stream;
-}
-
-QDataStream &operator>>(QDataStream &stream, QPaintBufferCommand &command)
-{
- quint32 id;
- quint32 size;
- stream >> id >> size;
- stream >> command.offset >> command.offset2 >> command.extra;
- command.id = id;
- command.size = size;
- return stream;
-}
-
-struct QPaintBufferCacheEntry
-{
- QVariant::Type type;
- quint64 cacheKey;
-};
-
-struct QPaintBufferCacheEntryV2
-{
- enum Type {
- ImageKey,
- PixmapKey
- };
-
- struct Flags {
- uint type : 8;
- uint key : 24;
- };
-
- union {
- Flags flags;
- uint bits;
- };
-};
-
-QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QPaintBufferCacheEntry)
-Q_DECLARE_METATYPE(QPaintBufferCacheEntryV2)
-QT_BEGIN_NAMESPACE
-
-QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntry &entry)
-{
- return stream << entry.type << entry.cacheKey;
-}
-
-QDataStream &operator>>(QDataStream &stream, QPaintBufferCacheEntry &entry)
-{
- return stream >> entry.type >> entry.cacheKey;
-}
-
-QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntryV2 &entry)
-{
- return stream << entry.bits;
-}
-
-QDataStream &operator>>(QDataStream &stream, QPaintBufferCacheEntryV2 &entry)
-{
- return stream >> entry.bits;
-}
-
-static void qRegisterPaintBufferMetaTypes()
-{
- qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntry>();
- qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntryV2>();
-}
-
-Q_CONSTRUCTOR_FUNCTION(qRegisterPaintBufferMetaTypes)
-
-QDataStream &operator<<(QDataStream &stream, const QPaintBuffer &buffer)
-{
- QHash<qint64, uint> pixmapKeys;
- QHash<qint64, uint> imageKeys;
-
- QHash<qint64, QPixmap> pixmaps;
- QHash<qint64, QImage> images;
-
- QVector<QVariant> variants = buffer.d_ptr->variants;
- for (int i = 0; i < variants.size(); ++i) {
- const QVariant &v = variants.at(i);
- if (v.type() == QVariant::Image) {
- const QImage image(v.value<QImage>());
-
- QPaintBufferCacheEntryV2 entry;
- entry.flags.type = QPaintBufferCacheEntryV2::ImageKey;
-
- QHash<qint64, uint>::iterator it = imageKeys.find(image.cacheKey());
- if (it != imageKeys.end()) {
- entry.flags.key = *it;
- } else {
- imageKeys[image.cacheKey()] = entry.flags.key = images.size();
- images[images.size()] = image;
- }
-
- variants[i] = QVariant::fromValue(entry);
- } else if (v.type() == QVariant::Pixmap) {
- const QPixmap pixmap(v.value<QPixmap>());
-
- QPaintBufferCacheEntryV2 entry;
- entry.flags.type = QPaintBufferCacheEntryV2::PixmapKey;
-
- QHash<qint64, uint>::iterator it = pixmapKeys.find(pixmap.cacheKey());
- if (it != pixmapKeys.end()) {
- entry.flags.key = *it;
- } else {
- pixmapKeys[pixmap.cacheKey()] = entry.flags.key = pixmaps.size();
- pixmaps[pixmaps.size()] = pixmap;
- }
-
- variants[i] = QVariant::fromValue(entry);
- }
- }
-
- stream << pixmaps;
- stream << images;
-
- stream << buffer.d_ptr->ints;
- stream << buffer.d_ptr->floats;
- stream << variants;
- stream << buffer.d_ptr->commands;
- stream << buffer.d_ptr->boundingRect;
- stream << buffer.d_ptr->frames;
-
- return stream;
-}
-
-QDataStream &operator>>(QDataStream &stream, QPaintBuffer &buffer)
-{
- QHash<qint64, QPixmap> pixmaps;
- QHash<qint64, QImage> images;
-
- stream >> pixmaps;
- stream >> images;
-
- stream >> buffer.d_ptr->ints;
- stream >> buffer.d_ptr->floats;
- stream >> buffer.d_ptr->variants;
- stream >> buffer.d_ptr->commands;
- stream >> buffer.d_ptr->boundingRect;
- stream >> buffer.d_ptr->frames;
-
- QVector<QVariant> &variants = buffer.d_ptr->variants;
- for (int i = 0; i < variants.size(); ++i) {
- const QVariant &v = variants.at(i);
- if (v.canConvert<QPaintBufferCacheEntry>()) {
- QPaintBufferCacheEntry entry = v.value<QPaintBufferCacheEntry>();
- if (entry.type == QVariant::Image)
- variants[i] = QVariant(images.value(entry.cacheKey));
- else
- variants[i] = QVariant(pixmaps.value(entry.cacheKey));
- } else if (v.canConvert<QPaintBufferCacheEntryV2>()) {
- QPaintBufferCacheEntryV2 entry = v.value<QPaintBufferCacheEntryV2>();
-
- if (entry.flags.type == QPaintBufferCacheEntryV2::ImageKey)
- variants[i] = QVariant(images.value(entry.flags.key));
- else if (entry.flags.type == QPaintBufferCacheEntryV2::PixmapKey)
- variants[i] = QVariant(pixmaps.value(entry.flags.key));
- else
- qWarning() << "operator<<(QDataStream &stream, QPaintBuffer &buffer): unrecognized cache entry type:" << entry.flags.type;
- }
- }
-
- return stream;
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
deleted file mode 100644
index 27add76a98..0000000000
--- a/src/gui/painting/qpaintbuffer_p.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPAINTBUFFER_P_H
-#define QPAINTBUFFER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <qpaintdevice.h>
-
-#include <private/qpaintengineex_p.h>
-#include <private/qtextengine_p.h>
-#include <QDebug>
-
-QT_BEGIN_NAMESPACE
-
-class QPaintBufferPrivate;
-class QPaintBufferPlayback;
-
-class Q_GUI_EXPORT QPaintBuffer : public QPaintDevice
-{
- Q_DECLARE_PRIVATE(QPaintBuffer)
-public:
- QPaintBuffer();
- QPaintBuffer(const QPaintBuffer &other);
- ~QPaintBuffer();
-
- bool isEmpty() const;
-
- void beginNewFrame();
- int numFrames() const;
-
- void draw(QPainter *painter, int frame = 0) const;
-
- int frameStartIndex(int frame) const;
- int frameEndIndex(int frame) const;
- int processCommands(QPainter *painter, int begin, int end) const;
-#ifndef QT_NO_DEBUG_STREAM
- QString commandDescription(int command) const;
-#endif
-
- void setBoundingRect(const QRectF &rect);
- QRectF boundingRect() const;
-
- virtual QPaintEngine *paintEngine() const;
- virtual int metric(PaintDeviceMetric m) const;
- virtual int devType() const;
-
- QPaintBuffer &operator=(const QPaintBuffer &other);
-
-private:
- friend class QPainterReplayer;
- friend class QOpenGLReplayer;
-
- friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &stream, const QPaintBuffer &buffer);
- friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QPaintBuffer &buffer);
-
- QPaintBufferPrivate *d_ptr;
-};
-
-Q_GUI_EXPORT QDataStream &operator<<(QDataStream &stream, const QPaintBuffer &buffer);
-Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QPaintBuffer &buffer);
-
-class QPaintBufferEngine;
-
-class QTextItemIntCopy
-{
-public:
- QTextItemIntCopy(const QTextItem &item);
- ~QTextItemIntCopy();
- QTextItemInt &operator () () {return m_item;}
-private:
- QTextItemInt m_item;
- QFont m_font;
-};
-
-struct QPaintBufferCommand
-{
- uint id : 8;
- uint size : 24;
-
- int offset;
- int offset2;
- int extra;
-};
-
-QDataStream &operator<<(QDataStream &stream, const QPaintBufferCommand &command);
-QDataStream &operator>>(QDataStream &stream, QPaintBufferCommand &command);
-
-Q_DECLARE_TYPEINFO(QPaintBufferCommand, Q_MOVABLE_TYPE);
-
-class QPaintBufferPrivate
-{
-public:
- enum Command {
- Cmd_Save,
- Cmd_Restore,
-
- Cmd_SetBrush,
- Cmd_SetBrushOrigin,
- Cmd_SetClipEnabled,
- Cmd_SetCompositionMode,
- Cmd_SetOpacity,
- Cmd_SetPen,
- Cmd_SetRenderHints,
- Cmd_SetTransform,
- Cmd_SetBackgroundMode,
-
- Cmd_ClipPath,
- Cmd_ClipRect,
- Cmd_ClipRegion,
- Cmd_ClipVectorPath,
-
- Cmd_DrawVectorPath,
- Cmd_FillVectorPath,
- Cmd_StrokeVectorPath,
-
- Cmd_DrawConvexPolygonF,
- Cmd_DrawConvexPolygonI,
- Cmd_DrawEllipseF,
- Cmd_DrawEllipseI,
- Cmd_DrawLineF,
- Cmd_DrawLineI,
- Cmd_DrawPath,
- Cmd_DrawPointsF,
- Cmd_DrawPointsI,
- Cmd_DrawPolygonF,
- Cmd_DrawPolygonI,
- Cmd_DrawPolylineF,
- Cmd_DrawPolylineI,
- Cmd_DrawRectF,
- Cmd_DrawRectI,
-
- Cmd_FillRectBrush,
- Cmd_FillRectColor,
-
- Cmd_DrawText,
- Cmd_DrawTextItem,
-
- Cmd_DrawImagePos,
- Cmd_DrawImageRect,
- Cmd_DrawPixmapPos,
- Cmd_DrawPixmapRect,
- Cmd_DrawTiledPixmap,
-
- Cmd_SystemStateChanged,
- Cmd_Translate,
- Cmd_DrawStaticText,
-
- // new commands must be added above this line
-
- Cmd_LastCommand
- };
-
- QPaintBufferPrivate();
- ~QPaintBufferPrivate();
-
- int addData(const int *data, int count) {
- if (count <= 0)
- return 0;
- int pos = ints.size();
- ints.resize(pos + count);
- memcpy(ints.data() + pos, data, count * sizeof(int));
- return pos;
- }
-
- int addData(const qreal *data, int count) {
- if (count <= 0)
- return 0;
- int pos = floats.size();
- floats.resize(pos + count);
- memcpy(floats.data() + pos, data, count * sizeof(qreal));
- return pos;
- }
-
- int addData(const QVariant &var) {
- variants << var;
- return variants.size() - 1;
- }
-
- QPaintBufferCommand *addCommand(Command command) {
- QPaintBufferCommand cmd;
- cmd.id = command;
- cmd.size = cmd.offset = cmd.offset2 = cmd.extra = 0;
- commands << cmd;
- return &commands.last();
- }
-
- QPaintBufferCommand *addCommand(Command command, const QVariant &var) {
- QPaintBufferCommand cmd;
- cmd.id = command;
- cmd.offset = addData(var);
- cmd.size = cmd.offset2 = cmd.extra = 0;
- commands << cmd;
- return &commands.last();
- }
-
- QPaintBufferCommand *addCommand(Command command, const QVectorPath &path) {
- QPaintBufferCommand cmd;
- cmd.id = command;
- cmd.offset = addData(path.points(), path.elementCount() * 2);
- cmd.offset2 = ints.size();
- ints << path.hints();
- // The absence of path elements is indicated by setting the highest bit in 'cmd.offset2'.
- if (path.elements())
- addData((const int *) path.elements(), path.elementCount());
- else
- cmd.offset2 |= 0x80000000;
- cmd.size = path.elementCount();
- cmd.extra = 0;
- commands << cmd;
- return &commands.last();
- }
-
- QPaintBufferCommand *addCommand(Command command , const qreal *pts, int arrayLength, int elementCount) {
- QPaintBufferCommand cmd;
- cmd.id = command;
- cmd.offset = addData(pts, arrayLength);
- cmd.size = elementCount;
- cmd.offset2 = cmd.extra = 0;
- commands << cmd;
- return &commands.last();
- }
-
- QPaintBufferCommand *addCommand(Command command , const int *pts, int arrayLength, int elementCount) {
- QPaintBufferCommand cmd;
- cmd.id = command;
- cmd.offset = addData(pts, arrayLength);
- cmd.size = elementCount;
- cmd.offset2 = cmd.extra = 0;
- commands << cmd;
- return &commands.last();
- }
-
- inline void updateBoundingRect(const QRectF &rect);
-
- QAtomicInt ref;
-
- QVector<int> ints;
- QVector<qreal> floats;
- QVector<QVariant> variants;
-
- QVector<QPaintBufferCommand> commands;
- QList<int> frames;
-
- QPaintBufferEngine *engine;
- QRectF boundingRect;
- qreal penWidthAdjustment;
- uint calculateBoundingRect : 1;
-
- void *cache;
-};
-
-
-struct QVectorPathCmd
-{
- // The absence of path elements is indicated by setting the highest bit in 'cmd.offset2'.
- QVectorPathCmd(QPaintBufferPrivate *d, const QPaintBufferCommand &cmd)
- : vectorPath(d->floats.constData() + cmd.offset,
- cmd.size,
- cmd.offset2 & 0x80000000
- ? 0
- : (const QPainterPath::ElementType *) (d->ints.constData() + cmd.offset2 + 1),
- *(d->ints.constData() + (cmd.offset2 & 0x7fffffff))) {}
-
- inline const QVectorPath &operator()() const { return vectorPath; }
-
- QVectorPath vectorPath;
-};
-
-
-class Q_GUI_EXPORT QPainterReplayer
-{
-public:
- QPainterReplayer() { }
-
- virtual ~QPainterReplayer() { }
-
- void setupTransform(QPainter *painter);
- virtual void process(const QPaintBufferCommand &cmd);
- void processCommands(const QPaintBuffer &buffer, QPainter *painter, int begin, int end);
-
-protected:
- QPaintBufferPrivate *d;
- QTransform m_world_matrix;
-
- QPainter *painter;
-};
-
-class Q_GUI_EXPORT QPaintEngineExReplayer : public QPainterReplayer
-{
-public:
- QPaintEngineExReplayer() { }
-
- virtual void process(const QPaintBufferCommand &cmd);
-};
-
-class QPaintBufferEnginePrivate;
-
-class QPaintBufferEngine : public QPaintEngineEx
-{
- Q_DECLARE_PRIVATE(QPaintBufferEngine)
-public:
- QPaintBufferEngine(QPaintBufferPrivate *buffer);
-
- virtual bool begin(QPaintDevice *device);
- virtual bool end();
-
- virtual Type type() const { return QPaintEngine::PaintBuffer; }
-
- virtual QPainterState *createState(QPainterState *orig) const;
-
- virtual void draw(const QVectorPath &path);
- virtual void fill(const QVectorPath &path, const QBrush &brush);
- virtual void stroke(const QVectorPath &path, const QPen &pen);
-
- virtual void clip(const QVectorPath &path, Qt::ClipOperation op);
- virtual void clip(const QRect &rect, Qt::ClipOperation op);
- virtual void clip(const QRegion &region, Qt::ClipOperation op);
- virtual void clip(const QPainterPath &path, Qt::ClipOperation op);
-
- virtual void clipEnabledChanged();
- virtual void penChanged();
- virtual void brushChanged();
- virtual void brushOriginChanged();
- virtual void opacityChanged();
- virtual void compositionModeChanged();
- virtual void renderHintsChanged();
- virtual void transformChanged();
- virtual void backgroundModeChanged();
-
- virtual void fillRect(const QRectF &rect, const QBrush &brush);
- virtual void fillRect(const QRectF &rect, const QColor &color);
-
- virtual void drawRects(const QRect *rects, int rectCount);
- virtual void drawRects(const QRectF *rects, int rectCount);
-
- virtual void drawLines(const QLine *lines, int lineCount);
- virtual void drawLines(const QLineF *lines, int lineCount);
-
- virtual void drawEllipse(const QRectF &r);
- virtual void drawEllipse(const QRect &r);
-
- virtual void drawPath(const QPainterPath &path);
-
- virtual void drawPoints(const QPointF *points, int pointCount);
- virtual void drawPoints(const QPoint *points, int pointCount);
-
- virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
- virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode);
-
- virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
- virtual void drawPixmap(const QPointF &pos, const QPixmap &pm);
-
- virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags flags = Qt::AutoColor);
- virtual void drawImage(const QPointF &pos, const QImage &image);
-
- virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
-
- virtual void drawTextItem(const QPointF &pos, const QTextItem &ti);
- virtual void drawStaticTextItem(QStaticTextItem *staticTextItem);
-
- virtual void setState(QPainterState *s);
- virtual uint flags() const {return QPaintEngineEx::DoNotEmulate;}
-
- QPaintBufferPrivate *buffer;
-
- mutable int m_begin_detected : 1;
- mutable int m_save_detected : 1;
- mutable int m_stream_raw_text_items : 1;
- mutable int m_unused : 29;
-
- mutable QPainterState *m_created_state;
-};
-
-QT_END_NAMESPACE
-
-#endif // QPAINTBUFFER_P_H
diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp
index a4daa9841a..36e0bbe223 100644
--- a/src/gui/painting/qpaintdevice.cpp
+++ b/src/gui/painting/qpaintdevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintdevice.h b/src/gui/painting/qpaintdevice.h
index bec89dc379..7c756c66de 100644
--- a/src/gui/painting/qpaintdevice.h
+++ b/src/gui/painting/qpaintdevice.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc
index 150ba10955..8db65af18e 100644
--- a/src/gui/painting/qpaintdevice.qdoc
+++ b/src/gui/painting/qpaintdevice.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index 4e705648f1..6271c8f9e6 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintengine.h b/src/gui/painting/qpaintengine.h
index b56e4eb48c..eeca87ce16 100644
--- a/src/gui/painting/qpaintengine.h
+++ b/src/gui/painting/qpaintengine.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -212,7 +212,7 @@ public:
inline void setDirty(DirtyFlags df);
inline void clearDirty(DirtyFlags df);
- bool hasFeature(PaintEngineFeatures feature) const { return (gccaps & feature) != 0; }
+ bool hasFeature(PaintEngineFeatures feature) const { return gccaps & feature; }
QPainter *painter() const;
@@ -312,7 +312,7 @@ inline void QPaintEngine::fix_neg_rect(int *x, int *y, int *w, int *h)
inline bool QPaintEngine::testDirty(DirtyFlags df) {
Q_ASSERT(state);
- return ((state->dirtyFlags & df) != 0);
+ return state->dirtyFlags & df;
}
inline void QPaintEngine::setDirty(DirtyFlags df) {
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index c5e85cc7c7..a2bab58922 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -531,7 +531,7 @@ void QBlitterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
{
Q_D(QBlitterPaintEngine);
if (path.shape() == QVectorPath::RectangleHint) {
- QRectF rect(((QPointF *) path.points())[0], ((QPointF *) path.points())[2]);
+ QRectF rect(((const QPointF *) path.points())[0], ((const QPointF *) path.points())[2]);
fillRect(rect, brush);
} else {
d->lock();
@@ -602,12 +602,11 @@ void QBlitterPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
d->pmData->blittable()->drawPixmap(targetRect, pm, srcRect);
}
} else if (clipData->hasRegionClip) {
- QVector<QRect> clipRects = clipData->clipRegion.rects();
QRect unclippedTargetRect(x, y, blitWidth, blitHeight);
- QRegion intersectedRects = clipData->clipRegion.intersected(unclippedTargetRect);
-
- for (int i = 0; i < intersectedRects.rects().size(); ++i) {
- QRect targetRect = intersectedRects.rects().at(i);
+ const QVector<QRect> intersectedRects = clipData->clipRegion.intersected(unclippedTargetRect).rects();
+ const int intersectedSize = intersectedRects.size();
+ for (int i = 0; i < intersectedSize; ++i) {
+ const QRect &targetRect = intersectedRects.at(i);
if (!targetRect.isValid() || targetRect.isEmpty())
continue;
int tmpSrcX = srcX + (targetRect.x() - x);
diff --git a/src/gui/painting/qpaintengine_blitter_p.h b/src/gui/painting/qpaintengine_blitter_p.h
index e28c5b9b16..ab44851ec7 100644
--- a/src/gui/painting/qpaintengine_blitter_p.h
+++ b/src/gui/painting/qpaintengine_blitter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintengine_p.h b/src/gui/painting/qpaintengine_p.h
index 312320c2e2..c58662ede4 100644
--- a/src/gui/painting/qpaintengine_p.h
+++ b/src/gui/painting/qpaintengine_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 322bff9b57..18522cb6d0 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -48,7 +48,6 @@
// #include <private/qdatabuffer_p.h>
// #include <private/qpainter_p.h>
-#include <private/qmath_p.h>
#include <private/qtextengine_p.h>
#include <private/qfontengine_p.h>
#include <private/qpixmap_raster_p.h>
@@ -1865,7 +1864,7 @@ void QRasterPaintEngine::fillPolygon(const QPointF *points, int pointCount, Poly
}
// Compose polygon fill..,
- QVectorPath vp((qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
ensureOutlineMapper();
QT_FT_Outline *outline = d->outlineMapper->convertPath(vp);
@@ -1890,7 +1889,7 @@ void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly
#endif
Q_ASSERT(pointCount >= 2);
- if (mode != PolylineMode && QVectorPath::isRect((qreal *) points, pointCount)) {
+ if (mode != PolylineMode && QVectorPath::isRect((const qreal *) points, pointCount)) {
QRectF r(points[0], points[2]);
drawRects(&r, 1);
return;
@@ -1906,7 +1905,7 @@ void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly
// Do the outline...
if (s->penData.blend) {
- QVectorPath vp((qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {
QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped);
stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding);
@@ -1931,7 +1930,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg
qDebug() << " - " << points[i];
#endif
Q_ASSERT(pointCount >= 2);
- if (mode != PolylineMode && QVectorPath::isRect((int *) points, pointCount)) {
+ if (mode != PolylineMode && QVectorPath::isRect((const int *) points, pointCount)) {
QRect r(points[0].x(),
points[0].y(),
points[2].x() - points[0].x(),
@@ -1969,7 +1968,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg
int count = pointCount * 2;
QVarLengthArray<qreal> fpoints(count);
for (int i=0; i<count; ++i)
- fpoints[i] = ((int *) points)[i];
+ fpoints[i] = ((const int *) points)[i];
QVectorPath vp((qreal *) fpoints.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {
@@ -2696,7 +2695,7 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
scanline += bpl;
}
} else { // 32-bit alpha...
- uint *sl = (uint *) scanline;
+ const uint *sl = (const uint *) scanline;
for (int y = y0; y < y1; ++y) {
for (int x = x0; x < x1; ) {
// Skip those with 0 coverage
@@ -4466,7 +4465,7 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
QPointF center = g->center();
conicalData.center.x = center.x();
conicalData.center.y = center.y();
- conicalData.angle = g->angle() * 2 * Q_PI / 360.0;
+ conicalData.angle = qDegreesToRadians(g->angle());
}
break;
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index cee19ab598..4e6e0b2f73 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index f5e6f7cca6..0f80cd18a0 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -521,23 +521,23 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
while (points < lastPoint) {
switch (*types) {
case QPainterPath::MoveToElement: {
- QPointF pt = (*(QPointF *) points) * state()->matrix;
+ QPointF pt = (*(const QPointF *) points) * state()->matrix;
d->activeStroker->moveTo(pt.x(), pt.y());
points += 2;
++types;
break;
}
case QPainterPath::LineToElement: {
- QPointF pt = (*(QPointF *) points) * state()->matrix;
+ QPointF pt = (*(const QPointF *) points) * state()->matrix;
d->activeStroker->lineTo(pt.x(), pt.y());
points += 2;
++types;
break;
}
case QPainterPath::CurveToElement: {
- QPointF c1 = ((QPointF *) points)[0] * state()->matrix;
- QPointF c2 = ((QPointF *) points)[1] * state()->matrix;
- QPointF e = ((QPointF *) points)[2] * state()->matrix;
+ QPointF c1 = ((const QPointF *) points)[0] * state()->matrix;
+ QPointF c2 = ((const QPointF *) points)[1] * state()->matrix;
+ QPointF e = ((const QPointF *) points)[2] * state()->matrix;
d->activeStroker->cubicTo(c1.x(), c1.y(), c2.x(), c2.y(), e.x(), e.y());
points += 6;
types += 3;
@@ -549,16 +549,16 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
}
}
if (path.hasImplicitClose()) {
- QPointF pt = * ((QPointF *) path.points()) * state()->matrix;
+ QPointF pt = * ((const QPointF *) path.points()) * state()->matrix;
d->activeStroker->lineTo(pt.x(), pt.y());
}
} else {
- QPointF p = ((QPointF *)points)[0] * state()->matrix;
+ QPointF p = ((const QPointF *)points)[0] * state()->matrix;
d->activeStroker->moveTo(p.x(), p.y());
points += 2;
while (points < lastPoint) {
- QPointF p = ((QPointF *)points)[0] * state()->matrix;
+ QPointF p = ((const QPointF *)points)[0] * state()->matrix;
d->activeStroker->lineTo(p.x(), p.y());
points += 2;
}
@@ -786,7 +786,7 @@ void QPaintEngineEx::drawLines(const QLine *lines, int lineCount)
qreal pts[64];
int count2 = count<<1;
for (int i=0; i<count2; ++i)
- pts[i] = ((int *) lines)[i];
+ pts[i] = ((const int *) lines)[i];
QVectorPath path(pts, count, qpaintengineex_line_types_16, QVectorPath::LinesHint);
stroke(path, state()->pen);
@@ -802,7 +802,7 @@ void QPaintEngineEx::drawLines(const QLineF *lines, int lineCount)
while (elementCount > 0) {
int count = qMin(elementCount, 32);
- QVectorPath path((qreal *) lines, count, qpaintengineex_line_types_16,
+ QVectorPath path((const qreal *) lines, count, qpaintengineex_line_types_16,
QVectorPath::LinesHint);
stroke(path, state()->pen);
@@ -906,7 +906,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount)
void QPaintEngineEx::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
{
- QVectorPath path((qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath path((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
if (mode == PolylineMode)
stroke(path, state()->pen);
@@ -920,7 +920,7 @@ void QPaintEngineEx::drawPolygon(const QPoint *points, int pointCount, PolygonDr
QVarLengthArray<qreal> pts(count);
for (int i=0; i<count; ++i)
- pts[i] = ((int *) points)[i];
+ pts[i] = ((const int *) points)[i];
QVectorPath path(pts.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h
index b831621a0c..29eea6032e 100644
--- a/src/gui/painting/qpaintengineex_p.h
+++ b/src/gui/painting/qpaintengineex_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -96,36 +96,36 @@ public:
virtual void drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode);
- virtual void drawRects(const QRect *rects, int rectCount);
- virtual void drawRects(const QRectF *rects, int rectCount);
+ virtual void drawRects(const QRect *rects, int rectCount) Q_DECL_OVERRIDE;
+ virtual void drawRects(const QRectF *rects, int rectCount) Q_DECL_OVERRIDE;
- virtual void drawLines(const QLine *lines, int lineCount);
- virtual void drawLines(const QLineF *lines, int lineCount);
+ virtual void drawLines(const QLine *lines, int lineCount) Q_DECL_OVERRIDE;
+ virtual void drawLines(const QLineF *lines, int lineCount) Q_DECL_OVERRIDE;
- virtual void drawEllipse(const QRectF &r);
- virtual void drawEllipse(const QRect &r);
+ virtual void drawEllipse(const QRectF &r) Q_DECL_OVERRIDE;
+ virtual void drawEllipse(const QRect &r) Q_DECL_OVERRIDE;
- virtual void drawPath(const QPainterPath &path);
+ virtual void drawPath(const QPainterPath &path) Q_DECL_OVERRIDE;
- virtual void drawPoints(const QPointF *points, int pointCount);
- virtual void drawPoints(const QPoint *points, int pointCount);
+ virtual void drawPoints(const QPointF *points, int pointCount) Q_DECL_OVERRIDE;
+ virtual void drawPoints(const QPoint *points, int pointCount) Q_DECL_OVERRIDE;
- virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
- virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode);
+ virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE;
+ virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE;
- virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) = 0;
+ virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) Q_DECL_OVERRIDE = 0;
virtual void drawPixmap(const QPointF &pos, const QPixmap &pm);
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags flags = Qt::AutoColor) = 0;
+ Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE = 0;
virtual void drawImage(const QPointF &pos, const QImage &image);
- virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
+ virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) Q_DECL_OVERRIDE;
virtual void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
QFlags<QPainter::PixmapFragmentHint> hints);
- virtual void updateState(const QPaintEngineState &state);
+ virtual void updateState(const QPaintEngineState &state) Q_DECL_OVERRIDE;
virtual void drawStaticTextItem(QStaticTextItem *);
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index de37c5635c..973c9da96c 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -112,11 +112,14 @@ extern bool qHasPixmapTexture(const QBrush &);
static inline bool is_brush_transparent(const QBrush &brush) {
Qt::BrushStyle s = brush.style();
- bool brushBitmap = qHasPixmapTexture(brush)
- ? brush.texture().isQBitmap()
- : (brush.textureImage().depth() == 1);
- return ((s >= Qt::Dense1Pattern && s <= Qt::DiagCrossPattern)
- || (s == Qt::TexturePattern && brushBitmap));
+ if (s != Qt::TexturePattern)
+ return s >= Qt::Dense1Pattern && s <= Qt::DiagCrossPattern;
+ if (qHasPixmapTexture(brush))
+ return brush.texture().isQBitmap() || brush.texture().hasAlphaChannel();
+ else {
+ const QImage texture = brush.textureImage();
+ return texture.hasAlphaChannel() || (texture.depth() == 1 && texture.colorCount() == 0);
+ }
}
static inline bool is_pen_transparent(const QPen &pen) {
@@ -200,11 +203,8 @@ void QPainterPrivate::checkEmulation()
QPainterPrivate::~QPainterPrivate()
{
delete emulationEngine;
- for (int i=0; i<states.size(); ++i)
- delete states.at(i);
-
- if (dummyState)
- delete dummyState;
+ qDeleteAll(states);
+ delete dummyState;
}
@@ -456,7 +456,7 @@ void QPainterPrivate::draw_helper(const QPainterPath &originalPath, DrawOperatio
p.drawPath(originalPath);
#ifndef QT_NO_DEBUG
- static bool do_fallback_overlay = qgetenv("QT_PAINT_FALLBACK_OVERLAY").size() > 0;
+ static bool do_fallback_overlay = !qEnvironmentVariableIsEmpty("QT_PAINT_FALLBACK_OVERLAY");
if (do_fallback_overlay) {
QImage block(8, 8, QImage::Format_ARGB32_Premultiplied);
QPainter pt(&block);
@@ -2720,13 +2720,14 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
Q_D(QPainter);
if (d->extended) {
- if ((!d->state->clipEnabled && op != Qt::NoClip))
- op = Qt::ReplaceClip;
-
if (!d->engine) {
qWarning("QPainter::setClipRect: Painter not active");
return;
}
+ bool simplifyClipOp = (paintEngine()->type() != QPaintEngine::Picture);
+ if (simplifyClipOp && (!d->state->clipEnabled && op != Qt::NoClip))
+ op = Qt::ReplaceClip;
+
qreal right = rect.x() + rect.width();
qreal bottom = rect.y() + rect.height();
qreal pts[] = { rect.x(), rect.y(),
@@ -2777,8 +2778,9 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
qWarning("QPainter::setClipRect: Painter not active");
return;
}
+ bool simplifyClipOp = (paintEngine()->type() != QPaintEngine::Picture);
- if ((!d->state->clipEnabled && op != Qt::NoClip))
+ if (simplifyClipOp && (!d->state->clipEnabled && op != Qt::NoClip))
op = Qt::ReplaceClip;
if (d->extended) {
@@ -2791,7 +2793,7 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
return;
}
- if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
+ if (simplifyClipOp && d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
op = Qt::ReplaceClip;
d->state->clipRegion = rect;
@@ -2835,8 +2837,9 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
qWarning("QPainter::setClipRegion: Painter not active");
return;
}
+ bool simplifyClipOp = (paintEngine()->type() != QPaintEngine::Picture);
- if ((!d->state->clipEnabled && op != Qt::NoClip))
+ if (simplifyClipOp && (!d->state->clipEnabled && op != Qt::NoClip))
op = Qt::ReplaceClip;
if (d->extended) {
@@ -2849,7 +2852,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
return;
}
- if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
+ if (simplifyClipOp && d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
op = Qt::ReplaceClip;
d->state->clipRegion = r;
@@ -3432,8 +3435,7 @@ void QPainter::drawPath(const QPainterPath &path)
\fn void QPainter::drawLine(int x1, int y1, int x2, int y2)
\overload
- Draws a line from (\a x1, \a y1) to (\a x2, \a y2) and sets the
- current pen position to (\a x2, \a y2).
+ Draws a line from (\a x1, \a y1) to (\a x2, \a y2).
*/
/*!
@@ -4624,7 +4626,7 @@ void QPainter::drawLines(const QPointF *pointPairs, int lineCount)
{
Q_ASSERT(sizeof(QLineF) == 2*sizeof(QPointF));
- drawLines((QLineF*)pointPairs, lineCount);
+ drawLines((const QLineF*)pointPairs, lineCount);
}
/*!
@@ -4637,7 +4639,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
{
Q_ASSERT(sizeof(QLine) == 2*sizeof(QPoint));
- drawLines((QLine*)pointPairs, lineCount);
+ drawLines((const QLine*)pointPairs, lineCount);
}
@@ -5563,22 +5565,19 @@ void QPainter::drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun)
fixedPointPositions[i] = QFixedPoint::fromPointF(processedPosition);
}
- d->drawGlyphs(glyphIndexes, fixedPointPositions.data(), count, font, glyphRun.overline(),
- glyphRun.underline(), glyphRun.strikeOut());
+ d->drawGlyphs(glyphIndexes, fixedPointPositions.data(), count, fontD->fontEngine,
+ glyphRun.overline(), glyphRun.underline(), glyphRun.strikeOut());
}
void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positions,
int glyphCount,
- const QRawFont &font, bool overline, bool underline,
+ QFontEngine *fontEngine, bool overline, bool underline,
bool strikeOut)
{
Q_Q(QPainter);
updateState(state);
- QRawFontPrivate *fontD = QRawFontPrivate::get(font);
- QFontEngine *fontEngine = fontD->fontEngine;
-
QFixed leftMost;
QFixed rightMost;
QFixed baseLine;
@@ -6213,7 +6212,7 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const
pen.setWidthF(fe->lineThickness().toReal());
pen.setCapStyle(Qt::FlatCap);
- QLineF line(pos.x(), pos.y(), pos.x() + qFloor(width), pos.y());
+ QLineF line(qFloor(pos.x()), pos.y(), qFloor(pos.x() + width), pos.y());
bool wasCompatiblePainting = painter->renderHints()
& QPainter::Qt4CompatiblePainting;
@@ -7032,7 +7031,7 @@ void QPainter::setRenderHint(RenderHint hint, bool on)
#endif
#ifndef QT_NO_DEBUG
- static const bool antialiasingDisabled = qgetenv("QT_NO_ANTIALIASING").toInt();
+ static const bool antialiasingDisabled = qEnvironmentVariableIntValue("QT_NO_ANTIALIASING");
if (hint == QPainter::Antialiasing && antialiasingDisabled)
return;
#endif
@@ -7463,6 +7462,7 @@ start_lengthVariant:
range.format.setFontUnderline(true);
underlineFormats.append(range);
}
+#ifdef Q_OS_MAC
} else if (hidemnmemonic && *cin == QLatin1Char('(') && l >= 4 &&
cin[1] == QLatin1Char('&') && cin[2] != QLatin1Char('&') &&
cin[3] == QLatin1Char(')')) {
@@ -7474,6 +7474,7 @@ start_lengthVariant:
length -= n + 4;
l -= 4;
continue;
+#endif //Q_OS_MAC
}
*cout = *cin;
++cout;
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index b791d3e908..51776a9642 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index f8dcfbf326..7c32dc1694 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -70,7 +70,7 @@ struct DataPtrContainer {
void *ptr;
};
-inline void *data_ptr(const QTransform &t) { return (DataPtrContainer *) &t; }
+inline const void *data_ptr(const QTransform &t) { return (const DataPtrContainer *) &t; }
inline bool qtransform_fast_equals(const QTransform &a, const QTransform &b) { return data_ptr(a) == data_ptr(b); }
// QPen inline functions...
@@ -226,7 +226,7 @@ public:
#if !defined(QT_NO_RAWFONT)
void drawGlyphs(const quint32 *glyphArray, QFixedPoint *positionArray, int glyphCount,
- const QRawFont &font, bool overline = false, bool underline = false,
+ QFontEngine *fontEngine, bool overline = false, bool underline = false,
bool strikeOut = false);
#endif
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 1931bcdf90..e3c6eabbc3 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 39b65dd1e9..eb32782a96 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h
index de4f169584..c841a0cf4c 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 39c21a2f47..0798418c17 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index 5fc8bbaf09..36330052dd 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp
index c2d95c28d2..974b68d3a8 100644
--- a/src/gui/painting/qpathsimplifier.cpp
+++ b/src/gui/painting/qpathsimplifier.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -38,8 +38,6 @@
#include <QtCore/qpoint.h>
#include <QtCore/qalgorithms.h>
-#include <math.h>
-
#include <private/qopengl_p.h>
#include <private/qrbtree_p.h>
diff --git a/src/gui/painting/qpathsimplifier_p.h b/src/gui/painting/qpathsimplifier_p.h
index 485bac34a1..7befd5b5fd 100644
--- a/src/gui/painting/qpathsimplifier_p.h
+++ b/src/gui/painting/qpathsimplifier_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 9aca4040a5..cc1ad02eee 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -2269,9 +2269,9 @@ int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor,
if (pattern.isEmpty()) {
if (brush.style() != Qt::TexturePattern)
return 0;
- QImage image = brush.texture().toImage();
+ QImage image = brush.textureImage();
bool bitmap = true;
- imageObject = addImage(image, &bitmap, brush.texture().cacheKey());
+ imageObject = addImage(image, &bitmap, image.cacheKey());
if (imageObject != -1) {
QImage::Format f = image.format();
if (f != QImage::Format_MonoLSB && f != QImage::Format_Mono) {
@@ -2322,6 +2322,14 @@ int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor,
return patternObj;
}
+static inline bool is_monochrome(const QVector<QRgb> &colorTable)
+{
+ return colorTable.size() == 2
+ && colorTable.at(0) == QColor(Qt::black).rgba()
+ && colorTable.at(1) == QColor(Qt::white).rgba()
+ ;
+}
+
/*!
* Adds an image to the pdf and return the pdf-object id. Returns -1 if adding the image failed.
*/
@@ -2336,10 +2344,7 @@ int QPdfEnginePrivate::addImage(const QImage &img, bool *bitmap, qint64 serial_n
QImage image = img;
QImage::Format format = image.format();
- if (image.depth() == 1 && *bitmap && img.colorTable().size() == 2
- && img.colorTable().at(0) == QColor(Qt::black).rgba()
- && img.colorTable().at(1) == QColor(Qt::white).rgba())
- {
+ if (image.depth() == 1 && *bitmap && is_monochrome(img.colorTable())) {
if (format == QImage::Format_MonoLSB)
image = image.convertToFormat(QImage::Format_Mono);
format = QImage::Format_Mono;
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index 0fffa608ac..e7ff09cd3b 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -177,26 +177,26 @@ public:
int resolution() const;
// reimplementations QPaintEngine
- bool begin(QPaintDevice *pdev);
- bool end();
+ bool begin(QPaintDevice *pdev) Q_DECL_OVERRIDE;
+ bool end() Q_DECL_OVERRIDE;
- void drawPoints(const QPointF *points, int pointCount);
- void drawLines(const QLineF *lines, int lineCount);
- void drawRects(const QRectF *rects, int rectCount);
- void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
- void drawPath (const QPainterPath & path);
+ void drawPoints(const QPointF *points, int pointCount) Q_DECL_OVERRIDE;
+ void drawLines(const QLineF *lines, int lineCount) Q_DECL_OVERRIDE;
+ void drawRects(const QRectF *rects, int rectCount) Q_DECL_OVERRIDE;
+ void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE;
+ void drawPath (const QPainterPath & path) Q_DECL_OVERRIDE;
- void drawTextItem(const QPointF &p, const QTextItem &textItem);
+ void drawTextItem(const QPointF &p, const QTextItem &textItem) Q_DECL_OVERRIDE;
- void drawPixmap (const QRectF & rectangle, const QPixmap & pixmap, const QRectF & sr);
+ void drawPixmap (const QRectF & rectangle, const QPixmap & pixmap, const QRectF & sr) Q_DECL_OVERRIDE;
void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags flags = Qt::AutoColor);
- void drawTiledPixmap (const QRectF & rectangle, const QPixmap & pixmap, const QPointF & point);
+ Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE;
+ void drawTiledPixmap (const QRectF & rectangle, const QPixmap & pixmap, const QPointF & point) Q_DECL_OVERRIDE;
- void updateState(const QPaintEngineState &state);
+ void updateState(const QPaintEngineState &state) Q_DECL_OVERRIDE;
int metric(QPaintDevice::PaintDeviceMetric metricType) const;
- Type type() const;
+ Type type() const Q_DECL_OVERRIDE;
// end reimplementations QPaintEngine
// Printer stuff...
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index 877a1368b7..ca411ebe08 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h
index 97bf3b5bd3..4367d595bf 100644
--- a/src/gui/painting/qpdfwriter.h
+++ b/src/gui/painting/qpdfwriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index c3bc7964a3..6263d18b01 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -316,7 +316,7 @@ QPen::QPen(const QBrush &brush, qreal width, Qt::PenStyle s, Qt::PenCapStyle c,
Constructs a pen that is a copy of the given \a pen.
*/
-QPen::QPen(const QPen &p)
+QPen::QPen(const QPen &p) Q_DECL_NOTHROW
{
d = p.d;
if (d)
@@ -375,7 +375,7 @@ void QPen::detach()
this pen.
*/
-QPen &QPen::operator=(const QPen &p)
+QPen &QPen::operator=(const QPen &p) Q_DECL_NOTHROW
{
QPen(p).swap(*this);
return *this;
@@ -1026,12 +1026,13 @@ QDebug operator<<(QDebug dbg, const QPen &p)
"CustomDashLine"
};
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QPen(" << p.width() << ',' << p.brush()
<< ',' << PEN_STYLES[p.style()] << ',' << int(p.capStyle())
<< ',' << int(p.joinStyle()) << ',' << p.dashPattern()
<< ',' << p.dashOffset()
<< ',' << p.miterLimit() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qpen.h b/src/gui/painting/qpen.h
index 30f55cd4ce..6ce50ae1d0 100644
--- a/src/gui/painting/qpen.h
+++ b/src/gui/painting/qpen.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -58,18 +58,18 @@ public:
QPen(const QColor &color);
QPen(const QBrush &brush, qreal width, Qt::PenStyle s = Qt::SolidLine,
Qt::PenCapStyle c = Qt::SquareCap, Qt::PenJoinStyle j = Qt::BevelJoin);
- QPen(const QPen &pen);
+ QPen(const QPen &pen) Q_DECL_NOTHROW;
~QPen();
- QPen &operator=(const QPen &pen);
+ QPen &operator=(const QPen &pen) Q_DECL_NOTHROW;
#ifdef Q_COMPILER_RVALUE_REFS
- inline QPen(QPen &&other)
+ QPen(QPen &&other) Q_DECL_NOTHROW
: d(other.d) { other.d = 0; }
- inline QPen &operator=(QPen &&other)
+ QPen &operator=(QPen &&other) Q_DECL_NOTHROW
{ qSwap(d, other.d); return *this; }
#endif
- inline void swap(QPen &other) { qSwap(d, other.d); }
+ void swap(QPen &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
Qt::PenStyle style() const;
void setStyle(Qt::PenStyle);
diff --git a/src/gui/painting/qpen_p.h b/src/gui/painting/qpen_p.h
index 902e0c493c..7e4586af06 100644
--- a/src/gui/painting/qpen_p.h
+++ b/src/gui/painting/qpen_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 76269f6e65..24ea3f4cdd 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,6 +45,8 @@
#ifndef QT_NO_OPENGL
#include <QtGui/private/qopengltextureblitter_p.h>
#endif
+#include <qpa/qplatformgraphicsbuffer.h>
+#include <qpa/qplatformgraphicsbufferhelper.h>
QT_BEGIN_NAMESPACE
@@ -69,7 +71,6 @@ public:
#endif
}
QWindow *window;
- QSize size;
#ifndef QT_NO_OPENGL
mutable GLuint textureId;
mutable QSize textureSize;
@@ -236,7 +237,11 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
{
Q_UNUSED(offset);
- context->makeCurrent(window);
+ if (!context->makeCurrent(window)) {
+ qWarning("composeAndFlush: makeCurrent() failed");
+ return;
+ }
+
QOpenGLFunctions *funcs = context->functions();
funcs->glViewport(0, 0, window->width() * window->devicePixelRatio(), window->height() * window->devicePixelRatio());
funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1);
@@ -267,13 +272,50 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
// semi-transparency even when it is not wanted.
funcs->glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE);
- // Backingstore texture with the normal widgets.
- GLuint textureId = toTexture(deviceRegion(region, window), &d_ptr->textureSize, &d_ptr->needsSwizzle);
+ GLuint textureId = 0;
+ QOpenGLTextureBlitter::Origin origin = QOpenGLTextureBlitter::OriginTopLeft;
+ if (QPlatformGraphicsBuffer *graphicsBuffer = this->graphicsBuffer()) {
+ if (graphicsBuffer->size() != d_ptr->textureSize) {
+ if (d_ptr->textureId)
+ funcs->glDeleteTextures(1, &d_ptr->textureId);
+ funcs->glGenTextures(1, &d_ptr->textureId);
+ funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
+#ifndef QT_OPENGL_ES_2
+ if (!QOpenGLContext::currentContext()->isOpenGLES()) {
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
+ funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+ }
+#endif
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ if (QPlatformGraphicsBufferHelper::lockAndBindToTexture(graphicsBuffer, &d_ptr->needsSwizzle)) {
+ d_ptr->textureSize = graphicsBuffer->size();
+ } else {
+ d_ptr->textureSize = QSize(0,0);
+ }
+
+ graphicsBuffer->unlock();
+ } else if (!region.isEmpty()){
+ funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
+ QPlatformGraphicsBufferHelper::lockAndBindToTexture(graphicsBuffer, &d_ptr->needsSwizzle);
+ }
+
+ if (graphicsBuffer->origin() == QPlatformGraphicsBuffer::OriginBottomLeft)
+ origin = QOpenGLTextureBlitter::OriginBottomLeft;
+ textureId = d_ptr->textureId;
+ } else {
+ // Backingstore texture with the normal widgets.
+ textureId = toTexture(deviceRegion(region, window), &d_ptr->textureSize, &d_ptr->needsSwizzle);
+ }
+
if (textureId) {
QMatrix4x4 target = QOpenGLTextureBlitter::targetTransform(QRect(QPoint(), d_ptr->textureSize), windowRect);
if (d_ptr->needsSwizzle)
d_ptr->blitter->setSwizzleRB(true);
- d_ptr->blitter->blit(textureId, target, QOpenGLTextureBlitter::OriginTopLeft);
+ d_ptr->blitter->blit(textureId, target, origin);
if (d_ptr->needsSwizzle)
d_ptr->blitter->setSwizzleRB(false);
}
@@ -463,6 +505,14 @@ void QPlatformBackingStore::endPaint()
}
/*!
+ Accessor for a backingstores graphics buffer abstraction
+*/
+QPlatformGraphicsBuffer *QPlatformBackingStore::graphicsBuffer() const
+{
+ return Q_NULLPTR;
+}
+
+/*!
Scrolls the given \a area \a dx pixels to the right and \a dy
downward; both \a dx and \a dy may be negative.
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index c69612ca44..df98ebf51b 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -62,6 +62,7 @@ class QPlatformWindow;
class QPlatformTextureList;
class QPlatformTextureListPrivate;
class QOpenGLContext;
+class QPlatformGraphicsBuffer;
#ifndef QT_NO_OPENGL
class Q_GUI_EXPORT QPlatformTextureList : public QObject
@@ -116,6 +117,8 @@ public:
virtual GLuint toTexture(const QRegion &dirtyRegion, QSize *textureSize, bool *needsSwizzle) const;
#endif
+ virtual QPlatformGraphicsBuffer *graphicsBuffer() const;
+
virtual void resize(const QSize &size, const QRegion &staticContents) = 0;
virtual bool scroll(const QRegion &area, int dx, int dy);
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index 75b96d0915..efcc8875a5 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -461,11 +461,12 @@ QRect QPolygon::boundingRect() const
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QPolygon &a)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QPolygon(";
for (int i = 0; i < a.count(); ++i)
dbg.nospace() << a.at(i);
dbg.nospace() << ')';
- return dbg.space();
+ return dbg;
}
#endif
@@ -802,11 +803,12 @@ QDataStream &operator>>(QDataStream &s, QPolygonF &a)
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QPolygonF &a)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QPolygonF(";
for (int i = 0; i < a.count(); ++i)
dbg.nospace() << a.at(i);
dbg.nospace() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index 3c004878ba..ee7d4d31ad 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qpolygonclipper_p.h b/src/gui/painting/qpolygonclipper_p.h
index 1277252df5..082add6d85 100644
--- a/src/gui/painting/qpolygonclipper_p.h
+++ b/src/gui/painting/qpolygonclipper_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qrasterdefs_p.h b/src/gui/painting/qrasterdefs_p.h
index f7ff9aaa67..fbfe0572af 100644
--- a/src/gui/painting/qrasterdefs_p.h
+++ b/src/gui/painting/qrasterdefs_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index a86fcfd977..75bf31cde1 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -712,20 +712,10 @@ static inline bool q26Dot6Compare(qreal p1, qreal p2)
return int((p2 - p1) * 64.) == 0;
}
-static inline qreal qFloorF(qreal v)
-{
-#ifdef QT_USE_MATH_H_FLOATS
- if (sizeof(qreal) == sizeof(float))
- return floorf(v);
- else
-#endif
- return floor(v);
-}
-
static inline QPointF snapTo26Dot6Grid(const QPointF &p)
{
- return QPointF(qFloorF(p.x() * 64) * (1 / qreal(64)),
- qFloorF(p.y() * 64) * (1 / qreal(64)));
+ return QPointF(std::floor(p.x() * 64) * (1 / qreal(64)),
+ std::floor(p.y() * 64) * (1 / qreal(64)));
}
/*
@@ -832,7 +822,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
return;
// adjust width which is given relative to |b - a|
- width *= sqrt(w0 / w);
+ width *= qSqrt(w0 / w);
}
QSpanBuffer buffer(d->blend, d->data, d->clipRect);
diff --git a/src/gui/painting/qrasterizer_p.h b/src/gui/painting/qrasterizer_p.h
index 2801eef6ea..6f6dd994ab 100644
--- a/src/gui/painting/qrasterizer_p.h
+++ b/src/gui/painting/qrasterizer_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index c556edd4c0..19314ef84f 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 79a715d9e9..bab07b5a5d 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h
index 6b0516e557..f7f2185bef 100644
--- a/src/gui/painting/qrgb.h
+++ b/src/gui/painting/qrgb.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -72,18 +72,7 @@ inline Q_DECL_CONSTEXPR int qGray(QRgb rgb) // convert RGB to gra
inline Q_DECL_CONSTEXPR bool qIsGray(QRgb rgb)
{ return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); }
-
-#if Q_PROCESSOR_WORDSIZE == 8 // 64-bit version
-inline QRgb qPremultiply(QRgb x)
-{
- const uint a = qAlpha(x);
- quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
- t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
- t &= 0x000000ff00ff00ff;
- return (uint(t)) | (uint(t >> 24)) | (a << 24);
-}
-#else // 32-bit version
-inline QRgb qPremultiply(QRgb x)
+inline Q_DECL_RELAXED_CONSTEXPR QRgb qPremultiply(QRgb x)
{
const uint a = qAlpha(x);
uint t = (x & 0xff00ff) * a;
@@ -93,10 +82,8 @@ inline QRgb qPremultiply(QRgb x)
x = ((x >> 8) & 0xff) * a;
x = (x + ((x >> 8) & 0xff) + 0x80);
x &= 0xff00;
- x |= t | (a << 24);
- return x;
+ return x | t | (a << 24);
}
-#endif
Q_GUI_EXPORT extern const uint qt_inv_premul_factor[];
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index d7a4a2ad91..fc344dc3ac 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -33,7 +33,6 @@
#include "private/qstroker_p.h"
#include "private/qbezier_p.h"
-#include "private/qmath_p.h"
#include "qline.h"
#include "qtransform.h"
#include <qmath.h>
@@ -793,7 +792,7 @@ qreal qt_t_for_arc_angle(qreal angle)
if (qFuzzyCompare(angle, qreal(90)))
return 1;
- qreal radians = Q_PI * angle / 180;
+ qreal radians = qDegreesToRadians(angle);
qreal cosAngle = qCos(radians);
qreal sinAngle = qSin(radians);
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h
index 756669239c..eda65b8e2f 100644
--- a/src/gui/painting/qstroker_p.h
+++ b/src/gui/painting/qstroker_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qt_mips_asm_dsp_p.h b/src/gui/painting/qt_mips_asm_dsp_p.h
index 6f9cf0dcda..d1df7e018b 100644
--- a/src/gui/painting/qt_mips_asm_dsp_p.h
+++ b/src/gui/painting/qt_mips_asm_dsp_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Imagination Technologies Limited, www.imgtec.com
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index be46a0fba3..881fae9afc 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -285,13 +285,7 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
m_image = QImage(width, height, QImage::Format_Mono);
break;
case QFontEngine::Format_A8: {
- m_image = QImage(width, height, QImage::Format_Indexed8);
- m_image.fill(0);
- QVector<QRgb> colors(256);
- QRgb *it = colors.data();
- for (int i=0; i<256; ++i, ++it)
- *it = 0xff000000 | i | (i<<8) | (i<<16);
- m_image.setColorTable(colors);
+ m_image = QImage(width, height, QImage::Format_Alpha8);
break; }
case QFontEngine::Format_A32:
m_image = QImage(width, height, QImage::Format_RGB32);
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index 2d2fcdfc93..c9e7060b0d 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -158,9 +158,9 @@ class Q_GUI_EXPORT QImageTextureGlyphCache : public QTextureGlyphCache
public:
QImageTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
: QTextureGlyphCache(format, matrix) { }
- virtual void createTextureData(int width, int height);
- virtual void resizeTextureData(int width, int height);
- virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition);
+ virtual void createTextureData(int width, int height) Q_DECL_OVERRIDE;
+ virtual void resizeTextureData(int width, int height) Q_DECL_OVERRIDE;
+ virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition) Q_DECL_OVERRIDE;
inline const QImage &image() const { return m_image; }
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 04a97aabcb..31d7a2300b 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -1091,6 +1091,7 @@ QDebug operator<<(QDebug dbg, const QTransform &m)
"TxProject"
};
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QTransform(type=" << typeStr[m.type()] << ','
<< " 11=" << m.m11()
<< " 12=" << m.m12()
@@ -1103,7 +1104,7 @@ QDebug operator<<(QDebug dbg, const QTransform &m)
<< " 33=" << m.m33()
<< ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 68c4548644..cf8d4d1970 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h
index c005a092e2..44fb2e5647 100644
--- a/src/gui/painting/qvectorpath_p.h
+++ b/src/gui/painting/qvectorpath_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index 48065315ca..70be92535d 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qabstracttextdocumentlayout.h b/src/gui/text/qabstracttextdocumentlayout.h
index 27b3f85dea..27135b0476 100644
--- a/src/gui/text/qabstracttextdocumentlayout.h
+++ b/src/gui/text/qabstracttextdocumentlayout.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qabstracttextdocumentlayout_p.h b/src/gui/text/qabstracttextdocumentlayout_p.h
index 575f683da3..505135fa4b 100644
--- a/src/gui/text/qabstracttextdocumentlayout_p.h
+++ b/src/gui/text/qabstracttextdocumentlayout_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 8c2e40f319..3c98cb568d 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -41,7 +41,6 @@
#include <qfontmetrics.h>
#include <qbrush.h>
#include <qimagereader.h>
-#include "private/qfunctions_p.h"
#include <algorithm>
@@ -340,18 +339,18 @@ static const QCssKnownValue styleFeatures[NumKnownStyleFeatures - 1] = {
};
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCssKnownValue &prop1, const QCssKnownValue &prop2)
+static bool operator<(const QCssKnownValue &prop1, const QCssKnownValue &prop2)
{
return QString::compare(QString::fromLatin1(prop1.name), QLatin1String(prop2.name), Qt::CaseInsensitive) < 0;
}
#endif
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &name, const QCssKnownValue &prop)
+static bool operator<(const QString &name, const QCssKnownValue &prop)
{
return QString::compare(name, QLatin1String(prop.name), Qt::CaseInsensitive) < 0;
}
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCssKnownValue &prop, const QString &name)
+static bool operator<(const QCssKnownValue &prop, const QString &name)
{
return QString::compare(QLatin1String(prop.name), name, Qt::CaseInsensitive) < 0;
}
@@ -365,6 +364,29 @@ static quint64 findKnownValue(const QString &name, const QCssKnownValue *start,
return prop->id;
}
+static inline bool isInheritable(Property propertyId)
+{
+ switch (propertyId) {
+ case Font:
+ case FontFamily:
+ case FontSize:
+ case FontStyle:
+ case FontWeight:
+ case TextIndent:
+ case Whitespace:
+ case ListStyleType:
+ case ListStyle:
+ case TextAlignment:
+ case FontVariant:
+ case TextTransform:
+ case LineHeight:
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Value Extractor
ValueExtractor::ValueExtractor(const QVector<Declaration> &decls, const QPalette &pal)
@@ -2318,6 +2340,7 @@ bool Parser::parseProperty(Declaration *decl)
{
decl->d->property = lexem();
decl->d->propertyId = static_cast<Property>(findKnownValue(decl->d->property, properties, NumProperties));
+ decl->d->inheritable = isInheritable(decl->d->propertyId);
skipSpace();
return true;
}
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index 5e853c40d0..75802ba36a 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -426,12 +426,13 @@ struct Q_GUI_EXPORT Declaration
{
struct DeclarationData : public QSharedData
{
- inline DeclarationData() : propertyId(UnknownProperty), important(false) {}
+ inline DeclarationData() : propertyId(UnknownProperty), important(false), inheritable(false) {}
QString property;
Property propertyId;
QVector<Value> values;
QVariant parsed;
- bool important;
+ bool important:1;
+ bool inheritable:1;
};
QExplicitlySharedDataPointer<DeclarationData> d;
inline Declaration() : d(new DeclarationData()) {}
diff --git a/src/gui/text/qcssscanner.cpp b/src/gui/text/qcssscanner.cpp
index a7e24724d1..7505d27d80 100644
--- a/src/gui/text/qcssscanner.cpp
+++ b/src/gui/text/qcssscanner.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qdistancefield.cpp b/src/gui/text/qdistancefield.cpp
index b2d0298e04..4d189786a1 100644
--- a/src/gui/text/qdistancefield.cpp
+++ b/src/gui/text/qdistancefield.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -34,6 +34,7 @@
#include "qdistancefield_p.h"
#include <qmath.h>
#include <private/qdatabuffer_p.h>
+#include <private/qimage_p.h>
#include <private/qpathsimplifier_p.h>
QT_BEGIN_NAMESPACE
@@ -508,8 +509,8 @@ static void makeDistanceField(QDistanceFieldData *data, const QPainterPath &path
bits[i] = exteriorColor;
const qreal angleStep = qreal(15 * 3.141592653589793238 / 180);
- const QPoint rotation(qRound(cos(angleStep) * 0x4000),
- qRound(sin(angleStep) * 0x4000)); // 2:14 signed
+ const QPoint rotation(qRound(qCos(angleStep) * 0x4000),
+ qRound(qSin(angleStep) * 0x4000)); // 2:14 signed
const quint32 *indices = pathIndices.data();
QVarLengthArray<QPoint> normals;
@@ -543,7 +544,7 @@ static void makeDistanceField(QDistanceFieldData *data, const QPainterPath &path
QPoint n(to.y() - from.y(), from.x() - to.x());
if (n.x() == 0 && n.y() == 0)
continue;
- int scale = qRound((offs << 16) / sqrt(qreal(n.x() * n.x() + n.y() * n.y()))); // 8:16
+ int scale = qRound((offs << 16) / qSqrt(qreal(n.x() * n.x() + n.y() * n.y()))); // 8:16
n.rx() = n.x() * scale >> 8;
n.ry() = n.y() * scale >> 8;
normals.append(n);
@@ -832,6 +833,17 @@ QDistanceField::QDistanceField(QFontEngine *fontEngine, glyph_t glyph, bool doub
setGlyph(fontEngine, glyph, doubleResolution);
}
+QDistanceField::QDistanceField(const QPainterPath &path, glyph_t glyph, bool doubleResolution)
+{
+ QPainterPath dfPath = path;
+ dfPath.translate(-dfPath.boundingRect().topLeft());
+ dfPath.setFillRule(Qt::WindingFill);
+
+ d = QDistanceFieldData::create(dfPath, doubleResolution);
+ d->glyph = glyph;
+}
+
+
QDistanceField::QDistanceField(QDistanceFieldData *data)
: d(data)
{
@@ -987,12 +999,12 @@ QImage QDistanceField::toImage(QImage::Format format) const
if (isNull())
return QImage();
- QImage image(d->width, d->height, format == QImage::Format_Indexed8 ?
+ QImage image(d->width, d->height, qt_depthForFormat(format) == 8 ?
format : QImage::Format_ARGB32_Premultiplied);
if (image.isNull())
return image;
- if (format == QImage::Format_Indexed8) {
+ if (image.depth() == 8) {
for (int y = 0; y < d->height; ++y)
memcpy(image.scanLine(y), scanLine(y), d->width);
} else {
diff --git a/src/gui/text/qdistancefield_p.h b/src/gui/text/qdistancefield_p.h
index 89eea0f6af..c376e93abe 100644
--- a/src/gui/text/qdistancefield_p.h
+++ b/src/gui/text/qdistancefield_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -97,6 +97,7 @@ public:
QDistanceField(int width, int height);
QDistanceField(const QRawFont &font, glyph_t glyph, bool doubleResolution = false);
QDistanceField(QFontEngine *fontEngine, glyph_t glyph, bool doubleResolution = false);
+ QDistanceField(const QPainterPath &path, glyph_t glyph, bool doubleResolution = false);
QDistanceField(const QDistanceField &other);
bool isNull() const;
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index b867dc6ef2..a5fade99fd 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -166,14 +166,14 @@ Q_GUI_EXPORT int qt_defaultDpi()
QFontPrivate::QFontPrivate()
: engineData(0), dpi(qt_defaultDpi()), screen(0),
- rawMode(false), underline(false), overline(false), strikeOut(false), kerning(true),
+ underline(false), overline(false), strikeOut(false), kerning(true),
capital(0), letterSpacingIsAbsolute(false), scFont(0)
{
}
QFontPrivate::QFontPrivate(const QFontPrivate &other)
: request(other.request), engineData(0), dpi(other.dpi), screen(other.screen),
- rawMode(other.rawMode), underline(other.underline), overline(other.overline),
+ underline(other.underline), overline(other.overline),
strikeOut(other.strikeOut), kerning(other.kerning),
capital(other.capital), letterSpacingIsAbsolute(other.letterSpacingIsAbsolute),
letterSpacing(other.letterSpacing), wordSpacing(other.wordSpacing),
@@ -406,9 +406,6 @@ QFontEngineData::~QFontEngineData()
setPointSize() has a similar effect and provides device
independence.
- In X11 you can set a font using its system
- specific name with setRawName().
-
Loading fonts can be expensive, especially on X11. QFont contains
extensive optimizations to make the copying of QFont objects fast,
and to cache the results of the slow window system functions it
@@ -1033,10 +1030,14 @@ int QFont::weight() const
This enum contains the predefined font weights:
+ \value Thin 0
+ \value ExtraLight 12
\value Light 25
\value Normal 50
+ \value Medium 57
\value DemiBold 63
\value Bold 75
+ \value ExtraBold 81
\value Black 87
*/
@@ -1063,7 +1064,7 @@ void QFont::setWeight(int weight)
\fn bool QFont::bold() const
Returns \c true if weight() is a value greater than
- \l{Weight}{QFont::Normal}; otherwise returns \c false.
+ \l{Weight}{QFont::Medium}; otherwise returns \c false.
\sa weight(), setBold(), QFontInfo::bold()
*/
@@ -1567,8 +1568,11 @@ QFont::Capitalization QFont::capitalization() const
return static_cast<QFont::Capitalization> (d->capital);
}
-
+#if QT_DEPRECATED_SINCE(5, 5)
/*!
+ \fn void QFont::setRawMode(bool enable)
+ \deprecated
+
If \a enable is true, turns raw mode on; otherwise turns raw mode
off. This function only has an effect under X11.
@@ -1580,20 +1584,14 @@ QFont::Capitalization QFont::capitalization() const
return the values set in the QFont for all parameters, including
the family name).
- \warning Do not use raw mode unless you really, really need it! In
- most (if not all) cases, setRawName() is a much better choice.
+ \warning Enabling raw mode has no effect since Qt 5.0.
- \sa rawMode(), setRawName()
+ \sa rawMode()
*/
-void QFont::setRawMode(bool enable)
+void QFont::setRawMode(bool)
{
- if ((bool) d->rawMode == enable) return;
-
- // might change behavior, thus destroy engine data
- detach();
-
- d->rawMode = enable;
}
+#endif
/*!
Returns \c true if a window system font exactly matching the settings
@@ -1605,9 +1603,7 @@ bool QFont::exactMatch() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
Q_ASSERT(engine != 0);
- return (d->rawMode
- ? engine->type() != QFontEngine::Box
- : d->request.exactMatch(engine->fontDef));
+ return d->request.exactMatch(engine->fontDef);
}
/*!
@@ -1615,8 +1611,7 @@ bool QFont::exactMatch() const
false.
Two QFonts are considered equal if their font attributes are
- equal. If rawMode() is enabled for both fonts, only the family
- fields are compared.
+ equal.
\sa operator!=(), isCopyOf()
*/
@@ -1679,8 +1674,7 @@ bool QFont::operator<(const QFont &f) const
returns \c false.
Two QFonts are considered to be different if their font attributes
- are different. If rawMode() is enabled for both fonts, only the
- family fields are compared.
+ are different.
\sa operator==()
*/
@@ -1709,16 +1703,20 @@ bool QFont::isCopyOf(const QFont & f) const
return d == f.d;
}
+#if QT_DEPRECATED_SINCE(5, 5)
/*!
+ \deprecated
+
Returns \c true if raw mode is used for font name matching; otherwise
returns \c false.
- \sa setRawMode(), rawName()
+ \sa setRawMode()
*/
bool QFont::rawMode() const
{
- return d->rawMode;
+ return false;
}
+#endif
/*!
Returns a new QFont that has attributes copied from \a other that
@@ -1877,7 +1875,7 @@ QStringList QFont::substitutions()
return ret;
}
-
+#ifndef QT_NO_DATASTREAM
/* \internal
Internal function. Converts boolean font settings to an unsigned
8-bit number. Used for serialization etc.
@@ -1898,8 +1896,6 @@ static quint8 get_font_bits(int version, const QFontPrivate *f)
bits |= 0x08;
// if (f.hintSetByUser)
// bits |= 0x10;
- if (f->rawMode)
- bits |= 0x20;
if (version >= QDataStream::Qt_4_0) {
if (f->kerning)
bits |= 0x10;
@@ -1920,8 +1916,6 @@ static quint8 get_extended_font_bits(const QFontPrivate *f)
return bits;
}
-#ifndef QT_NO_DATASTREAM
-
/* \internal
Internal function. Sets boolean font settings from an unsigned
8-bit number. Used for serialization etc.
@@ -1935,7 +1929,6 @@ static void set_font_bits(int version, quint8 bits, QFontPrivate *f)
f->strikeOut = (bits & 0x04) != 0;
f->request.fixedPitch = (bits & 0x08) != 0;
// f->hintSetByUser = (bits & 0x10) != 0;
- f->rawMode = (bits & 0x20) != 0;
if (version >= QDataStream::Qt_4_0)
f->kerning = (bits & 0x10) != 0;
if ((bits & 0x80) != 0)
@@ -1982,7 +1975,7 @@ QString QFont::rawName() const
If Qt's internal font database cannot resolve the raw name, the
font becomes a raw font with \a name as its family.
- \sa rawName(), setRawMode(), setFamily()
+ \sa rawName(), setFamily()
*/
void QFont::setRawName(const QString &)
{
@@ -2019,7 +2012,7 @@ QString QFont::toString() const
QString::number((int) underline()) + comma +
QString::number((int) strikeOut()) + comma +
QString::number((int)fixedPitch()) + comma +
- QString::number((int) rawMode());
+ QString::number((int) false);
}
/*!
@@ -2063,7 +2056,6 @@ bool QFont::fromString(const QString &descrip)
setUnderline(l[5].toInt());
setStrikeOut(l[6].toInt());
setFixedPitch(l[7].toInt());
- setRawMode(l[8].toInt());
} else if (count == 10) {
if (l[2].toInt() > 0)
setPixelSize(l[2].toInt());
@@ -2073,7 +2065,6 @@ bool QFont::fromString(const QString &descrip)
setUnderline(l[6].toInt());
setStrikeOut(l[7].toInt());
setFixedPitch(l[8].toInt());
- setRawMode(l[9].toInt());
}
if (count >= 9 && !d->request.fixedPitch) // assume 'false' fixedPitch equals default
d->request.ignorePitch = true;
@@ -2163,7 +2154,7 @@ QString QFont::defaultFamily() const
happens. Please \l{bughowto.html}{report it as a bug} if
it does, preferably with a list of the fonts you have installed.
- \sa lastResortFamily(), rawName()
+ \sa lastResortFamily()
*/
QString QFont::lastResortFont() const
{
@@ -2622,7 +2613,10 @@ QFont::StyleHint QFontInfo::styleHint() const
return (QFont::StyleHint) engine->fontDef.styleHint;
}
+#if QT_DEPRECATED_SINCE(5, 5)
/*!
+ \deprecated
+
Returns \c true if the font is a raw mode font; otherwise returns
false.
@@ -2634,8 +2628,9 @@ QFont::StyleHint QFontInfo::styleHint() const
*/
bool QFontInfo::rawMode() const
{
- return d->rawMode;
+ return false;
}
+#endif
/*!
Returns \c true if the matched window system font is exactly the same
@@ -2647,9 +2642,7 @@ bool QFontInfo::exactMatch() const
{
QFontEngine *engine = d->engineForScript(QChar::Script_Common);
Q_ASSERT(engine != 0);
- return (d->rawMode
- ? engine->type() != QFontEngine::Box
- : d->request.exactMatch(engine->fontDef));
+ return d->request.exactMatch(engine->fontDef);
}
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 2a84fa680d..cc78ea7f45 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -49,7 +49,6 @@ class QVariant;
class Q_GUI_EXPORT QFont
{
Q_GADGET
- Q_ENUMS(StyleStrategy)
public:
enum StyleHint {
Helvetica, SansSerif = Helvetica,
@@ -78,6 +77,7 @@ public:
NoSubpixelAntialias = 0x0800,
NoFontMerging = 0x8000
};
+ Q_ENUM(StyleStrategy)
enum HintingPreference {
PreferDefaultHinting = 0,
@@ -86,12 +86,17 @@ public:
PreferFullHinting = 3
};
+ // Mapping OpenType weight value.
enum Weight {
- Light = 25,
- Normal = 50,
- DemiBold = 63,
- Bold = 75,
- Black = 87
+ Thin = 0, // 100
+ ExtraLight = 12, // 200
+ Light = 25, // 300
+ Normal = 50, // 400
+ Medium = 57, // 500
+ DemiBold = 63, // 600
+ Bold = 75, // 700
+ ExtraBold = 81, // 800
+ Black = 87 // 900
};
enum Style {
@@ -217,9 +222,10 @@ public:
void setHintingPreference(HintingPreference hintingPreference);
HintingPreference hintingPreference() const;
- // is raw mode still needed?
+#if QT_DEPRECATED_SINCE(5, 5)
bool rawMode() const;
void setRawMode(bool);
+#endif
// dupicated from QFontInfo
bool exactMatch() const;
@@ -313,7 +319,7 @@ Q_DECLARE_SHARED(QFont)
Q_GUI_EXPORT uint qHash(const QFont &font, uint seed = 0) Q_DECL_NOTHROW;
inline bool QFont::bold() const
-{ return weight() > Normal; }
+{ return weight() > Medium; }
inline void QFont::setBold(bool enable)
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index 0d5223821a..3f8241a80e 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -175,8 +175,6 @@ public:
int dpi;
int screen;
-
- uint rawMode : 1;
uint underline : 1;
uint overline : 1;
uint strikeOut : 1;
@@ -277,7 +275,7 @@ public:
private:
void increaseCost(uint cost);
void decreaseCost(uint cost);
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
static const uint min_cost;
uint total_cost, max_cost;
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index fcdb6ecca9..1a71042648 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -50,7 +50,6 @@
#include <QtCore/qmath.h>
#include <stdlib.h>
-#include <limits.h>
#include <algorithm>
@@ -84,60 +83,93 @@ static int getFontWeight(const QString &weightString)
{
QString s = weightString.toLower();
+ // Order here is important. We want to match the common cases first, but we
+ // must also take care to acknowledge the cost of our tests.
+ //
+ // As a result, we test in two orders; the order of commonness, and the
+ // order of "expense".
+ //
+ // A simple string test is the cheapest, so let's do that first.
// Test in decreasing order of commonness
- if (s == QLatin1String("normal")
- || s.compare(QCoreApplication::translate("QFontDatabase", "Normal"), Qt::CaseInsensitive) == 0)
+ if (s == QLatin1String("normal") || s == QLatin1String("regular"))
return QFont::Normal;
- if (s == QLatin1String("medium"))
- return qt_mediumFontWeight;
- if (s == QLatin1String("bold")
- || s.compare(QCoreApplication::translate("QFontDatabase", "Bold"), Qt::CaseInsensitive) == 0)
+ if (s == QLatin1String("bold"))
return QFont::Bold;
- if (s == QLatin1String("demibold") || s == QLatin1String("demi bold")
- || s.compare(QCoreApplication::translate("QFontDatabase", "Demi Bold"), Qt::CaseInsensitive) == 0)
+ if (s == QLatin1String("semibold") || s == QLatin1String("semi bold")
+ || s == QLatin1String("demibold") || s == QLatin1String("demi bold"))
return QFont::DemiBold;
- if (s == QLatin1String("black")
- || s.compare(QCoreApplication::translate("QFontDatabase", "Black"), Qt::CaseInsensitive) == 0)
+ if (s == QLatin1String("medium"))
+ return QFont::Medium;
+ if (s == QLatin1String("black"))
return QFont::Black;
if (s == QLatin1String("light"))
return QFont::Light;
if (s == QLatin1String("thin"))
- return qt_thinFontWeight;
- if (s == QLatin1String("extralight"))
- return qt_extralightFontWeight;
-
- if (s.contains(QLatin1String("bold"))
- || s.contains(QCoreApplication::translate("QFontDatabase", "Bold"), Qt::CaseInsensitive)) {
- if (s.contains(QLatin1String("demi"))
- || s.compare(QCoreApplication::translate("QFontDatabase", "Demi"), Qt::CaseInsensitive) == 0)
- return (int) QFont::DemiBold;
- return (int) QFont::Bold;
+ return QFont::Thin;
+ const QStringRef s2 = s.midRef(2);
+ if (s.startsWith(QLatin1String("ex")) || s.startsWith(QLatin1String("ul"))) {
+ if (s2 == QLatin1String("tralight") || s == QLatin1String("tra light"))
+ return QFont::ExtraLight;
+ if (s2 == QLatin1String("trabold") || s2 == QLatin1String("tra bold"))
+ return QFont::ExtraBold;
}
- if (s.contains(QLatin1String("light"))
- || s.compare(QCoreApplication::translate("QFontDatabase", "Light"), Qt::CaseInsensitive) == 0)
- return (int) QFont::Light;
-
- if (s.contains(QLatin1String("black"))
- || s.compare(QCoreApplication::translate("QFontDatabase", "Black"), Qt::CaseInsensitive) == 0)
- return (int) QFont::Black;
-
- return (int) QFont::Normal;
-}
-
-// convert 0 ~ 1000 integer to QFont::Weight
-QFont::Weight weightFromInteger(int weight)
-{
- if (weight < 400)
+ // Next up, let's see if contains() matches: slightly more expensive, but
+ // still fast enough.
+ if (s.contains(QLatin1String("bold"))) {
+ if (s.contains(QLatin1String("demi")))
+ return QFont::DemiBold;
+ return QFont::Bold;
+ }
+ if (s.contains(QLatin1String("light")))
return QFont::Light;
- else if (weight < 600)
+ if (s.contains(QLatin1String("black")))
+ return QFont::Black;
+
+ // Now, we perform string translations & comparisons with those.
+ // These are (very) slow compared to simple string ops, so we do these last.
+ // As using translated values for such things is not very common, this should
+ // not be too bad.
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Normal", "The Normal or Regular font weight"), Qt::CaseInsensitive) == 0)
return QFont::Normal;
- else if (weight < 700)
- return QFont::DemiBold;
- else if (weight < 800)
+ const QString translatedBold = QCoreApplication::translate("QFontDatabase", "Bold").toLower();
+ if (s == translatedBold)
return QFont::Bold;
- else
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Demi Bold"), Qt::CaseInsensitive) == 0)
+ return QFont::DemiBold;
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Medium", "The Medium font weight"), Qt::CaseInsensitive) == 0)
+ return QFont::Medium;
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Black"), Qt::CaseInsensitive) == 0)
return QFont::Black;
+ const QString translatedLight = QCoreApplication::translate("QFontDatabase", "Light").toLower();
+ if (s == translatedLight)
+ return QFont::Light;
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Thin"), Qt::CaseInsensitive) == 0)
+ return QFont::Thin;
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Extra Light"), Qt::CaseInsensitive) == 0)
+ return QFont::ExtraLight;
+ if (s.compare(QCoreApplication::translate("QFontDatabase", "Extra Bold"), Qt::CaseInsensitive) == 0)
+ return QFont::ExtraBold;
+
+ // And now the contains() checks for the translated strings.
+ //: The word for "Extra" as in "Extra Bold, Extra Thin" used as a pattern for string searches
+ const QString translatedExtra = QCoreApplication::translate("QFontDatabase", "Extra").toLower();
+ if (s.contains(translatedBold)) {
+ //: The word for "Demi" as in "Demi Bold" used as a pattern for string searches
+ QString translatedDemi = QCoreApplication::translate("QFontDatabase", "Demi").toLower();
+ if (s .contains(translatedDemi))
+ return QFont::DemiBold;
+ if (s.contains(translatedExtra))
+ return QFont::ExtraBold;
+ return QFont::Bold;
+ }
+
+ if (s.contains(translatedLight)) {
+ if (s.contains(translatedExtra))
+ return QFont::ExtraLight;
+ return QFont::Light;
+ }
+ return QFont::Normal;
}
struct QtFontEncoding
@@ -221,12 +253,19 @@ QtFontStyle::Key::Key(const QString &styleString)
{
weight = getFontWeight(styleString);
- if (styleString.contains(QLatin1String("Italic"))
- || styleString.contains(QCoreApplication::translate("QFontDatabase", "Italic")))
- style = QFont::StyleItalic;
- else if (styleString.contains(QLatin1String("Oblique"))
- || styleString.contains(QCoreApplication::translate("QFontDatabase", "Oblique")))
- style = QFont::StyleOblique;
+ if (!styleString.isEmpty()) {
+ // First the straightforward no-translation checks, these are fast.
+ if (styleString.contains(QLatin1String("Italic")))
+ style = QFont::StyleItalic;
+ else if (styleString.contains(QLatin1String("Oblique")))
+ style = QFont::StyleOblique;
+
+ // Then the translation checks. These aren't as fast.
+ else if (styleString.contains(QCoreApplication::translate("QFontDatabase", "Italic")))
+ style = QFont::StyleItalic;
+ else if (styleString.contains(QCoreApplication::translate("QFontDatabase", "Oblique")))
+ style = QFont::StyleOblique;
+ }
}
QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add)
@@ -428,8 +467,6 @@ public:
bool isApplicationFont(const QString &fileName);
void invalidate();
-
- QStringList fallbackFamilies;
};
void QFontDatabasePrivate::invalidate()
@@ -624,18 +661,6 @@ static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDe
fontDef->ignorePitch = false;
}
-static void getEngineData(const QFontPrivate *d, const QFontDef &def)
-{
- // look for the requested font in the engine data cache
- d->engineData = QFontCache::instance()->findEngineData(def);
- if (!d->engineData) {
- // create a new one
- d->engineData = new QFontEngineData;
- QFontCache::instance()->insertEngineData(def, d->engineData);
- }
- d->engineData->ref.ref();
-}
-
static QStringList familyList(const QFontDef &req)
{
// list of families to try
@@ -765,7 +790,7 @@ static QStringList fallbackFamilies(const QString &family, QFont::Style style, Q
}
if (!contains) {
i = retList.erase(i);
- i--;
+ --i;
}
}
return retList;
@@ -800,7 +825,7 @@ static inline void load(const QString & = QString(), int = -1)
static
QFontEngine *loadSingleEngine(int script,
const QFontDef &request,
- QtFontFoundry *foundry,
+ QtFontFamily *family, QtFontFoundry *foundry,
QtFontStyle *style, QtFontSize *size)
{
Q_UNUSED(foundry);
@@ -819,6 +844,24 @@ QFontEngine *loadSingleEngine(int script,
QFontCache::Key key(def,script);
QFontEngine *engine = QFontCache::instance()->findEngine(key);
if (!engine) {
+ if (script != QChar::Script_Common) {
+ // fast path: check if engine was loaded for another script
+ key.script = QChar::Script_Common;
+ engine = QFontCache::instance()->findEngine(key);
+ key.script = script;
+ if (engine) {
+ Q_ASSERT(engine->type() != QFontEngine::Multi);
+ // Also check for OpenType tables when using complex scripts
+ if (Q_UNLIKELY(!engine->supportsScript(QChar::Script(script)))) {
+ qWarning(" OpenType support missing for script %d", script);
+ return 0;
+ }
+
+ QFontCache::instance()->insertEngine(key, engine);
+ return engine;
+ }
+ }
+
// If the font data's native stretch matches the requested stretch we need to set stretch to 100
// to avoid the fontengine synthesizing stretch. If they didn't match exactly we need to calculate
// the new stretch factor. This only done if not matched by styleName.
@@ -838,6 +881,13 @@ QFontEngine *loadSingleEngine(int script,
}
QFontCache::instance()->insertEngine(key, engine);
+
+ if (!engine->symbol && script != QChar::Script_Common && (family->writingSystems[QFontDatabase::Latin] & QtFontFamily::Supported) != 0) {
+ // cache engine for Common script as well
+ key.script = QChar::Script_Common;
+ if (!QFontCache::instance()->findEngine(key))
+ QFontCache::instance()->insertEngine(key, engine);
+ }
}
}
return engine;
@@ -848,7 +898,7 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
QtFontFamily *family, QtFontFoundry *foundry,
QtFontStyle *style, QtFontSize *size)
{
- QFontEngine *engine = loadSingleEngine(script, request, foundry, style, size);
+ QFontEngine *engine = loadSingleEngine(script, request, family, foundry, style, size);
Q_ASSERT(!engine || engine->type() != QFontEngine::Multi);
if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
// make sure that the db has all fallback families
@@ -863,10 +913,8 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
}
QStringList fallbacks = request.fallBackFamilies;
- if (family && !family->fallbackFamilies.isEmpty())
+ if (family)
fallbacks += family->fallbackFamilies;
- else
- fallbacks += privateDb()->fallbackFamilies;
QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
@@ -935,7 +983,7 @@ static
unsigned int bestFoundry(int script, unsigned int score, int styleStrategy,
const QtFontFamily *family, const QString &foundry_name,
QtFontStyle::Key styleKey, int pixelSize, char pitch,
- QtFontDesc *desc, int force_encoding_id, QString styleName = QString())
+ QtFontDesc *desc, int force_encoding_id, const QString &styleName = QString())
{
Q_UNUSED(force_encoding_id);
Q_UNUSED(script);
@@ -1117,7 +1165,10 @@ static int match(int script, const QFontDef &request,
load(family_name, script);
- const size_t writingSystem = std::find(scriptForWritingSystem, scriptForWritingSystem + QFontDatabase::WritingSystemsCount, script) - scriptForWritingSystem;
+ size_t writingSystem = std::find(scriptForWritingSystem, scriptForWritingSystem +
+ QFontDatabase::WritingSystemsCount, script) - scriptForWritingSystem;
+ if (writingSystem >= QFontDatabase::WritingSystemsCount)
+ writingSystem = QFontDatabase::Any;
QFontDatabasePrivate *db = privateDb();
for (int x = 0; x < db->count; ++x) {
@@ -1136,7 +1187,7 @@ static int match(int script, const QFontDef &request,
load(test.family->name, script);
// Check if family is supported in the script we want
- if (script != QChar::Script_Common && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported))
+ if (writingSystem != QFontDatabase::Any && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported))
continue;
// as we know the script is supported, we can be sure
@@ -1145,7 +1196,7 @@ static int match(int script, const QFontDef &request,
bestFoundry(script, score, request.styleStrategy,
test.family, foundry_name, styleKey, request.pixelSize, pitch,
&test, force_encoding_id, request.styleName);
- if (test.foundry == 0) {
+ if (test.foundry == 0 && !foundry_name.isEmpty()) {
// the specific foundry was not found, so look for
// any foundry matching our requirements
newscore = bestFoundry(script, score, request.styleStrategy, test.family,
@@ -1510,6 +1561,9 @@ bool QFontDatabase::isFixedPitch(const QString &family,
bool QFontDatabase::isBitmapScalable(const QString &family,
const QString &style) const
{
+ if (QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fontsAlwaysScalable())
+ return true;
+
bool bitmapScalable = false;
QString familyName, foundryName;
parseFontName(family, foundryName, familyName);
@@ -1518,11 +1572,10 @@ bool QFontDatabase::isBitmapScalable(const QString &family,
QT_PREPEND_NAMESPACE(load)(familyName);
- QtFontStyle::Key styleKey(style);
-
QtFontFamily *f = d->family(familyName);
if (!f) return bitmapScalable;
+ QtFontStyle::Key styleKey(style);
for (int j = 0; j < f->count; j++) {
QtFontFoundry *foundry = f->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
@@ -1551,6 +1604,9 @@ bool QFontDatabase::isBitmapScalable(const QString &family,
*/
bool QFontDatabase::isSmoothlyScalable(const QString &family, const QString &style) const
{
+ if (QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fontsAlwaysScalable())
+ return true;
+
bool smoothScalable = false;
QString familyName, foundryName;
parseFontName(family, foundryName, familyName);
@@ -1559,11 +1615,19 @@ bool QFontDatabase::isSmoothlyScalable(const QString &family, const QString &sty
QT_PREPEND_NAMESPACE(load)(familyName);
- QtFontStyle::Key styleKey(style);
-
QtFontFamily *f = d->family(familyName);
+ if (!f) {
+ for (int i = 0; i < d->count; i++) {
+ if (d->families[i]->matchesFamilyName(familyName)) {
+ f = d->families[i];
+ f->ensurePopulated();
+ break;
+ }
+ }
+ }
if (!f) return smoothScalable;
+ QtFontStyle::Key styleKey(style);
for (int j = 0; j < f->count; j++) {
QtFontFoundry *foundry = f->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
@@ -1616,8 +1680,6 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
QT_PREPEND_NAMESPACE(load)(familyName);
- QtFontStyle::Key styleKey(styleName);
-
QList<int> sizes;
QtFontFamily *fam = d->family(familyName);
@@ -1626,6 +1688,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
const int dpi = qt_defaultDpiY(); // embedded
+ QtFontStyle::Key styleKey(styleName);
for (int j = 0; j < fam->count; j++) {
QtFontFoundry *foundry = fam->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
@@ -1639,7 +1702,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
for (int l = 0; l < style->count; l++) {
const QtFontSize *size = style->pixelSizes + l;
- if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
+ if (size->pixelSize != 0 && size->pixelSize != SMOOTH_SCALABLE) {
const uint pointSize = qRound(size->pixelSize * 72.0 / dpi);
if (! sizes.contains(pointSize))
sizes.append(pointSize);
@@ -1719,8 +1782,6 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
QT_PREPEND_NAMESPACE(load)(familyName);
- QtFontStyle::Key styleKey(styleName);
-
QList<int> sizes;
QtFontFamily *fam = d->family(familyName);
@@ -1729,6 +1790,7 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
const int dpi = qt_defaultDpiY(); // embedded
+ QtFontStyle::Key styleKey(styleName);
for (int j = 0; j < fam->count; j++) {
QtFontFoundry *foundry = fam->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
@@ -1742,7 +1804,7 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
for (int l = 0; l < style->count; l++) {
const QtFontSize *size = style->pixelSizes + l;
- if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
+ if (size->pixelSize != 0 && size->pixelSize != SMOOTH_SCALABLE) {
const uint pointSize = qRound(size->pixelSize * 72.0 / dpi);
if (! sizes.contains(pointSize))
sizes.append(pointSize);
@@ -1885,6 +1947,24 @@ bool QFontDatabase::hasFamily(const QString &family) const
/*!
+ \since 5.5
+
+ Returns \c true if and only if the \a family font family is private.
+
+ This happens, for instance, on OS X and iOS, where the system UI fonts are not
+ accessible to the user. For completeness, QFontDatabase::families() returns all
+ font families, including the private ones. You should use this function if you
+ are developing a font selection control in order to keep private fonts hidden.
+
+ \sa families()
+*/
+bool QFontDatabase::isPrivateFamily(const QString &family) const
+{
+ return QGuiApplicationPrivate::platformIntegration()->fontDatabase()->isPrivateFontFamily(family);
+}
+
+
+/*!
Returns the names the \a writingSystem (e.g. for displaying to the
user in a dialog).
*/
@@ -2562,7 +2642,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
QFontDef req = d->request;
if (req.pixelSize == -1) {
- req.pixelSize = floor(((req.pointSize * d->dpi) / 72) * 100 + 0.5) / 100;
+ req.pixelSize = std::floor(((req.pointSize * d->dpi) / 72) * 100 + 0.5) / 100;
req.pixelSize = qRound(req.pixelSize);
}
if (req.pointSize < 0)
@@ -2572,19 +2652,27 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
if (req.stretch == 0)
req.stretch = 100;
+ if (!d->engineData) {
+ // look for the requested font in the engine data cache
+ d->engineData = QFontCache::instance()->findEngineData(req);
+ if (!d->engineData) {
+ // create a new one
+ d->engineData = new QFontEngineData;
+ QFontCache::instance()->insertEngineData(req, d->engineData);
+ }
+ d->engineData->ref.ref();
+ }
+
+ // the cached engineData could have already loaded the engine we want
+ if (d->engineData->engines[script])
+ return;
+
// Until we specifically asked not to, try looking for Multi font engine
// first, the last '1' indicates that we want Multi font engine instead
// of single ones
bool multi = !(req.styleStrategy & QFont::NoFontMerging);
QFontCache::Key key(req, script, multi ? 1 : 0);
- if (!d->engineData)
- getEngineData(d, req);
-
- // the cached engineData could have already loaded the engine we want
- if (d->engineData->engines[script])
- return;
-
QFontEngine *fe = QFontCache::instance()->findEngine(key);
// list of families to try
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index d7d8745f12..6d738d96be 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -51,8 +51,6 @@ class QFontDatabasePrivate;
class Q_GUI_EXPORT QFontDatabase
{
Q_GADGET
- Q_ENUMS(WritingSystem)
- Q_ENUMS(SystemFont)
public:
// do not re-order or delete entries from this enum without updating the
// QPF2 format and makeqpf!!
@@ -98,6 +96,7 @@ public:
WritingSystemsCount
};
+ Q_ENUM(WritingSystem)
enum SystemFont {
GeneralFont,
@@ -105,6 +104,7 @@ public:
TitleFont,
SmallestReadableFont
};
+ Q_ENUM(SystemFont)
static QList<int> standardSizes();
@@ -132,6 +132,7 @@ public:
int weight(const QString &family, const QString &style) const;
bool hasFamily(const QString &family) const;
+ bool isPrivateFamily(const QString &family) const;
static QString writingSystemName(WritingSystem writingSystem);
static QString writingSystemSample(WritingSystem writingSystem);
@@ -159,7 +160,7 @@ private:
friend class QFontPrivate;
friend class QFontDialog;
friend class QFontDialogPrivate;
- friend class QFontEngineMultiBasicImpl;
+ friend class QFontEngineMulti;
QFontDatabasePrivate *d;
};
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index b360ed5c85..b028d868b9 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -766,7 +766,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
{
QImage i = alphaMapForGlyph(glyph);
if (t.type() > QTransform::TxTranslate)
- i = i.transformed(t).convertToFormat(QImage::Format_Indexed8);
+ i = i.transformed(t).convertToFormat(QImage::Format_Alpha8);
Q_ASSERT(i.depth() <= 8); // To verify that transformed didn't change the format...
return i;
@@ -779,7 +779,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, con
QImage i = alphaMapForGlyph(glyph, subPixelPosition);
if (t.type() > QTransform::TxTranslate)
- i = i.transformed(t).convertToFormat(QImage::Format_Indexed8);
+ i = i.transformed(t).convertToFormat(QImage::Format_Alpha8);
Q_ASSERT(i.depth() <= 8); // To verify that transformed didn't change the format...
return i;
@@ -790,12 +790,11 @@ QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition
QImage alphaMask = alphaMapForGlyph(glyph, t);
QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32);
- QVector<QRgb> colorTable = alphaMask.colorTable();
for (int y=0; y<alphaMask.height(); ++y) {
uint *dst = (uint *) rgbMask.scanLine(y);
uchar *src = (uchar *) alphaMask.scanLine(y);
for (int x=0; x<alphaMask.width(); ++x) {
- int val = qAlpha(colorTable.at(src[x]));
+ int val = src[x];
dst[x] = qRgb(val, val, val);
}
}
@@ -876,20 +875,16 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph)
p.drawPath(path);
p.end();
- QImage indexed(im.width(), im.height(), QImage::Format_Indexed8);
- QVector<QRgb> colors(256);
- for (int i=0; i<256; ++i)
- colors[i] = qRgba(0, 0, 0, i);
- indexed.setColorTable(colors);
+ QImage alphaMap(im.width(), im.height(), QImage::Format_Alpha8);
for (int y=0; y<im.height(); ++y) {
- uchar *dst = (uchar *) indexed.scanLine(y);
+ uchar *dst = (uchar *) alphaMap.scanLine(y);
uint *src = (uint *) im.scanLine(y);
for (int x=0; x<im.width(); ++x)
dst[x] = qAlpha(src[x]);
}
- return indexed;
+ return alphaMap;
}
void QFontEngine::removeGlyphFromCache(glyph_t)
@@ -1540,14 +1535,10 @@ bool QFontEngineBox::canRender(const QChar *, int) const
QImage QFontEngineBox::alphaMapForGlyph(glyph_t)
{
- QImage image(_size, _size, QImage::Format_Indexed8);
- QVector<QRgb> colors(256);
- for (int i=0; i<256; ++i)
- colors[i] = qRgba(0, 0, 0, i);
- image.setColorTable(colors);
+ QImage image(_size, _size, QImage::Format_Alpha8);
image.fill(0);
- // can't use qpainter for index8; so use setPixel to draw our rectangle.
+ // FIXME: use qpainter
for (int i=2; i <= _size-3; ++i) {
image.setPixel(i, 2, 255);
image.setPixel(i, _size-3, 255);
@@ -1568,34 +1559,109 @@ static inline uchar highByte(glyph_t glyph)
static inline glyph_t stripped(glyph_t glyph)
{ return glyph & 0x00ffffff; }
-QFontEngineMulti::QFontEngineMulti(int engineCount)
- : QFontEngine(Multi)
+QFontEngineMulti::QFontEngineMulti(QFontEngine *engine, int script, const QStringList &fallbackFamilies)
+ : QFontEngine(Multi),
+ m_fallbackFamilies(fallbackFamilies),
+ m_script(script),
+ m_fallbackFamiliesQueried(!m_fallbackFamilies.isEmpty())
{
- engines.fill(0, engineCount);
- cache_cost = 0;
+ Q_ASSERT(engine && engine->type() != QFontEngine::Multi);
+
+ if (m_fallbackFamilies.isEmpty()) {
+ // defer obtaining the fallback families until loadEngine(1)
+ m_fallbackFamilies << QString();
+ }
+
+ m_engines.resize(m_fallbackFamilies.size() + 1);
+
+ engine->ref.ref();
+ m_engines[0] = engine;
+
+ fontDef = engine->fontDef;
+ cache_cost = engine->cache_cost;
}
QFontEngineMulti::~QFontEngineMulti()
{
- for (int i = 0; i < engines.size(); ++i) {
- QFontEngine *fontEngine = engines.at(i);
+ for (int i = 0; i < m_engines.size(); ++i) {
+ QFontEngine *fontEngine = m_engines.at(i);
if (fontEngine && !fontEngine->ref.deref())
delete fontEngine;
}
}
+void QFontEngineMulti::ensureFallbackFamiliesQueried()
+{
+ if (QPlatformIntegration *integration = QGuiApplicationPrivate::platformIntegration()) {
+ const QStringList fallbackFamilies = integration->fontDatabase()->fallbacksForFamily(fontDef.family,
+ QFont::Style(fontDef.style),
+ QFont::AnyStyle,
+ QChar::Script(m_script));
+ setFallbackFamiliesList(fallbackFamilies);
+ }
+}
+
+void QFontEngineMulti::setFallbackFamiliesList(const QStringList &fallbackFamilies)
+{
+ Q_ASSERT(!m_fallbackFamiliesQueried);
+
+ m_fallbackFamilies = fallbackFamilies;
+ if (m_fallbackFamilies.isEmpty()) {
+ // turns out we lied about having any fallback at all
+ Q_ASSERT(m_engines.size() == 2); // see c-tor for details
+ QFontEngine *engine = m_engines.at(0);
+ engine->ref.ref();
+ m_engines[1] = engine;
+ m_fallbackFamilies << fontDef.family;
+ } else {
+ m_engines.resize(m_fallbackFamilies.size() + 1);
+ }
+
+ m_fallbackFamiliesQueried = true;
+}
+
+void QFontEngineMulti::ensureEngineAt(int at)
+{
+ if (!m_fallbackFamiliesQueried)
+ ensureFallbackFamiliesQueried();
+ Q_ASSERT(at < m_engines.size());
+ if (!m_engines.at(at)) {
+ QFontEngine *engine = loadEngine(at);
+ if (!engine)
+ engine = new QFontEngineBox(fontDef.pixelSize);
+ Q_ASSERT(engine && engine->type() != QFontEngine::Multi);
+ engine->ref.ref();
+ m_engines[at] = engine;
+ }
+}
+
+QFontEngine *QFontEngineMulti::loadEngine(int at)
+{
+ QFontDef request(fontDef);
+ request.styleStrategy |= QFont::NoFontMerging;
+ request.family = fallbackFamilyAt(at - 1);
+
+ if (QFontEngine *engine = QFontDatabase::findFont(m_script, /*fontprivate = */0, request, /*multi = */false)) {
+ engine->fontDef = request;
+ return engine;
+ }
+
+ return 0;
+}
+
glyph_t QFontEngineMulti::glyphIndex(uint ucs4) const
{
glyph_t glyph = engine(0)->glyphIndex(ucs4);
if (glyph == 0 && ucs4 != QChar::LineSeparator) {
- const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
- for (int x = 1, n = qMin(engines.size(), 256); x < n; ++x) {
- QFontEngine *engine = engines.at(x);
+ if (!m_fallbackFamiliesQueried)
+ const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
+ for (int x = 1, n = qMin(m_engines.size(), 256); x < n; ++x) {
+ QFontEngine *engine = m_engines.at(x);
if (!engine) {
if (!shouldLoadFontEngineForCharacter(x, ucs4))
continue;
- const_cast<QFontEngineMulti *>(this)->loadEngine(x);
- engine = engines.at(x);
+ const_cast<QFontEngineMulti *>(this)->ensureEngineAt(x);
+ engine = m_engines.at(x);
}
Q_ASSERT(engine != 0);
if (engine->type() == Box)
@@ -1620,20 +1686,22 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
if (!engine(0)->stringToCMap(str, len, glyphs, nglyphs, flags))
return false;
- const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
int glyph_pos = 0;
QStringIterator it(str, str + len);
while (it.hasNext()) {
const uint ucs4 = it.peekNext();
if (glyphs->glyphs[glyph_pos] == 0 && ucs4 != QChar::LineSeparator) {
- for (int x = 1, n = qMin(engines.size(), 256); x < n; ++x) {
- if (engines.at(x) == 0 && !shouldLoadFontEngineForCharacter(x, ucs4))
- continue;
-
- QFontEngine *engine = engines.at(x);
+ if (!m_fallbackFamiliesQueried)
+ const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
+ for (int x = 1, n = qMin(m_engines.size(), 256); x < n; ++x) {
+ QFontEngine *engine = m_engines.at(x);
if (!engine) {
- const_cast<QFontEngineMulti *>(this)->loadEngine(x);
- engine = engines.at(x);
+ if (!shouldLoadFontEngineForCharacter(x, ucs4))
+ continue;
+ const_cast<QFontEngineMulti *>(this)->ensureEngineAt(x);
+ engine = m_engines.at(x);
+ if (!engine)
+ continue;
}
Q_ASSERT(engine != 0);
if (engine->type() == Box)
@@ -1888,7 +1956,6 @@ void QFontEngineMulti::doKerning(QGlyphLayout *glyphs, QFontEngine::ShaperFlags
glyph_metrics_t QFontEngineMulti::boundingBox(glyph_t glyph)
{
const int which = highByte(glyph);
- Q_ASSERT(which < engines.size());
return engine(which)->boundingBox(stripped(glyph));
}
@@ -1967,111 +2034,34 @@ bool QFontEngineMulti::canRender(const QChar *string, int len) const
QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph)
{
const int which = highByte(glyph);
- Q_ASSERT(which < engines.size());
return engine(which)->alphaMapForGlyph(stripped(glyph));
}
QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition)
{
const int which = highByte(glyph);
- Q_ASSERT(which < engines.size());
return engine(which)->alphaMapForGlyph(stripped(glyph), subPixelPosition);
}
QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, const QTransform &t)
{
const int which = highByte(glyph);
- Q_ASSERT(which < engines.size());
return engine(which)->alphaMapForGlyph(stripped(glyph), t);
}
QImage QFontEngineMulti::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
{
const int which = highByte(glyph);
- Q_ASSERT(which < engines.size());
return engine(which)->alphaMapForGlyph(stripped(glyph), subPixelPosition, t);
}
QImage QFontEngineMulti::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t)
{
const int which = highByte(glyph);
- Q_ASSERT(which < engines.size());
return engine(which)->alphaRGBMapForGlyph(stripped(glyph), subPixelPosition, t);
}
/*
- Creates a new multi engine.
-
- This function takes ownership of the QFontEngine, increasing it's refcount.
-*/
-QFontEngineMultiBasicImpl::QFontEngineMultiBasicImpl(QFontEngine *fe, int _script, const QStringList &fallbacks)
- : QFontEngineMulti(fallbacks.size() + 1),
- fallbackFamilies(fallbacks), script(_script)
- , fallbacksQueried(true)
-{
- init(fe);
-}
-
-QFontEngineMultiBasicImpl::QFontEngineMultiBasicImpl(QFontEngine *fe, int _script)
- : QFontEngineMulti(2)
- , script(_script)
- , fallbacksQueried(false)
-{
- fallbackFamilies << QString();
- init(fe);
-}
-
-void QFontEngineMultiBasicImpl::init(QFontEngine *fe)
-{
- Q_ASSERT(fe && fe->type() != QFontEngine::Multi);
- engines[0] = fe;
- fe->ref.ref();
- fontDef = engines[0]->fontDef;
- cache_cost = fe->cache_cost;
-}
-
-void QFontEngineMultiBasicImpl::loadEngine(int at)
-{
- ensureFallbackFamiliesQueried();
- Q_ASSERT(at < engines.size());
- Q_ASSERT(engines.at(at) == 0);
- QFontDef request = fontDef;
- request.styleStrategy |= QFont::NoFontMerging;
- request.family = fallbackFamilies.at(at-1);
- engines[at] = QFontDatabase::findFont(script,
- /*fontprivate = */0,
- request, /*multi = */false);
- Q_ASSERT(engines[at]);
- engines[at]->ref.ref();
- engines[at]->fontDef = request;
-}
-void QFontEngineMultiBasicImpl::ensureFallbackFamiliesQueried()
-{
- if (fallbacksQueried)
- return;
- QStringList fallbacks = QGuiApplicationPrivate::instance()->platformIntegration()->fontDatabase()->fallbacksForFamily(engine(0)->fontDef.family, QFont::Style(engine(0)->fontDef.style)
- , QFont::AnyStyle, QChar::Script(script));
- setFallbackFamiliesList(fallbacks);
-}
-
-void QFontEngineMultiBasicImpl::setFallbackFamiliesList(const QStringList &fallbacks)
-{
- // Original FontEngine to restore after the fill.
- QFontEngine *fe = engines[0];
- fallbackFamilies = fallbacks;
- if (!fallbackFamilies.isEmpty()) {
- engines.fill(0, fallbackFamilies.size() + 1);
- engines[0] = fe;
- } else {
- // Turns out we lied about having any fallback at all.
- fallbackFamilies << fe->fontDef.family;
- engines[1] = fe;
- fe->ref.ref();
- }
- fallbacksQueried = true;
-}
-
-/*
This is used indirectly by Qt WebKit when using QTextLayout::setRawFont
The purpose of this is to provide the necessary font fallbacks when drawing complex
@@ -2079,7 +2069,7 @@ void QFontEngineMultiBasicImpl::setFallbackFamiliesList(const QStringList &fallb
the same raw font over and over again, we want to cache the corresponding multi font engine
as it may contain fallback font engines already.
*/
-QFontEngine* QFontEngineMultiBasicImpl::createMultiFontEngine(QFontEngine *fe, int script)
+QFontEngine *QFontEngineMulti::createMultiFontEngine(QFontEngine *fe, int script)
{
QFontEngine *engine = 0;
QFontCache::Key key(fe->fontDef, script, /*multi = */true);
@@ -2100,7 +2090,7 @@ QFontEngine* QFontEngineMultiBasicImpl::createMultiFontEngine(QFontEngine *fe, i
fc->updateHitCountAndTimeStamp(it.value());
break;
}
- it++;
+ ++it;
}
if (!engine) {
engine = QGuiApplicationPrivate::instance()->platformIntegration()->fontDatabase()->fontEngineMulti(fe, QChar::Script(script));
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 25156bf1e1..8176ede994 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -76,34 +76,6 @@
QT_BEGIN_NAMESPACE
-/*
- * Freetype 2.1.7 and earlier used width/height
- * for matching sizes in the BDF and PCF loaders.
- * This has been fixed for 2.1.8.
- */
-#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20105
-#define X_SIZE(face,i) ((face)->available_sizes[i].x_ppem)
-#define Y_SIZE(face,i) ((face)->available_sizes[i].y_ppem)
-#else
-#define X_SIZE(face,i) ((face)->available_sizes[i].width << 6)
-#define Y_SIZE(face,i) ((face)->available_sizes[i].height << 6)
-#endif
-
-/* FreeType 2.1.10 starts to provide FT_GlyphSlot_Embolden */
-#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20110
-#define Q_FT_GLYPHSLOT_EMBOLDEN(slot) FT_GlyphSlot_Embolden(slot)
-#else
-#define Q_FT_GLYPHSLOT_EMBOLDEN(slot)
-#endif
-
-/* FreeType 2.1.10 starts to provide FT_GlyphSlot_Oblique */
-#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20110
-#define Q_HAS_FT_GLYPHSLOT_OBLIQUE
-#define Q_FT_GLYPHSLOT_OBLIQUE(slot) FT_GlyphSlot_Oblique(slot)
-#else
-#define Q_FT_GLYPHSLOT_OBLIQUE(slot)
-#endif
-
#define FLOOR(x) ((x) & -64)
#define CEIL(x) (((x)+63) & -64)
#define TRUNC(x) ((x) >> 6)
@@ -297,7 +269,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
}
if (!FT_IS_SCALABLE(newFreetype->face) && newFreetype->face->num_fixed_sizes == 1)
- FT_Set_Char_Size (face, X_SIZE(newFreetype->face, 0), Y_SIZE(newFreetype->face, 0), 0, 0);
+ FT_Set_Char_Size(face, newFreetype->face->available_sizes[0].x_ppem, newFreetype->face->available_sizes[0].y_ppem, 0, 0);
FT_Set_Charmap(newFreetype->face, newFreetype->unicode_map);
QT_TRY {
@@ -357,18 +329,18 @@ void QFreetypeFace::computeSize(const QFontDef &fontDef, int *xsize, int *ysize,
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) {
int best = 0;
for (int i = 1; i < face->num_fixed_sizes; i++) {
- if (qAbs(*ysize - Y_SIZE(face,i)) <
- qAbs (*ysize - Y_SIZE(face, best)) ||
- (qAbs (*ysize - Y_SIZE(face, i)) ==
- qAbs (*ysize - Y_SIZE(face, best)) &&
- qAbs (*xsize - X_SIZE(face, i)) <
- qAbs (*xsize - X_SIZE(face, best)))) {
+ if (qAbs(*ysize - face->available_sizes[i].y_ppem) <
+ qAbs(*ysize - face->available_sizes[best].y_ppem) ||
+ (qAbs(*ysize - face->available_sizes[i].y_ppem) ==
+ qAbs(*ysize - face->available_sizes[best].y_ppem) &&
+ qAbs(*xsize - face->available_sizes[i].x_ppem) <
+ qAbs(*xsize - face->available_sizes[best].x_ppem))) {
best = i;
}
}
- if (FT_Set_Char_Size (face, X_SIZE(face, best), Y_SIZE(face, best), 0, 0) == 0) {
- *xsize = X_SIZE(face, best);
- *ysize = Y_SIZE(face, best);
+ if (FT_Set_Char_Size(face, face->available_sizes[best].x_ppem, face->available_sizes[best].y_ppem, 0, 0) == 0) {
+ *xsize = face->available_sizes[best].x_ppem;
+ *ysize = face->available_sizes[best].y_ppem;
} else {
int err = 1;
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) && ysize == 0 && face->num_fixed_sizes >= 1) {
@@ -538,7 +510,7 @@ void QFreetypeFace::addGlyphToPath(FT_Face face, FT_GlyphSlot g, const QFixedPoi
extern void qt_addBitmapToPath(qreal x0, qreal y0, const uchar *image_data, int bpl, int w, int h, QPainterPath *path);
-void QFreetypeFace::addBitmapToPath(FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path, bool)
+void QFreetypeFace::addBitmapToPath(FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path)
{
if (slot->format != FT_GLYPH_FORMAT_BITMAP
|| slot->bitmap.pixel_mode != FT_PIXEL_MODE_MONO)
@@ -719,14 +691,8 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
if (FT_IS_SCALABLE(face)) {
bool fake_oblique = (fontDef.style != QFont::StyleNormal) && !(face->style_flags & FT_STYLE_FLAG_ITALIC);
- if (fake_oblique) {
-#if !defined(Q_HAS_FT_GLYPHSLOT_OBLIQUE)
- matrix.xy = 0x10000*3/10;
- transform = true;
-#else
+ if (fake_oblique)
obliquen = true;
-#endif
- }
FT_Set_Transform(face, &matrix, 0);
freetype->matrix = matrix;
// fake bold
@@ -758,7 +724,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
*/
if (FT_IS_SCALABLE(face)) {
for (int i = 0; i < face->num_fixed_sizes; ++i) {
- if (xsize == X_SIZE(face, i) && ysize == Y_SIZE(face, i)) {
+ if (xsize == face->available_sizes[i].x_ppem && ysize == face->available_sizes[i].y_ppem) {
face->face_flags &= ~FT_FACE_FLAG_SCALABLE;
FT_Select_Size(face, i);
@@ -908,9 +874,10 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
FT_GlyphSlot slot = face->glyph;
- if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(slot);
+ if (embolden)
+ FT_GlyphSlot_Embolden(slot);
if (obliquen) {
- Q_FT_GLYPHSLOT_OBLIQUE(slot);
+ FT_GlyphSlot_Oblique(slot);
// While Embolden alters the metrics of the slot, oblique does not, so we need
// to fix this ourselves.
@@ -924,8 +891,6 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
FT_Matrix_Multiply(&m, &matrix);
}
- FT_Library library = qt_getFreetype();
-
info.xOff = TRUNC(ROUND(slot->advance.x));
info.yOff = 0;
@@ -963,12 +928,12 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
return g;
}
- uchar *glyph_buffer = 0;
int glyph_buffer_size = 0;
+ QScopedArrayPointer<uchar> glyph_buffer;
#if defined(QT_USE_FREETYPE_LCDFILTER)
bool useFreetypeRenderGlyph = false;
if (slot->format == FT_GLYPH_FORMAT_OUTLINE && (hsubpixel || vfactor != 1)) {
- err = FT_Library_SetLcdFilter(library, (FT_LcdFilter)lcdFilterType);
+ err = FT_Library_SetLcdFilter(slot->library, (FT_LcdFilter)lcdFilterType);
if (err == FT_Err_Ok)
useFreetypeRenderGlyph = true;
}
@@ -979,7 +944,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
if (err != FT_Err_Ok)
qWarning("render glyph failed err=%x face=%p, glyph=%d", err, face, glyph);
- FT_Library_SetLcdFilter(library, FT_LCD_FILTER_NONE);
+ FT_Library_SetLcdFilter(slot->library, FT_LCD_FILTER_NONE);
info.height = slot->bitmap.rows / vfactor;
info.width = hsubpixel ? slot->bitmap.width / 3 : slot->bitmap.width;
@@ -987,12 +952,12 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
info.y = slot->bitmap_top;
glyph_buffer_size = info.width * info.height * 4;
- glyph_buffer = new uchar[glyph_buffer_size];
+ glyph_buffer.reset(new uchar[glyph_buffer_size]);
if (hsubpixel)
- convertRGBToARGB(slot->bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, slot->bitmap.pitch, subpixelType != Subpixel_RGB, false);
+ convertRGBToARGB(slot->bitmap.buffer, (uint *)glyph_buffer.data(), info.width, info.height, slot->bitmap.pitch, subpixelType != Subpixel_RGB, false);
else if (vfactor != 1)
- convertRGBToARGB_V(slot->bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, slot->bitmap.pitch, subpixelType != Subpixel_VRGB, false);
+ convertRGBToARGB_V(slot->bitmap.buffer, (uint *)glyph_buffer.data(), info.width, info.height, slot->bitmap.pitch, subpixelType != Subpixel_VRGB, false);
} else
#endif
{
@@ -1063,26 +1028,30 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
|| ((signed char)(info.xOff) != info.xOff));
if (large_glyph) {
- delete [] glyph_buffer;
return 0;
}
int pitch = (format == Format_Mono ? ((info.width + 31) & ~31) >> 3 :
(format == Format_A8 ? (info.width + 3) & ~3 : info.width * 4));
- glyph_buffer_size = pitch * info.height;
- glyph_buffer = new uchar[glyph_buffer_size];
- memset(glyph_buffer, 0, glyph_buffer_size);
+ if (glyph_buffer_size < pitch * info.height) {
+ glyph_buffer_size = pitch * info.height;
+ glyph_buffer.reset(new uchar[glyph_buffer_size]);
+ }
+ memset(glyph_buffer.data(), 0, glyph_buffer_size);
if (slot->format == FT_GLYPH_FORMAT_OUTLINE) {
FT_Bitmap bitmap;
bitmap.rows = info.height*vfactor;
bitmap.width = hpixels;
bitmap.pitch = format == Format_Mono ? (((info.width + 31) & ~31) >> 3) : ((bitmap.width + 3) & ~3);
- if (!hsubpixel && vfactor == 1 && format != Format_A32)
- bitmap.buffer = glyph_buffer;
- else
- bitmap.buffer = new uchar[bitmap.rows*bitmap.pitch];
- memset(bitmap.buffer, 0, bitmap.rows*bitmap.pitch);
+ int bitmap_buffer_size = bitmap.rows * bitmap.pitch;
+ if (!hsubpixel && vfactor == 1 && format != Format_A32) {
+ Q_ASSERT(glyph_buffer_size <= bitmap_buffer_size);
+ bitmap.buffer = glyph_buffer.data();
+ } else {
+ bitmap.buffer = new uchar[bitmap_buffer_size];
+ memset(bitmap.buffer, 0, bitmap_buffer_size);
+ }
bitmap.pixel_mode = format == Format_Mono ? FT_PIXEL_MODE_MONO : FT_PIXEL_MODE_GRAY;
FT_Matrix matrix;
matrix.xx = (hsubpixel ? 3 : 1) << 16;
@@ -1091,11 +1060,11 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
FT_Outline_Transform(&slot->outline, &matrix);
FT_Outline_Translate (&slot->outline, (hsubpixel ? -3*left +(4<<6) : -left), -bottom*vfactor);
- FT_Outline_Get_Bitmap(library, &slot->outline, &bitmap);
+ FT_Outline_Get_Bitmap(slot->library, &slot->outline, &bitmap);
if (hsubpixel) {
Q_ASSERT (bitmap.pixel_mode == FT_PIXEL_MODE_GRAY);
Q_ASSERT(antialias);
- uchar *convoluted = new uchar[bitmap.rows*bitmap.pitch];
+ uchar *convoluted = new uchar[bitmap_buffer_size];
bool useLegacyLcdFilter = false;
#if defined(FC_LCD_FILTER) && defined(FT_LCD_FILTER_H)
useLegacyLcdFilter = (lcdFilterType == FT_LCD_FILTER_LEGACY);
@@ -1105,20 +1074,20 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
convoluteBitmap(bitmap.buffer, convoluted, bitmap.width, info.height, bitmap.pitch);
buffer = convoluted;
}
- convertRGBToARGB(buffer + 1, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != Subpixel_RGB, useLegacyLcdFilter);
+ convertRGBToARGB(buffer + 1, (uint *)glyph_buffer.data(), info.width, info.height, bitmap.pitch, subpixelType != Subpixel_RGB, useLegacyLcdFilter);
delete [] convoluted;
} else if (vfactor != 1) {
- convertRGBToARGB_V(bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != Subpixel_VRGB, true);
+ convertRGBToARGB_V(bitmap.buffer, (uint *)glyph_buffer.data(), info.width, info.height, bitmap.pitch, subpixelType != Subpixel_VRGB, true);
} else if (format == Format_A32 && bitmap.pixel_mode == FT_PIXEL_MODE_GRAY) {
- convertGRAYToARGB(bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch);
+ convertGRAYToARGB(bitmap.buffer, (uint *)glyph_buffer.data(), info.width, info.height, bitmap.pitch);
}
- if (bitmap.buffer != glyph_buffer)
+ if (bitmap.buffer != glyph_buffer.data())
delete [] bitmap.buffer;
} else if (slot->format == FT_GLYPH_FORMAT_BITMAP) {
Q_ASSERT(slot->bitmap.pixel_mode == FT_PIXEL_MODE_MONO);
uchar *src = slot->bitmap.buffer;
- uchar *dst = glyph_buffer;
+ uchar *dst = glyph_buffer.data();
int h = slot->bitmap.rows;
if (format == Format_Mono) {
int bytes = ((info.width + 7) & ~7) >> 3;
@@ -1163,7 +1132,6 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
}
} else {
qWarning("QFontEngine: Glyph neither outline nor bitmap format=%d", slot->format);
- delete [] glyph_buffer;
return 0;
}
}
@@ -1182,7 +1150,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
g->advance = info.xOff;
g->format = format;
delete [] g->data;
- g->data = glyph_buffer;
+ g->data = glyph_buffer.take();
if (set)
set->setGlyph(glyph, subPixelPosition, g);
@@ -1366,14 +1334,14 @@ static inline FT_Matrix QTransformToFTMatrix(const QTransform &matrix)
return m;
}
-QFontEngineFT::QGlyphSet *QFontEngineFT::loadTransformedGlyphSet(const QTransform &matrix)
+QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
{
if (matrix.type() > QTransform::TxShear || !cacheEnabled)
return 0;
// FT_Set_Transform only supports scalable fonts
if (!FT_IS_SCALABLE(freetype->face))
- return 0;
+ return matrix.type() <= QTransform::TxTranslate ? &defaultGlyphSet : Q_NULLPTR;
FT_Matrix m = QTransformToFTMatrix(matrix);
@@ -1463,7 +1431,7 @@ void QFontEngineFT::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyph
for (int gl = 0; gl < glyphs.numGlyphs; gl++) {
FT_UInt glyph = positioned_glyphs[gl];
FT_Load_Glyph(face, glyph, FT_LOAD_TARGET_MONO);
- freetype->addBitmapToPath(face->glyph, positions[gl], path);
+ QFreetypeFace::addBitmapToPath(face->glyph, positions[gl], path);
}
unlockFace();
}
@@ -1482,8 +1450,10 @@ void QFontEngineFT::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int
FT_GlyphSlot g = face->glyph;
if (g->format != FT_GLYPH_FORMAT_OUTLINE)
continue;
- if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(g);
- if (obliquen) Q_FT_GLYPHSLOT_OBLIQUE(g);
+ if (embolden)
+ FT_GlyphSlot_Embolden(g);
+ if (obliquen)
+ FT_GlyphSlot_Oblique(g);
QFreetypeFace::addGlyphToPath(face, g, positions[gl], path, xsize, ysize);
}
unlockFace();
@@ -1775,7 +1745,7 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
format = QImage::Format_Mono;
break;
case Format_A8:
- format = QImage::Format_Indexed8;
+ format = QImage::Format_Alpha8;
break;
case Format_A32:
format = QImage::Format_ARGB32;
@@ -1786,17 +1756,12 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
};
QFontEngineFT::Glyph *glyph;
- QScopedPointer<QFontEngineFT::Glyph> glyphGuard;
if (cacheEnabled) {
- QFontEngineFT::QGlyphSet *gset = &defaultGlyphSet;
+ QGlyphSet *gset = loadGlyphSet(t);
QFontEngine::HintStyle hintStyle = default_hint_style;
if (t.type() >= QTransform::TxScale) {
// disable hinting if the glyphs are transformed
default_hint_style = HintNone;
- if (t.isAffine())
- gset = loadTransformedGlyphSet(t);
- else
- gset = 0;
}
if (gset) {
@@ -1806,15 +1771,13 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
freetype->matrix = m;
}
- if (!gset || gset->outline_drawing || !loadGlyph(gset, glyphIndex, subPixelPosition,
- neededFormat)) {
+ if (!gset || gset->outline_drawing || !(glyph = loadGlyph(gset, glyphIndex, subPixelPosition,
+ neededFormat))) {
default_hint_style = hintStyle;
return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, subPixelPosition, neededFormat, t,
offset);
}
default_hint_style = hintStyle;
-
- glyph = gset->getGlyph(glyphIndex, subPixelPosition);
} else {
FT_Matrix m = matrix;
FT_Matrix extra = QTransformToFTMatrix(t);
@@ -1822,10 +1785,11 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
FT_Set_Transform(freetype->face, &m, 0);
freetype->matrix = m;
glyph = loadGlyph(0, glyphIndex, subPixelPosition, neededFormat);
- glyphGuard.reset(glyph);
}
if (glyph == 0 || glyph->data == 0 || glyph->width == 0 || glyph->height == 0) {
+ if (!cacheEnabled && glyph != &emptyGlyph)
+ delete glyph;
unlockFace();
return 0;
}
@@ -1850,8 +1814,10 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
*offset = QPoint(glyph->x, -glyph->y);
currentlyLockedAlphaMap = QImage(glyph->data, glyph->width, glyph->height, pitch, format);
- if (!glyphGuard.isNull())
+ if (!cacheEnabled && glyph != &emptyGlyph) {
currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy();
+ delete glyph;
+ }
Q_ASSERT(!currentlyLockedAlphaMap.isNull());
QImageData *data = currentlyLockedAlphaMap.data_ptr();
@@ -1873,31 +1839,20 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphFor(glyph_t g,
const QTransform &t,
bool fetchBoundingBox)
{
- FT_Face face = 0;
- QGlyphSet *glyphSet = 0;
- FT_Matrix ftMatrix = QTransformToFTMatrix(t);
- if (cacheEnabled) {
- if (t.type() > QTransform::TxTranslate && FT_IS_SCALABLE(freetype->face))
- glyphSet = loadTransformedGlyphSet(t);
- else
- glyphSet = &defaultGlyphSet;
- Q_ASSERT(glyphSet != 0);
- }
-
+ QGlyphSet *glyphSet = loadGlyphSet(t);
if (glyphSet != 0 && glyphSet->outline_drawing && !fetchBoundingBox)
return 0;
Glyph *glyph = glyphSet != 0 ? glyphSet->getGlyph(g, subPixelPosition) : 0;
- if (!glyph || glyph->format != format) {
- face = lockFace();
+ if (!glyph || glyph->format != format || (!fetchBoundingBox && !glyph->data)) {
+ lockFace();
FT_Matrix m = this->matrix;
+ FT_Matrix ftMatrix = glyphSet != 0 ? glyphSet->transformationMatrix : QTransformToFTMatrix(t);
FT_Matrix_Multiply(&ftMatrix, &m);
freetype->matrix = m;
glyph = loadGlyph(glyphSet, g, subPixelPosition, format, false);
- }
-
- if (face)
unlockFace();
+ }
return glyph;
}
@@ -1909,23 +1864,17 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition)
QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition, const QTransform &t)
{
- lockFace();
-
- QScopedPointer<Glyph> glyph(loadGlyphFor(g, subPixelPosition, antialias ? Format_A8 : Format_Mono, t));
+ Glyph *glyph = loadGlyphFor(g, subPixelPosition, antialias ? Format_A8 : Format_Mono, t);
if (!glyph || !glyph->data) {
- unlockFace();
+ if (!cacheEnabled && glyph != &emptyGlyph)
+ delete glyph;
return QFontEngine::alphaMapForGlyph(g);
}
const int pitch = antialias ? (glyph->width + 3) & ~3 : ((glyph->width + 31)/32) * 4;
- QImage img(glyph->width, glyph->height, antialias ? QImage::Format_Indexed8 : QImage::Format_Mono);
- if (antialias) {
- QVector<QRgb> colors(256);
- for (int i=0; i<256; ++i)
- colors[i] = qRgba(0, 0, 0, i);
- img.setColorTable(colors);
- } else {
+ QImage img(glyph->width, glyph->height, antialias ? QImage::Format_Alpha8 : QImage::Format_Mono);
+ if (!antialias) {
QVector<QRgb> colors(2);
colors[0] = qRgba(0, 0, 0, 0);
colors[1] = qRgba(0, 0, 0, 255);
@@ -1936,9 +1885,9 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition, const
for (int y = 0; y < glyph->height; ++y)
memcpy(img.scanLine(y), &glyph->data[y * pitch], pitch);
}
- if (cacheEnabled)
- glyph.take();
- unlockFace();
+
+ if (!cacheEnabled && glyph != &emptyGlyph)
+ delete glyph;
return img;
}
@@ -1948,20 +1897,18 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, QFixed subPixelPosition, co
if (t.type() > QTransform::TxRotate)
return QFontEngine::alphaRGBMapForGlyph(g, subPixelPosition, t);
- lockFace();
-
- QScopedPointer<Glyph> glyph(loadGlyphFor(g, subPixelPosition, Format_A32, t));
+ Glyph *glyph = loadGlyphFor(g, subPixelPosition, Format_A32, t);
if (!glyph || !glyph->data) {
- unlockFace();
+ if (!cacheEnabled && glyph != &emptyGlyph)
+ delete glyph;
return QFontEngine::alphaRGBMapForGlyph(g, subPixelPosition, t);
}
QImage img(glyph->width, glyph->height, QImage::Format_RGB32);
memcpy(img.bits(), glyph->data, 4 * glyph->width * glyph->height);
- if (cacheEnabled)
- glyph.take();
- unlockFace();
+ if (!cacheEnabled && glyph != &emptyGlyph)
+ delete glyph;
return img;
}
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index b40893c445..e9d058d50c 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -102,7 +102,7 @@ public:
int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints);
static void addGlyphToPath(FT_Face face, FT_GlyphSlot g, const QFixedPoint &point, QPainterPath *path, FT_Fixed x_scale, FT_Fixed y_scale);
- static void addBitmapToPath(FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path, bool = false);
+ static void addBitmapToPath(FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path);
private:
friend class QFontEngineFT;
@@ -188,67 +188,67 @@ private:
mutable int fast_glyph_count;
};
- virtual QFontEngine::FaceId faceId() const;
- virtual QFontEngine::Properties properties() const;
- virtual QFixed emSquareSize() const;
- virtual bool supportsSubPixelPositions() const
+ virtual QFontEngine::FaceId faceId() const Q_DECL_OVERRIDE;
+ virtual QFontEngine::Properties properties() const Q_DECL_OVERRIDE;
+ virtual QFixed emSquareSize() const Q_DECL_OVERRIDE;
+ virtual bool supportsSubPixelPositions() const Q_DECL_OVERRIDE
{
return default_hint_style == HintLight ||
default_hint_style == HintNone;
}
- virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
- virtual int synthesized() const;
+ virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const Q_DECL_OVERRIDE;
+ virtual int synthesized() const Q_DECL_OVERRIDE;
- virtual QFixed ascent() const;
- virtual QFixed descent() const;
- virtual QFixed leading() const;
- virtual QFixed xHeight() const;
- virtual QFixed averageCharWidth() const;
+ virtual QFixed ascent() const Q_DECL_OVERRIDE;
+ virtual QFixed descent() const Q_DECL_OVERRIDE;
+ virtual QFixed leading() const Q_DECL_OVERRIDE;
+ virtual QFixed xHeight() const Q_DECL_OVERRIDE;
+ virtual QFixed averageCharWidth() const Q_DECL_OVERRIDE;
- virtual qreal maxCharWidth() const;
- virtual qreal minLeftBearing() const;
- virtual qreal minRightBearing() const;
- virtual QFixed lineThickness() const;
- virtual QFixed underlinePosition() const;
+ virtual qreal maxCharWidth() const Q_DECL_OVERRIDE;
+ virtual qreal minLeftBearing() const Q_DECL_OVERRIDE;
+ virtual qreal minRightBearing() const Q_DECL_OVERRIDE;
+ virtual QFixed lineThickness() const Q_DECL_OVERRIDE;
+ virtual QFixed underlinePosition() const Q_DECL_OVERRIDE;
- virtual glyph_t glyphIndex(uint ucs4) const;
- void doKerning(QGlyphLayout *, ShaperFlags) const;
+ virtual glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE;
+ void doKerning(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE;
- virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
+ virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) Q_DECL_OVERRIDE;
- virtual bool supportsTransformation(const QTransform &transform) const;
+ virtual bool supportsTransformation(const QTransform &transform) const Q_DECL_OVERRIDE;
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs,
- QPainterPath *path, QTextItem::RenderFlags flags);
+ QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE;
virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs,
- QPainterPath *path, QTextItem::RenderFlags flags);
+ QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE;
- virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
+ virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE;
- virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
- virtual glyph_metrics_t boundingBox(glyph_t glyph);
- virtual glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix);
+ virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE;
+ virtual glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE;
+ virtual glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix) Q_DECL_OVERRIDE;
- virtual void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const;
- virtual QImage alphaMapForGlyph(glyph_t g) { return alphaMapForGlyph(g, 0); }
- virtual QImage alphaMapForGlyph(glyph_t, QFixed);
- QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t);
- virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
+ virtual void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const Q_DECL_OVERRIDE;
+ virtual QImage alphaMapForGlyph(glyph_t g) Q_DECL_OVERRIDE { return alphaMapForGlyph(g, 0); }
+ virtual QImage alphaMapForGlyph(glyph_t, QFixed) Q_DECL_OVERRIDE;
+ QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE;
+ virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE;
virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph,
QFixed subPixelPosition,
const QTransform &matrix,
- QFontEngine::GlyphFormat format);
+ QFontEngine::GlyphFormat format) Q_DECL_OVERRIDE;
virtual QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition,
GlyphFormat neededFormat, const QTransform &t,
- QPoint *offset);
- virtual bool hasInternalCaching() const { return cacheEnabled; }
- virtual void unlockAlphaMapForGlyph();
+ QPoint *offset) Q_DECL_OVERRIDE;
+ virtual bool hasInternalCaching() const Q_DECL_OVERRIDE { return cacheEnabled; }
+ virtual void unlockAlphaMapForGlyph() Q_DECL_OVERRIDE;
- virtual void removeGlyphFromCache(glyph_t glyph);
- virtual int glyphMargin(QFontEngine::GlyphFormat /* format */) { return 0; }
+ virtual void removeGlyphFromCache(glyph_t glyph) Q_DECL_OVERRIDE;
+ virtual int glyphMargin(QFontEngine::GlyphFormat /* format */) Q_DECL_OVERRIDE { return 0; }
- virtual int glyphCount() const;
+ virtual int glyphCount() const Q_DECL_OVERRIDE;
enum Scaling {
Scaled,
@@ -268,7 +268,7 @@ private:
Glyph *loadGlyph(QGlyphSet *set, uint glyph, QFixed subPixelPosition, GlyphFormat = Format_None, bool fetchMetricsOnly = false) const;
Glyph *loadGlyphFor(glyph_t g, QFixed subPixelPosition, GlyphFormat format, const QTransform &t, bool fetchBoundingBox = false);
- QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix);
+ QGlyphSet *loadGlyphSet(const QTransform &matrix);
QFontEngineFT(const QFontDef &fd);
virtual ~QFontEngineFT();
@@ -278,12 +278,12 @@ private:
bool init(FaceId faceId, bool antialias, GlyphFormat format,
QFreetypeFace *freetypeFace);
- virtual int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints);
+ virtual int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) Q_DECL_OVERRIDE;
- virtual void setDefaultHintStyle(HintStyle style);
+ virtual void setDefaultHintStyle(HintStyle style) Q_DECL_OVERRIDE;
- virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
+ virtual QFontEngine *cloneWithSize(qreal pixelSize) const Q_DECL_OVERRIDE;
bool initFromFontEngine(const QFontEngineFT *fontEngine);
HintStyle defaultHintStyle() const { return default_hint_style; }
@@ -305,6 +305,7 @@ protected:
private:
friend class QFontEngineFTRawFont;
friend class QFontconfigDatabase;
+ friend class QBasicFontDatabase;
friend class QFontEngineMultiFontConfig;
int loadFlags(QGlyphSet *set, GlyphFormat format, int flags, bool &hsubpixel, int &vfactor) const;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 9364b82bed..2076fa4d80 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -78,10 +78,6 @@ enum HB_Compat_Error {
typedef void (*qt_destroy_func_t) (void *user_data);
typedef bool (*qt_get_font_table_func_t) (void *user_data, uint tag, uchar *buffer, uint *length);
-const QFont::Weight qt_mediumFontWeight = static_cast<QFont::Weight>(57);
-const QFont::Weight qt_extralightFontWeight = static_cast<QFont::Weight>(12);
-const QFont::Weight qt_thinFontWeight = static_cast<QFont::Weight>(0);
-
class Q_GUI_EXPORT QFontEngine
{
public:
@@ -351,26 +347,26 @@ public:
QFontEngineBox(int size);
~QFontEngineBox();
- virtual glyph_t glyphIndex(uint ucs4) const;
- virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
- virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const;
+ virtual glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE;
+ virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE;
+ virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE;
void draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si);
- virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags);
-
- virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
- virtual glyph_metrics_t boundingBox(glyph_t glyph);
- virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
-
- virtual QFixed ascent() const;
- virtual QFixed descent() const;
- virtual QFixed leading() const;
- virtual qreal maxCharWidth() const;
- virtual qreal minLeftBearing() const { return 0; }
- virtual qreal minRightBearing() const { return 0; }
- virtual QImage alphaMapForGlyph(glyph_t);
+ virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE;
+
+ virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE;
+ virtual glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE;
+ virtual QFontEngine *cloneWithSize(qreal pixelSize) const Q_DECL_OVERRIDE;
+
+ virtual QFixed ascent() const Q_DECL_OVERRIDE;
+ virtual QFixed descent() const Q_DECL_OVERRIDE;
+ virtual QFixed leading() const Q_DECL_OVERRIDE;
+ virtual qreal maxCharWidth() const Q_DECL_OVERRIDE;
+ virtual qreal minLeftBearing() const Q_DECL_OVERRIDE { return 0; }
+ virtual qreal minRightBearing() const Q_DECL_OVERRIDE { return 0; }
+ virtual QImage alphaMapForGlyph(glyph_t) Q_DECL_OVERRIDE;
- virtual bool canRender(const QChar *string, int len) const;
+ virtual bool canRender(const QChar *string, int len) const Q_DECL_OVERRIDE;
inline int size() const { return _size; }
@@ -385,79 +381,61 @@ private:
class Q_GUI_EXPORT QFontEngineMulti : public QFontEngine
{
public:
- explicit QFontEngineMulti(int engineCount);
+ explicit QFontEngineMulti(QFontEngine *engine, int script, const QStringList &fallbackFamilies = QStringList());
~QFontEngineMulti();
- virtual glyph_t glyphIndex(uint ucs4) const;
- virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
-
- virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
- virtual glyph_metrics_t boundingBox(glyph_t glyph);
-
- virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const;
- virtual void doKerning(QGlyphLayout *, ShaperFlags) const;
- virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags);
- virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
+ virtual glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE;
+ virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE;
- virtual QFixed ascent() const;
- virtual QFixed descent() const;
- virtual QFixed leading() const;
- virtual QFixed xHeight() const;
- virtual QFixed averageCharWidth() const;
- virtual QImage alphaMapForGlyph(glyph_t);
- virtual QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition);
- virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t);
- virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
- virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
+ virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE;
+ virtual glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE;
- virtual QFixed lineThickness() const;
- virtual QFixed underlinePosition() const;
- virtual qreal maxCharWidth() const;
- virtual qreal minLeftBearing() const;
- virtual qreal minRightBearing() const;
+ virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE;
+ virtual void doKerning(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE;
+ virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE;
+ virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0) Q_DECL_OVERRIDE;
- virtual bool canRender(const QChar *string, int len) const;
+ virtual QFixed ascent() const Q_DECL_OVERRIDE;
+ virtual QFixed descent() const Q_DECL_OVERRIDE;
+ virtual QFixed leading() const Q_DECL_OVERRIDE;
+ virtual QFixed xHeight() const Q_DECL_OVERRIDE;
+ virtual QFixed averageCharWidth() const Q_DECL_OVERRIDE;
+ virtual QImage alphaMapForGlyph(glyph_t) Q_DECL_OVERRIDE;
+ virtual QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition) Q_DECL_OVERRIDE;
+ virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t) Q_DECL_OVERRIDE;
+ virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE;
+ virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE;
- QFontEngine *engine(int at) const
- {Q_ASSERT(at < engines.size()); return engines.at(at); }
+ virtual QFixed lineThickness() const Q_DECL_OVERRIDE;
+ virtual QFixed underlinePosition() const Q_DECL_OVERRIDE;
+ virtual qreal maxCharWidth() const Q_DECL_OVERRIDE;
+ virtual qreal minLeftBearing() const Q_DECL_OVERRIDE;
+ virtual qreal minRightBearing() const Q_DECL_OVERRIDE;
- inline void ensureEngineAt(int at)
- {
- if (at >= engines.size() || engines.at(at) == 0)
- loadEngine(at);
- }
+ virtual bool canRender(const QChar *string, int len) const Q_DECL_OVERRIDE;
- virtual bool shouldLoadFontEngineForCharacter(int at, uint ucs4) const;
- virtual void setFallbackFamiliesList(const QStringList &) {}
+ inline int fallbackFamilyCount() const { return m_fallbackFamilies.size(); }
+ inline QString fallbackFamilyAt(int at) const { return m_fallbackFamilies.at(at); }
-protected:
- friend class QRawFont;
- virtual void loadEngine(int at) = 0;
- virtual void ensureFallbackFamiliesQueried() {}
- QVector<QFontEngine *> engines;
-};
+ void setFallbackFamiliesList(const QStringList &fallbackFamilies);
-class Q_GUI_EXPORT QFontEngineMultiBasicImpl : public QFontEngineMulti
-{
-public:
- QFontEngineMultiBasicImpl(QFontEngine *fe, int script, const QStringList &fallbacks);
- QFontEngineMultiBasicImpl(QFontEngine *fe, int script);
+ inline QFontEngine *engine(int at) const
+ { Q_ASSERT(at < m_engines.size()); return m_engines.at(at); }
- void loadEngine(int at);
- static QFontEngine* createMultiFontEngine(QFontEngine *fe, int script);
+ void ensureEngineAt(int at);
- int fallbackFamilyCount() const { return fallbackFamilies.size(); }
- QString fallbackFamilyAt(int at) const { return fallbackFamilies.at(at); }
+ static QFontEngine *createMultiFontEngine(QFontEngine *fe, int script);
+protected:
virtual void ensureFallbackFamiliesQueried();
- virtual void setFallbackFamiliesList(const QStringList &fallbacks);
+ virtual bool shouldLoadFontEngineForCharacter(int at, uint ucs4) const;
+ virtual QFontEngine *loadEngine(int at);
private:
- void init(QFontEngine *fe);
-
- mutable QStringList fallbackFamilies;
- int script;
- mutable bool fallbacksQueried;
+ QVector<QFontEngine *> m_engines;
+ QStringList m_fallbackFamilies;
+ const int m_script;
+ bool m_fallbackFamiliesQueried;
};
class QTestFontEngine : public QFontEngineBox
diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp
index 4785902c99..7e16983b6c 100644
--- a/src/gui/text/qfontengine_qpf2.cpp
+++ b/src/gui/text/qfontengine_qpf2.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -396,7 +396,7 @@ QImage QFontEngineQPF2::alphaMapForGlyph(glyph_t g)
const uchar *bits = ((const uchar *) glyph) + sizeof(Glyph);
- QImage image(bits,glyph->width, glyph->height, glyph->bytesPerLine, QImage::Format_Indexed8);
+ QImage image(bits,glyph->width, glyph->height, glyph->bytesPerLine, QImage::Format_Alpha8);
return image;
}
diff --git a/src/gui/text/qfontengine_qpf2_p.h b/src/gui/text/qfontengine_qpf2_p.h
index e8c3989b58..349fd483bf 100644
--- a/src/gui/text/qfontengine_qpf2_p.h
+++ b/src/gui/text/qfontengine_qpf2_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -152,29 +152,29 @@ public:
QFontEngineQPF2(const QFontDef &def, const QByteArray &data);
~QFontEngineQPF2();
- FaceId faceId() const { return face_id; }
- bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
+ FaceId faceId() const Q_DECL_OVERRIDE { return face_id; }
+ bool getSfntTableData(uint tag, uchar *buffer, uint *length) const Q_DECL_OVERRIDE;
- virtual glyph_t glyphIndex(uint ucs4) const;
- bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const;
- void recalcAdvances(QGlyphLayout *, ShaperFlags) const;
+ virtual glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE;
+ bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE;
+ void recalcAdvances(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE;
- void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags);
- QImage alphaMapForGlyph(glyph_t t);
+ void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE;
+ QImage alphaMapForGlyph(glyph_t t) Q_DECL_OVERRIDE;
- glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
- glyph_metrics_t boundingBox(glyph_t glyph);
+ glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE;
+ glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE;
- QFixed ascent() const;
- QFixed descent() const;
- QFixed leading() const;
- qreal maxCharWidth() const;
- qreal minLeftBearing() const;
- qreal minRightBearing() const;
- QFixed underlinePosition() const;
- QFixed lineThickness() const;
+ QFixed ascent() const Q_DECL_OVERRIDE;
+ QFixed descent() const Q_DECL_OVERRIDE;
+ QFixed leading() const Q_DECL_OVERRIDE;
+ qreal maxCharWidth() const Q_DECL_OVERRIDE;
+ qreal minLeftBearing() const Q_DECL_OVERRIDE;
+ qreal minRightBearing() const Q_DECL_OVERRIDE;
+ QFixed underlinePosition() const Q_DECL_OVERRIDE;
+ QFixed lineThickness() const Q_DECL_OVERRIDE;
- virtual int glyphCount() const { return glyphMapEntries; }
+ virtual int glyphCount() const Q_DECL_OVERRIDE { return glyphMapEntries; }
bool isValid() const;
diff --git a/src/gui/text/qfontengineglyphcache_p.h b/src/gui/text/qfontengineglyphcache_p.h
index 4a3345f9df..6cf4d2f1ba 100644
--- a/src/gui/text/qfontengineglyphcache_p.h
+++ b/src/gui/text/qfontengineglyphcache_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qfontinfo.h b/src/gui/text/qfontinfo.h
index 68647d6841..76addc9aa5 100644
--- a/src/gui/text/qfontinfo.h
+++ b/src/gui/text/qfontinfo.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -65,7 +65,9 @@ public:
bool strikeOut() const;
bool fixedPitch() const;
QFont::StyleHint styleHint() const;
+#if QT_DEPRECATED_SINCE(5, 5)
bool rawMode() const;
+#endif
bool exactMatch() const;
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index e010dd62ae..c2d4b64152 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -38,9 +38,6 @@
#include "qfont_p.h"
#include "qfontengine_p.h"
-#include <math.h>
-
-
QT_BEGIN_NAMESPACE
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index c152ad21c7..12aa2dadb4 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp
index 160472cb5d..9f652084be 100644
--- a/src/gui/text/qfontsubset.cpp
+++ b/src/gui/text/qfontsubset.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -36,7 +36,6 @@
#include <qendian.h>
#include <qpainterpath.h>
#include "private/qpdf_p.h"
-#include "private/qfunctions_p.h"
#include "qfontsubset_agl.cpp"
@@ -421,7 +420,7 @@ static quint32 checksum(const QByteArray &table)
{
quint32 sum = 0;
int offset = 0;
- const uchar *d = (uchar *)table.constData();
+ const uchar *d = (const uchar *)table.constData();
while (offset <= table.size()-3) {
sum += qFromBigEndian<quint32>(d + offset);
offset += 4;
@@ -979,7 +978,7 @@ static QTtfGlyph generateGlyph(int index, const QPainterPath &path, qreal advanc
return glyph;
}
-Q_STATIC_GLOBAL_OPERATOR bool operator <(const QTtfGlyph &g1, const QTtfGlyph &g2)
+static bool operator <(const QTtfGlyph &g1, const QTtfGlyph &g2)
{
return g1.index < g2.index;
}
@@ -1057,7 +1056,7 @@ static QList<QTtfTable> generateGlyphTables(qttf_font_tables &tables, const QLis
return list;
}
-Q_STATIC_GLOBAL_OPERATOR bool operator <(const QTtfTable &t1, const QTtfTable &t2)
+static bool operator <(const QTtfTable &t1, const QTtfTable &t2)
{
return t1.tag < t2.tag;
}
diff --git a/src/gui/text/qfontsubset_agl.cpp b/src/gui/text/qfontsubset_agl.cpp
index 48924deff2..5ad1dea3ab 100644
--- a/src/gui/text/qfontsubset_agl.cpp
+++ b/src/gui/text/qfontsubset_agl.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qfontsubset_p.h b/src/gui/text/qfontsubset_p.h
index 2e9021d3f1..da8589de3f 100644
--- a/src/gui/text/qfontsubset_p.h
+++ b/src/gui/text/qfontsubset_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qfragmentmap.cpp b/src/gui/text/qfragmentmap.cpp
index 52c57d7722..1211547767 100644
--- a/src/gui/text/qfragmentmap.cpp
+++ b/src/gui/text/qfragmentmap.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qfragmentmap_p.h b/src/gui/text/qfragmentmap_p.h
index 012d3c25ce..4af2d2f772 100644
--- a/src/gui/text/qfragmentmap_p.h
+++ b/src/gui/text/qfragmentmap_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -249,6 +249,8 @@ uint QFragmentMapData<Fragment>::createFragment()
uint freePos = head->freelist;
if (freePos == head->allocated) {
// need to create some free space
+ if (freePos >= uint(MaxAllocSize) / fragmentSize)
+ qBadAlloc();
uint needed = qAllocMore((freePos+1)*fragmentSize, 0);
Q_ASSERT(needed/fragmentSize > head->allocated);
Fragment *newFragments = (Fragment *)realloc(fragments, needed);
diff --git a/src/gui/text/qglyphrun.cpp b/src/gui/text/qglyphrun.cpp
index 72c1e764eb..e6d6863134 100644
--- a/src/gui/text/qglyphrun.cpp
+++ b/src/gui/text/qglyphrun.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h
index 7c9efa1d37..d3034b7546 100644
--- a/src/gui/text/qglyphrun.h
+++ b/src/gui/text/qglyphrun.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qglyphrun_p.h b/src/gui/text/qglyphrun_p.h
index d18d7129f9..1b9e25b188 100644
--- a/src/gui/text/qglyphrun_p.h
+++ b/src/gui/text/qglyphrun_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp
index 16c45e642b..102c62ea8a 100644
--- a/src/gui/text/qharfbuzzng.cpp
+++ b/src/gui/text/qharfbuzzng.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Konstantin Ritt
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -94,6 +94,8 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_BUHID,
HB_SCRIPT_TAGBANWA,
HB_SCRIPT_COPTIC,
+
+ // Unicode 4.0 additions
HB_SCRIPT_LIMBU,
HB_SCRIPT_TAI_LE,
HB_SCRIPT_LINEAR_B,
@@ -102,6 +104,8 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_OSMANYA,
HB_SCRIPT_CYPRIOT,
HB_SCRIPT_BRAILLE,
+
+ // Unicode 4.1 additions
HB_SCRIPT_BUGINESE,
HB_SCRIPT_NEW_TAI_LUE,
HB_SCRIPT_GLAGOLITIC,
@@ -109,11 +113,15 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_SYLOTI_NAGRI,
HB_SCRIPT_OLD_PERSIAN,
HB_SCRIPT_KHAROSHTHI,
+
+ // Unicode 5.0 additions
HB_SCRIPT_BALINESE,
HB_SCRIPT_CUNEIFORM,
HB_SCRIPT_PHOENICIAN,
HB_SCRIPT_PHAGS_PA,
HB_SCRIPT_NKO,
+
+ // Unicode 5.1 additions
HB_SCRIPT_SUNDANESE,
HB_SCRIPT_LEPCHA,
HB_SCRIPT_OL_CHIKI,
@@ -125,6 +133,8 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_CARIAN,
HB_SCRIPT_LYDIAN,
HB_SCRIPT_CHAM,
+
+ // Unicode 5.2 additions
HB_SCRIPT_TAI_THAM,
HB_SCRIPT_TAI_VIET,
HB_SCRIPT_AVESTAN,
@@ -140,16 +150,45 @@ static const hb_script_t _qtscript_to_hbscript[] = {
HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
HB_SCRIPT_OLD_TURKIC,
HB_SCRIPT_KAITHI,
+
+ // Unicode 6.0 additions
HB_SCRIPT_BATAK,
HB_SCRIPT_BRAHMI,
HB_SCRIPT_MANDAIC,
+
+ // Unicode 6.1 additions
HB_SCRIPT_CHAKMA,
HB_SCRIPT_MEROITIC_CURSIVE,
HB_SCRIPT_MEROITIC_HIEROGLYPHS,
HB_SCRIPT_MIAO,
HB_SCRIPT_SHARADA,
HB_SCRIPT_SORA_SOMPENG,
- HB_SCRIPT_TAKRI
+ HB_SCRIPT_TAKRI,
+
+ // Unicode 7.0 additions
+ HB_SCRIPT_CAUCASIAN_ALBANIAN,
+ HB_SCRIPT_BASSA_VAH,
+ HB_SCRIPT_DUPLOYAN,
+ HB_SCRIPT_ELBASAN,
+ HB_SCRIPT_GRANTHA,
+ HB_SCRIPT_PAHAWH_HMONG,
+ HB_SCRIPT_KHOJKI,
+ HB_SCRIPT_LINEAR_A,
+ HB_SCRIPT_MAHAJANI,
+ HB_SCRIPT_MANICHAEAN,
+ HB_SCRIPT_MENDE_KIKAKUI,
+ HB_SCRIPT_MODI,
+ HB_SCRIPT_MRO,
+ HB_SCRIPT_OLD_NORTH_ARABIAN,
+ HB_SCRIPT_NABATAEAN,
+ HB_SCRIPT_PALMYRENE,
+ HB_SCRIPT_PAU_CIN_HAU,
+ HB_SCRIPT_OLD_PERMIC,
+ HB_SCRIPT_PSALTER_PAHLAVI,
+ HB_SCRIPT_SIDDHAM,
+ HB_SCRIPT_KHUDAWADI,
+ HB_SCRIPT_TIRHUTA,
+ HB_SCRIPT_WARANG_CITI
};
Q_STATIC_ASSERT(QChar::ScriptCount == sizeof(_qtscript_to_hbscript) / sizeof(_qtscript_to_hbscript[0]));
@@ -375,7 +414,7 @@ _hb_qt_font_get_glyph(hb_font_t * /*font*/, void *font_data,
hb_codepoint_t *glyph,
void * /*user_data*/)
{
- QFontEngine *fe = (QFontEngine *)font_data;
+ QFontEngine *fe = static_cast<QFontEngine *>(font_data);
Q_ASSERT(fe);
*glyph = fe->glyphIndex(unicode);
@@ -388,7 +427,7 @@ _hb_qt_font_get_glyph_h_advance(hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
void * /*user_data*/)
{
- QFontEngine *fe = (QFontEngine *)font_data;
+ QFontEngine *fe = static_cast<QFontEngine *>(font_data);
Q_ASSERT(fe);
QFixed advance;
@@ -436,7 +475,7 @@ _hb_qt_font_get_glyph_h_kerning(hb_font_t *font, void *font_data,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
void * /*user_data*/)
{
- QFontEngine *fe = (QFontEngine *)font_data;
+ QFontEngine *fe = static_cast<QFontEngine *>(font_data);
Q_ASSERT(fe);
glyph_t glyphs[2] = { first_glyph, second_glyph };
@@ -467,7 +506,7 @@ _hb_qt_font_get_glyph_extents(hb_font_t * /*font*/, void *font_data,
hb_glyph_extents_t *extents,
void * /*user_data*/)
{
- QFontEngine *fe = (QFontEngine *)font_data;
+ QFontEngine *fe = static_cast<QFontEngine *>(font_data);
Q_ASSERT(fe);
glyph_metrics_t gm = fe->boundingBox(glyph);
@@ -486,7 +525,7 @@ _hb_qt_font_get_glyph_contour_point(hb_font_t * /*font*/, void *font_data,
unsigned int point_index, hb_position_t *x, hb_position_t *y,
void * /*user_data*/)
{
- QFontEngine *fe = (QFontEngine *)font_data;
+ QFontEngine *fe = static_cast<QFontEngine *>(font_data);
Q_ASSERT(fe);
QFixed xpos, ypos;
@@ -573,7 +612,7 @@ hb_font_funcs_t *hb_qt_get_font_funcs()
static hb_blob_t *
_hb_qt_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
{
- QFontEngine::FaceData *data = (QFontEngine::FaceData *)user_data;
+ QFontEngine::FaceData *data = static_cast<QFontEngine::FaceData *>(user_data);
Q_ASSERT(data);
qt_get_font_table_func_t get_font_table = data->get_font_table;
@@ -583,21 +622,21 @@ _hb_qt_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
if (Q_UNLIKELY(!get_font_table(data->user_data, tag, 0, &length)))
return hb_blob_get_empty();
- char *buffer = (char *)malloc(length);
+ char *buffer = static_cast<char *>(malloc(length));
Q_CHECK_PTR(buffer);
if (Q_UNLIKELY(!get_font_table(data->user_data, tag, reinterpret_cast<uchar *>(buffer), &length)))
length = 0;
return hb_blob_create(const_cast<const char *>(buffer), length,
- HB_MEMORY_MODE_WRITABLE,
+ HB_MEMORY_MODE_READONLY,
buffer, free);
}
static inline hb_face_t *
_hb_qt_face_create(QFontEngine *fe)
{
- QFontEngine::FaceData *data = (QFontEngine::FaceData *)malloc(sizeof(QFontEngine::FaceData));
+ QFontEngine::FaceData *data = static_cast<QFontEngine::FaceData *>(malloc(sizeof(QFontEngine::FaceData)));
Q_CHECK_PTR(data);
data->user_data = fe->faceData.user_data;
data->get_font_table = fe->faceData.get_font_table;
@@ -618,7 +657,7 @@ static void
_hb_qt_face_release(void *user_data)
{
if (Q_LIKELY(user_data))
- hb_face_destroy((hb_face_t *)user_data);
+ hb_face_destroy(static_cast<hb_face_t *>(user_data));
}
hb_face_t *hb_qt_face_get_for_engine(QFontEngine *fe)
@@ -632,7 +671,7 @@ hb_face_t *hb_qt_face_get_for_engine(QFontEngine *fe)
fe->face_destroy_func = _hb_qt_face_release;
}
- return (hb_face_t *)fe->face_;
+ return static_cast<hb_face_t *>(fe->face_);
}
@@ -668,7 +707,7 @@ static void
_hb_qt_font_release(void *user_data)
{
if (Q_LIKELY(user_data))
- hb_font_destroy((hb_font_t *)user_data);
+ hb_font_destroy(static_cast<hb_font_t *>(user_data));
}
hb_font_t *hb_qt_font_get_for_engine(QFontEngine *fe)
@@ -682,7 +721,7 @@ hb_font_t *hb_qt_font_get_for_engine(QFontEngine *fe)
fe->font_destroy_func = _hb_qt_font_release;
}
- return (hb_font_t *)fe->font_;
+ return static_cast<hb_font_t *>(fe->font_);
}
QT_END_NAMESPACE
diff --git a/src/gui/text/qharfbuzzng_p.h b/src/gui/text/qharfbuzzng_p.h
index 64c99ef133..d5e11e6264 100644
--- a/src/gui/text/qharfbuzzng_p.h
+++ b/src/gui/text/qharfbuzzng_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Konstantin Ritt
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index f18ddbab8a..5fa43948aa 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -34,6 +34,9 @@
#include "qplatformfontdatabase.h"
#include <QtGui/private/qfontengine_p.h>
#include <QtGui/private/qfontengine_qpf2_p.h>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QScreen>
+#include <qpa/qplatformscreen.h>
#include <QtCore/QLibraryInfo>
#include <QtCore/QDir>
@@ -314,7 +317,7 @@ void QPlatformFontDatabase::invalidate()
*/
QFontEngineMulti *QPlatformFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
{
- return new QFontEngineMultiBasicImpl(fontEngine, script);
+ return new QFontEngineMulti(fontEngine, script);
}
/*!
@@ -457,6 +460,15 @@ bool QPlatformFontDatabase::fontsAlwaysScalable() const
return ret;
}
+QFontEngine::SubpixelAntialiasingType QPlatformFontDatabase::subpixelAntialiasingTypeHint() const
+{
+ static int type = -1;
+ if (type == -1) {
+ if (QScreen *screen = QGuiApplication::primaryScreen())
+ type = screen->handle()->subpixelAntialiasingTypeHint();
+ }
+ return static_cast<QFontEngine::SubpixelAntialiasingType>(type);
+}
// ### copied to tools/makeqpf/qpf2.cpp
@@ -510,9 +522,11 @@ enum {
VietnameseCsbBit = 8,
SimplifiedChineseCsbBit = 18,
TraditionalChineseCsbBit = 20,
+ ThaiCsbBit = 16,
JapaneseCsbBit = 17,
KoreanCsbBit = 19,
- KoreanJohabCsbBit = 21
+ KoreanJohabCsbBit = 21,
+ SymbolCsbBit = 31
};
/*!
@@ -567,6 +581,11 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q
hasScript = true;
//qDebug("font %s supports Arabic", familyName.latin1());
}
+ if (codePageRange[0] & (1 << ThaiCsbBit)) {
+ writingSystems.setSupported(QFontDatabase::Thai);
+ hasScript = true;
+ //qDebug("font %s supports Thai", familyName.latin1());
+ }
if (codePageRange[0] & (1 << VietnameseCsbBit)) {
writingSystems.setSupported(QFontDatabase::Vietnamese);
hasScript = true;
@@ -592,6 +611,11 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q
hasScript = true;
//qDebug("font %s supports Korean", familyName.latin1());
}
+ if (codePageRange[0] & (1 << SymbolCsbBit)) {
+ writingSystems = QSupportedWritingSystems();
+ hasScript = false;
+ }
+
if (!hasScript)
writingSystems.setSupported(QFontDatabase::Symbol);
@@ -599,6 +623,34 @@ QSupportedWritingSystems QPlatformFontDatabase::writingSystemsFromTrueTypeBits(q
}
/*!
+ Helper function that returns the Qt font weight matching a given opentype integer value.
+
+ \since 5.5
+*/
+
+// convert 0 ~ 1000 integer to QFont::Weight
+QFont::Weight QPlatformFontDatabase::weightFromInteger(int weight)
+{
+ if (weight < 150)
+ return QFont::Thin;
+ if (weight < 250)
+ return QFont::ExtraLight;
+ if (weight < 350)
+ return QFont::Light;
+ if (weight < 450)
+ return QFont::Normal;
+ if (weight < 550)
+ return QFont::Medium;
+ if (weight < 650)
+ return QFont::DemiBold;
+ if (weight < 750)
+ return QFont::Bold;
+ if (weight < 850)
+ return QFont::ExtraBold;
+ return QFont::Black;
+}
+
+/*!
Helper function that register the \a alias for the \a familyName.
\since 5.2
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h
index a75d55f91a..0615df65d6 100644
--- a/src/gui/text/qplatformfontdatabase.h
+++ b/src/gui/text/qplatformfontdatabase.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -49,6 +49,7 @@
#include <QtCore/QList>
#include <QtCore/QHash>
#include <QtGui/QFontDatabase>
+#include <QtGui/private/qfontengine_p.h>
#include <QtGui/private/qfont_p.h>
QT_BEGIN_NAMESPACE
@@ -107,9 +108,11 @@ public:
virtual QString resolveFontFamilyAlias(const QString &family) const;
virtual bool fontsAlwaysScalable() const;
virtual QList<int> standardSizes() const;
+ QFontEngine::SubpixelAntialiasingType subpixelAntialiasingTypeHint() const;
// helper
static QSupportedWritingSystems writingSystemsFromTrueTypeBits(quint32 unicodeRange[4], quint32 codePageRange[2]);
+ static QFont::Weight weightFromInteger(int weight);
//callback
static void registerQPF2Font(const QByteArray &dataArray, void *handle);
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index d21138e7ac..2631cf8d17 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h
index 031dd056a7..3798555de5 100644
--- a/src/gui/text/qrawfont.h
+++ b/src/gui/text/qrawfont.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qrawfont_p.h b/src/gui/text/qrawfont_p.h
index 96ba3fd026..b3becccfd7 100644
--- a/src/gui/text/qrawfont_p.h
+++ b/src/gui/text/qrawfont_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index a7868f36ab..fc95a859e7 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -393,7 +393,7 @@ QSizeF QStaticText::size() const
}
QStaticTextPrivate::QStaticTextPrivate()
- : textWidth(-1.0), items(0), itemCount(0), glyphPool(0), positionPool(0), charPool(0),
+ : textWidth(-1.0), items(0), itemCount(0), glyphPool(0), positionPool(0),
needsRelayout(true), useBackendOptimizations(false), textFormat(Qt::AutoText),
untransformedCoordinates(false)
{
@@ -401,7 +401,7 @@ QStaticTextPrivate::QStaticTextPrivate()
QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other)
: text(other.text), font(other.font), textWidth(other.textWidth), matrix(other.matrix),
- items(0), itemCount(0), glyphPool(0), positionPool(0), charPool(0), textOption(other.textOption),
+ items(0), itemCount(0), glyphPool(0), positionPool(0), textOption(other.textOption),
needsRelayout(true), useBackendOptimizations(other.useBackendOptimizations),
textFormat(other.textFormat), untransformedCoordinates(other.untransformedCoordinates)
{
@@ -412,7 +412,6 @@ QStaticTextPrivate::~QStaticTextPrivate()
delete[] items;
delete[] glyphPool;
delete[] positionPool;
- delete[] charPool;
}
QStaticTextPrivate *QStaticTextPrivate::get(const QStaticText *q)
@@ -431,7 +430,7 @@ namespace {
{
}
- virtual void updateState(const QPaintEngineState &newState)
+ virtual void updateState(const QPaintEngineState &newState) Q_DECL_OVERRIDE
{
if (newState.state() & QPaintEngine::DirtyPen
&& newState.pen().color() != m_currentColor) {
@@ -440,15 +439,13 @@ namespace {
}
}
- virtual void drawTextItem(const QPointF &position, const QTextItem &textItem)
+ virtual void drawTextItem(const QPointF &position, const QTextItem &textItem) Q_DECL_OVERRIDE
{
const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
QStaticTextItem currentItem;
currentItem.setFontEngine(ti.fontEngine);
currentItem.font = ti.font();
- currentItem.charOffset = m_chars.size();
- currentItem.numChars = ti.num_chars;
currentItem.glyphOffset = m_glyphs.size(); // Store offset into glyph pool
currentItem.positionOffset = m_glyphs.size(); // Offset into position pool
currentItem.useBackendOptimizations = m_useBackendOptimizations;
@@ -468,7 +465,6 @@ namespace {
m_glyphs.resize(m_glyphs.size() + size);
m_positions.resize(m_glyphs.size());
- m_chars.resize(m_chars.size() + ti.num_chars);
glyph_t *glyphsDestination = m_glyphs.data() + currentItem.glyphOffset;
memcpy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs);
@@ -476,21 +472,18 @@ namespace {
QFixedPoint *positionsDestination = m_positions.data() + currentItem.positionOffset;
memcpy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs);
- QChar *charsDestination = m_chars.data() + currentItem.charOffset;
- memcpy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
-
m_items.append(currentItem);
}
- virtual void drawPolygon(const QPointF *, int , PolygonDrawMode )
+ virtual void drawPolygon(const QPointF *, int , PolygonDrawMode ) Q_DECL_OVERRIDE
{
/* intentionally empty */
}
- virtual bool begin(QPaintDevice *) { return true; }
- virtual bool end() { return true; }
- virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) {}
- virtual Type type() const
+ virtual bool begin(QPaintDevice *) Q_DECL_OVERRIDE { return true; }
+ virtual bool end() Q_DECL_OVERRIDE { return true; }
+ virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) Q_DECL_OVERRIDE {}
+ virtual Type type() const Q_DECL_OVERRIDE
{
return User;
}
@@ -510,16 +503,10 @@ namespace {
return m_glyphs;
}
- QVector<QChar> chars() const
- {
- return m_chars;
- }
-
private:
QVector<QStaticTextItem> m_items;
QVector<QFixedPoint> m_positions;
QVector<glyph_t> m_glyphs;
- QVector<QChar> m_chars;
bool m_dirtyPen;
bool m_useBackendOptimizations;
@@ -541,7 +528,7 @@ namespace {
delete m_paintEngine;
}
- int metric(PaintDeviceMetric m) const
+ int metric(PaintDeviceMetric m) const Q_DECL_OVERRIDE
{
int val;
switch (m) {
@@ -575,7 +562,7 @@ namespace {
return val;
}
- virtual QPaintEngine *paintEngine() const
+ virtual QPaintEngine *paintEngine() const Q_DECL_OVERRIDE
{
return m_paintEngine;
}
@@ -595,11 +582,6 @@ namespace {
return m_paintEngine->items();
}
- QVector<QChar> chars() const
- {
- return m_paintEngine->chars();
- }
-
private:
DrawTextItemRecorder *m_paintEngine;
};
@@ -677,7 +659,6 @@ void QStaticTextPrivate::init()
delete[] items;
delete[] glyphPool;
delete[] positionPool;
- delete[] charPool;
position = QPointF(0, 0);
@@ -693,7 +674,6 @@ void QStaticTextPrivate::init()
QVector<QStaticTextItem> deviceItems = device.items();
QVector<QFixedPoint> positions = device.positions();
QVector<glyph_t> glyphs = device.glyphs();
- QVector<QChar> chars = device.chars();
itemCount = deviceItems.size();
items = new QStaticTextItem[itemCount];
@@ -704,15 +684,11 @@ void QStaticTextPrivate::init()
positionPool = new QFixedPoint[positions.size()];
memcpy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint));
- charPool = new QChar[chars.size()];
- memcpy(charPool, chars.constData(), chars.size() * sizeof(QChar));
-
for (int i=0; i<itemCount; ++i) {
items[i] = deviceItems.at(i);
items[i].glyphs = glyphPool + items[i].glyphOffset;
items[i].glyphPositions = positionPool + items[i].positionOffset;
- items[i].chars = charPool + items[i].charOffset;
}
needsRelayout = false;
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index f2357e562c..d2825e73ac 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 29db8836d9..088e49e2fc 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -70,7 +70,7 @@ public:
class Q_GUI_EXPORT QStaticTextItem
{
public:
- QStaticTextItem() : chars(0), numChars(0), useBackendOptimizations(false),
+ QStaticTextItem() : useBackendOptimizations(false),
userDataNeedsUpdate(0), usesRawFont(0),
m_fontEngine(0), m_userData(0) {}
@@ -83,9 +83,7 @@ public:
{
glyphPositions = other.glyphPositions;
glyphs = other.glyphs;
- chars = other.chars;
numGlyphs = other.numGlyphs;
- numChars = other.numChars;
font = other.font;
color = other.color;
useBackendOptimizations = other.useBackendOptimizations;
@@ -125,28 +123,22 @@ public:
glyph_t *glyphs; // 4 bytes per glyph
int glyphOffset;
};
- union {
- QChar *chars; // 2 bytes per glyph
- int charOffset;
- };
// =================
- // 14 bytes per glyph
+ // 12 bytes per glyph
- // 12 bytes for pointers
+ // 8 bytes for pointers
int numGlyphs; // 4 bytes per item
- int numChars; // 4 bytes per item
QFont font; // 8 bytes per item
QColor color; // 10 bytes per item
char useBackendOptimizations : 1; // 1 byte per item
char userDataNeedsUpdate : 1; //
char usesRawFont : 1; //
- // ================
- // 51 bytes per item
private: // Needs special handling in setters, so private to avoid abuse
QFontEngine *m_fontEngine; // 4 bytes per item
QStaticTextUserData *m_userData; // 8 bytes per item
-
+ // ================
+ // 43 bytes per item
};
class QStaticText;
@@ -179,7 +171,6 @@ public:
glyph_t *glyphPool; // 4 bytes per text
QFixedPoint *positionPool; // 4 bytes per text
- QChar *charPool; // 4 bytes per text
QTextOption textOption; // 28 bytes per text
@@ -188,7 +179,7 @@ public:
unsigned char textFormat : 2;
unsigned char untransformedCoordinates : 1;
// ================
- // 195 bytes per text
+ // 191 bytes per text
static QStaticTextPrivate *get(const QStaticText *q);
};
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index 7924dff5e9..162c646a98 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qsyntaxhighlighter.h b/src/gui/text/qsyntaxhighlighter.h
index b71e3a6b8e..56b9020d2c 100644
--- a/src/gui/text/qsyntaxhighlighter.h
+++ b/src/gui/text/qsyntaxhighlighter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index b1205a8c85..a151c515a3 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h
index 4dc11b54bf..f04055603c 100644
--- a/src/gui/text/qtextcursor.h
+++ b/src/gui/text/qtextcursor.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextcursor_p.h b/src/gui/text/qtextcursor_p.h
index a0b157227e..51fb92d37c 100644
--- a/src/gui/text/qtextcursor_p.h
+++ b/src/gui/text/qtextcursor_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 77e0fec80d..e8dd663354 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -40,6 +40,7 @@
#include "qtextlist.h"
#include <qdebug.h>
#include <qregexp.h>
+#include <qregularexpression.h>
#include <qvarlengtharray.h>
#include <qtextcodec.h>
#include <qthread.h>
@@ -1244,6 +1245,39 @@ void QTextDocument::setHtml(const QString &html)
\sa metaInformation(), setMetaInformation()
*/
+static bool findInBlock(const QTextBlock &block, const QString &expression, int offset,
+ QTextDocument::FindFlags options, QTextCursor *cursor)
+{
+ QString text = block.text();
+ text.replace(QChar::Nbsp, QLatin1Char(' '));
+ Qt::CaseSensitivity sensitivity = options & QTextDocument::FindCaseSensitively ? Qt::CaseSensitive : Qt::CaseInsensitive;
+ int idx = -1;
+
+ while (offset >= 0 && offset <= text.length()) {
+ idx = (options & QTextDocument::FindBackward) ?
+ text.lastIndexOf(expression, offset, sensitivity) : text.indexOf(expression, offset, sensitivity);
+ if (idx == -1)
+ return false;
+
+ if (options & QTextDocument::FindWholeWords) {
+ const int start = idx;
+ const int end = start + expression.length();
+ if ((start != 0 && text.at(start - 1).isLetterOrNumber())
+ || (end != text.length() && text.at(end).isLetterOrNumber())) {
+ //if this is not a whole word, continue the search in the string
+ offset = (options & QTextDocument::FindBackward) ? idx-1 : end+1;
+ idx = -1;
+ continue;
+ }
+ }
+ //we have a hit, return the cursor for that.
+ *cursor = QTextCursor(block.docHandle(), block.position() + idx);
+ cursor->setPosition(cursor->position() + expression.length(), QTextCursor::KeepAnchor);
+ return true;
+ }
+ return false;
+}
+
/*!
\fn QTextCursor QTextDocument::find(const QString &subString, int position, FindFlags options) const
@@ -1262,16 +1296,44 @@ void QTextDocument::setHtml(const QString &html)
*/
QTextCursor QTextDocument::find(const QString &subString, int from, FindFlags options) const
{
- QRegExp expr(subString);
- expr.setPatternSyntax(QRegExp::FixedString);
- expr.setCaseSensitivity((options & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive);
+ Q_D(const QTextDocument);
+
+ if (subString.isEmpty())
+ return QTextCursor();
+
+ int pos = from;
+ //the cursor is positioned between characters, so for a backward search
+ //do not include the character given in the position.
+ if (options & FindBackward) {
+ --pos ;
+ if (pos < subString.size())
+ return QTextCursor();
+ }
- return find(expr, from, options);
+ QTextCursor cursor;
+ QTextBlock block = d->blocksFind(pos);
+ int blockOffset = pos - block.position();
+
+ if (!(options & FindBackward)) {
+ while (block.isValid()) {
+ if (findInBlock(block, subString, blockOffset, options, &cursor))
+ return cursor;
+ block = block.next();
+ blockOffset = 0;
+ }
+ } else {
+ while (block.isValid()) {
+ if (findInBlock(block, subString, blockOffset, options, &cursor))
+ return cursor;
+ block = block.previous();
+ blockOffset = block.length() - 2;
+ }
+ }
+
+ return QTextCursor();
}
/*!
- \fn QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, FindFlags options) const
-
Finds the next occurrence of the string, \a subString, in the document.
The search starts at the position of the given \a cursor, and proceeds
forwards through the document unless specified otherwise in the search
@@ -1286,25 +1348,23 @@ QTextCursor QTextDocument::find(const QString &subString, int from, FindFlags op
By default the search is case-sensitive, and can match text anywhere in the
document.
*/
-QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &from, FindFlags options) const
+QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, FindFlags options) const
{
int pos = 0;
- if (!from.isNull()) {
+ if (!cursor.isNull()) {
if (options & QTextDocument::FindBackward)
- pos = from.selectionStart();
+ pos = cursor.selectionStart();
else
- pos = from.selectionEnd();
+ pos = cursor.selectionEnd();
}
- QRegExp expr(subString);
- expr.setPatternSyntax(QRegExp::FixedString);
- expr.setCaseSensitivity((options & QTextDocument::FindCaseSensitively) ? Qt::CaseSensitive : Qt::CaseInsensitive);
- return find(expr, pos, options);
+ return find(subString, pos, options);
}
+#ifndef QT_NO_REGEXP
static bool findInBlock(const QTextBlock &block, const QRegExp &expression, int offset,
- QTextDocument::FindFlags options, QTextCursor &cursor)
+ QTextDocument::FindFlags options, QTextCursor *cursor)
{
QRegExp expr(expression);
QString text = block.text();
@@ -1329,22 +1389,18 @@ static bool findInBlock(const QTextBlock &block, const QRegExp &expression, int
}
}
//we have a hit, return the cursor for that.
- break;
+ *cursor = QTextCursor(block.docHandle(), block.position() + idx);
+ cursor->setPosition(cursor->position() + expr.matchedLength(), QTextCursor::KeepAnchor);
+ return true;
}
- if (idx == -1)
- return false;
- cursor = QTextCursor(block.docHandle(), block.position() + idx);
- cursor.setPosition(cursor.position() + expr.matchedLength(), QTextCursor::KeepAnchor);
- return true;
+ return false;
}
/*!
- \fn QTextCursor QTextDocument::find(const QRegExp & expr, int position, FindFlags options) const
-
\overload
Finds the next occurrence, matching the regular expression, \a expr, in the document.
- The search starts at the given \a position, and proceeds forwards
+ The search starts at the given \a from position, and proceeds forwards
through the document unless specified otherwise in the search options.
The \a options control the type of search performed. The FindCaseSensitively
option is ignored for this overload, use QRegExp::caseSensitivity instead.
@@ -1352,7 +1408,7 @@ static bool findInBlock(const QTextBlock &block, const QRegExp &expression, int
Returns a cursor with the match selected if a match was found; otherwise
returns a null cursor.
- If the \a position is 0 (the default) the search begins from the beginning
+ If the \a from position is 0 (the default) the search begins from the beginning
of the document; otherwise it begins at the specified position.
*/
QTextCursor QTextDocument::find(const QRegExp & expr, int from, FindFlags options) const
@@ -1373,19 +1429,17 @@ QTextCursor QTextDocument::find(const QRegExp & expr, int from, FindFlags option
QTextCursor cursor;
QTextBlock block = d->blocksFind(pos);
-
+ int blockOffset = pos - block.position();
if (!(options & FindBackward)) {
- int blockOffset = qMax(0, pos - block.position());
while (block.isValid()) {
- if (findInBlock(block, expr, blockOffset, options, cursor))
+ if (findInBlock(block, expr, blockOffset, options, &cursor))
return cursor;
- blockOffset = 0;
block = block.next();
+ blockOffset = 0;
}
} else {
- int blockOffset = pos - block.position();
while (block.isValid()) {
- if (findInBlock(block, expr, blockOffset, options, cursor))
+ if (findInBlock(block, expr, blockOffset, options, &cursor))
return cursor;
block = block.previous();
blockOffset = block.length() - 1;
@@ -1396,10 +1450,10 @@ QTextCursor QTextDocument::find(const QRegExp & expr, int from, FindFlags option
}
/*!
- \fn QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options) const
+ \overload
Finds the next occurrence, matching the regular expression, \a expr, in the document.
- The search starts at the position of the given \a cursor, and proceeds
+ The search starts at the position of the given from \a cursor, and proceeds
forwards through the document unless specified otherwise in the search
options. The \a options control the type of search performed. The FindCaseSensitively
option is ignored for this overload, use QRegExp::caseSensitivity instead.
@@ -1407,24 +1461,147 @@ QTextCursor QTextDocument::find(const QRegExp & expr, int from, FindFlags option
Returns a cursor with the match selected if a match was found; otherwise
returns a null cursor.
- If the given \a cursor has a selection, the search begins after the
+ If the given \a from cursor has a selection, the search begins after the
selection; otherwise it begins at the cursor's position.
By default the search is case-sensitive, and can match text anywhere in the
document.
*/
-QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &from, FindFlags options) const
+QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options) const
{
int pos = 0;
- if (!from.isNull()) {
+ if (!cursor.isNull()) {
if (options & QTextDocument::FindBackward)
- pos = from.selectionStart();
+ pos = cursor.selectionStart();
else
- pos = from.selectionEnd();
+ pos = cursor.selectionEnd();
}
return find(expr, pos, options);
}
+#endif // QT_REGEXP
+
+#ifndef QT_NO_REGULAREXPRESSION
+static bool findInBlock(const QTextBlock &block, const QRegularExpression &expression, int offset,
+ QTextDocument::FindFlags options, QTextCursor *cursor)
+{
+ QRegularExpression expr(expression);
+ if (!(options & QTextDocument::FindCaseSensitively))
+ expr.setPatternOptions(expr.patternOptions() | QRegularExpression::CaseInsensitiveOption);
+ else
+ expr.setPatternOptions(expr.patternOptions() & ~QRegularExpression::CaseInsensitiveOption);
+
+ QString text = block.text();
+ text.replace(QChar::Nbsp, QLatin1Char(' '));
+ QRegularExpressionMatch match;
+ int idx = -1;
+
+ while (offset >= 0 && offset <= text.length()) {
+ idx = (options & QTextDocument::FindBackward) ?
+ text.lastIndexOf(expr, offset, &match) : text.indexOf(expr, offset, &match);
+ if (idx == -1)
+ return false;
+
+ if (options & QTextDocument::FindWholeWords) {
+ const int start = idx;
+ const int end = start + match.capturedLength();
+ if ((start != 0 && text.at(start - 1).isLetterOrNumber())
+ || (end != text.length() && text.at(end).isLetterOrNumber())) {
+ //if this is not a whole word, continue the search in the string
+ offset = (options & QTextDocument::FindBackward) ? idx-1 : end+1;
+ idx = -1;
+ continue;
+ }
+ }
+ //we have a hit, return the cursor for that.
+ *cursor = QTextCursor(block.docHandle(), block.position() + idx);
+ cursor->setPosition(cursor->position() + match.capturedLength(), QTextCursor::KeepAnchor);
+ return true;
+ }
+ return false;
+}
+
+/*!
+ \since 5.5
+
+ Finds the next occurrence, matching the regular expression, \a expr, in the document.
+ The search starts at the given \a from position, and proceeds forwards
+ through the document unless specified otherwise in the search options.
+ The \a options control the type of search performed.
+
+ Returns a cursor with the match selected if a match was found; otherwise
+ returns a null cursor.
+
+ If the \a from position is 0 (the default) the search begins from the beginning
+ of the document; otherwise it begins at the specified position.
+*/
+QTextCursor QTextDocument::find(const QRegularExpression &expr, int from, FindFlags options) const
+{
+ Q_D(const QTextDocument);
+
+ if (!expr.isValid())
+ return QTextCursor();
+
+ int pos = from;
+ //the cursor is positioned between characters, so for a backward search
+ //do not include the character given in the position.
+ if (options & FindBackward) {
+ --pos ;
+ if (pos < 0)
+ return QTextCursor();
+ }
+
+ QTextCursor cursor;
+ QTextBlock block = d->blocksFind(pos);
+ int blockOffset = pos - block.position();
+ if (!(options & FindBackward)) {
+ while (block.isValid()) {
+ if (findInBlock(block, expr, blockOffset, options, &cursor))
+ return cursor;
+ block = block.next();
+ blockOffset = 0;
+ }
+ } else {
+ while (block.isValid()) {
+ if (findInBlock(block, expr, blockOffset, options, &cursor))
+ return cursor;
+ block = block.previous();
+ blockOffset = block.length() - 1;
+ }
+ }
+
+ return QTextCursor();
+}
+
+/*!
+ \since 5.5
+
+ Finds the next occurrence, matching the regular expression, \a expr, in the document.
+ The search starts at the position of the given \a cursor, and proceeds
+ forwards through the document unless specified otherwise in the search
+ options. The \a options control the type of search performed.
+
+ Returns a cursor with the match selected if a match was found; otherwise
+ returns a null cursor.
+
+ If the given \a cursor has a selection, the search begins after the
+ selection; otherwise it begins at the cursor's position.
+
+ By default the search is case-sensitive, and can match text anywhere in the
+ document.
+*/
+QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCursor &cursor, FindFlags options) const
+{
+ int pos = 0;
+ if (!cursor.isNull()) {
+ if (options & QTextDocument::FindBackward)
+ pos = cursor.selectionStart();
+ else
+ pos = cursor.selectionEnd();
+ }
+ return find(expr, pos, options);
+}
+#endif // QT_NO_REGULAREXPRESSION
/*!
\fn QTextObject *QTextDocument::createObject(const QTextFormat &format)
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h
index 2329a9e721..ca80a88033 100644
--- a/src/gui/text/qtextdocument.h
+++ b/src/gui/text/qtextdocument.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -63,7 +63,6 @@ class QTextCursor;
template<typename T> class QVector;
-#ifndef Q_QDOC // Workaround for QTBUG-35230
namespace Qt
{
Q_GUI_EXPORT bool mightBeRichText(const QString&);
@@ -73,7 +72,6 @@ namespace Qt
Q_GUI_EXPORT QTextCodec *codecForHtml(const QByteArray &ba);
#endif
}
-#endif // Q_QDOC
class Q_GUI_EXPORT QAbstractUndoItem
{
@@ -160,10 +158,17 @@ public:
Q_DECLARE_FLAGS(FindFlags, FindFlag)
QTextCursor find(const QString &subString, int from = 0, FindFlags options = 0) const;
- QTextCursor find(const QString &subString, const QTextCursor &from, FindFlags options = 0) const;
+ QTextCursor find(const QString &subString, const QTextCursor &cursor, FindFlags options = 0) const;
+#ifndef QT_NO_REGEXP
QTextCursor find(const QRegExp &expr, int from = 0, FindFlags options = 0) const;
- QTextCursor find(const QRegExp &expr, const QTextCursor &from, FindFlags options = 0) const;
+ QTextCursor find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options = 0) const;
+#endif
+
+#ifndef QT_NO_REGULAREXPRESSION
+ QTextCursor find(const QRegularExpression &expr, int from = 0, FindFlags options = 0) const;
+ QTextCursor find(const QRegularExpression &expr, const QTextCursor &cursor, FindFlags options = 0) const;
+#endif
QTextFrame *frameAt(int pos) const;
QTextFrame *rootFrame() const;
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 8ff15106e3..587844c1dd 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -125,14 +125,12 @@ static bool isValidBlockSeparator(QChar ch)
|| ch == QTextEndOfFrame;
}
-#if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS)
static bool noBlockInString(const QString &str)
{
return !str.contains(QChar::ParagraphSeparator)
&& !str.contains(QTextBeginningOfFrame)
&& !str.contains(QTextEndOfFrame);
}
-#endif
bool QTextUndoCommand::tryMerge(const QTextUndoCommand &other)
{
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index b36a184f8d..bcef3b2c9e 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 18b72c5b33..71e24efc4d 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextdocumentfragment.h b/src/gui/text/qtextdocumentfragment.h
index 15a20d6dac..ae90baf4d8 100644
--- a/src/gui/text/qtextdocumentfragment.h
+++ b/src/gui/text/qtextdocumentfragment.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h
index 53a9bfcebe..22b39bc1e5 100644
--- a/src/gui/text/qtextdocumentfragment_p.h
+++ b/src/gui/text/qtextdocumentfragment_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 74371d77c0..db8a792be7 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -383,12 +383,12 @@ struct QCheckPoint
};
Q_DECLARE_TYPEINFO(QCheckPoint, Q_PRIMITIVE_TYPE);
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint, QFixed y)
+static bool operator<(const QCheckPoint &checkPoint, QFixed y)
{
return checkPoint.y < y;
}
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint, int pos)
+static bool operator<(const QCheckPoint &checkPoint, int pos)
{
return checkPoint.positionInFrame < pos;
}
@@ -396,17 +396,17 @@ Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint, int pos)
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
//The STL implementation of MSVC 2008 requires the definitions
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint1, const QCheckPoint &checkPoint2)
+static bool operator<(const QCheckPoint &checkPoint1, const QCheckPoint &checkPoint2)
{
return checkPoint1.y < checkPoint2.y;
}
-Q_STATIC_GLOBAL_OPERATOR bool operator<(QFixed y, const QCheckPoint &checkPoint)
+static bool operator<(QFixed y, const QCheckPoint &checkPoint)
{
return y < checkPoint.y;
}
-Q_STATIC_GLOBAL_OPERATOR bool operator<(int pos, const QCheckPoint &checkPoint)
+static bool operator<(int pos, const QCheckPoint &checkPoint)
{
return pos < checkPoint.positionInFrame;
}
@@ -1290,7 +1290,7 @@ void QTextDocumentLayoutPrivate::drawBlock(const QPointF &offset, QPainter *pain
const QTextLayout *tl = bl.layout();
QRectF r = tl->boundingRect();
r.translate(offset + tl->position());
- if (context.clip.isValid() && (r.bottom() < context.clip.y() || r.top() > context.clip.bottom()))
+ if (!bl.isVisible() || (context.clip.isValid() && (r.bottom() < context.clip.y() || r.top() > context.clip.bottom())))
return;
// LDEBUG << debug_indent << "drawBlock" << bl.position() << "at" << offset << "br" << tl->boundingRect();
@@ -2580,6 +2580,8 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
QTextLayoutStruct *layoutStruct, int layoutFrom, int layoutTo, const QTextBlockFormat *previousBlockFormat)
{
Q_Q(QTextDocumentLayout);
+ if (!bl.isVisible())
+ return;
QTextLayout *tl = bl.layout();
const int blockLength = bl.length();
@@ -3265,7 +3267,7 @@ QRectF QTextDocumentLayoutPrivate::frameBoundingRectInternal(QTextFrame *frame)
QRectF QTextDocumentLayout::blockBoundingRect(const QTextBlock &block) const
{
Q_D(const QTextDocumentLayout);
- if (d->docPrivate->pageSize.isNull() || !block.isValid())
+ if (d->docPrivate->pageSize.isNull() || !block.isValid() || !block.isVisible())
return QRectF();
d->ensureLayoutedByPosition(block.position() + block.length());
QTextFrame *frame = d->document->frameAt(block.position());
diff --git a/src/gui/text/qtextdocumentlayout_p.h b/src/gui/text/qtextdocumentlayout_p.h
index f72a177d13..e42443ee87 100644
--- a/src/gui/text/qtextdocumentlayout_p.h
+++ b/src/gui/text/qtextdocumentlayout_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -66,11 +66,11 @@ public:
explicit QTextDocumentLayout(QTextDocument *doc);
// from the abstract layout
- void draw(QPainter *painter, const PaintContext &context);
- int hitTest(const QPointF &point, Qt::HitTestAccuracy accuracy) const;
+ void draw(QPainter *painter, const PaintContext &context) Q_DECL_OVERRIDE;
+ int hitTest(const QPointF &point, Qt::HitTestAccuracy accuracy) const Q_DECL_OVERRIDE;
- int pageCount() const;
- QSizeF documentSize() const;
+ int pageCount() const Q_DECL_OVERRIDE;
+ QSizeF documentSize() const Q_DECL_OVERRIDE;
void setCursorWidth(int width);
int cursorWidth() const;
@@ -81,8 +81,8 @@ public:
// internal for QTextEdit's NoWrap mode
void setViewport(const QRectF &viewport);
- virtual QRectF frameBoundingRect(QTextFrame *frame) const;
- virtual QRectF blockBoundingRect(const QTextBlock &block) const;
+ virtual QRectF frameBoundingRect(QTextFrame *frame) const Q_DECL_OVERRIDE;
+ virtual QRectF blockBoundingRect(const QTextBlock &block) const Q_DECL_OVERRIDE;
QRectF tableBoundingRect(QTextTable *table) const;
QRectF tableCellBoundingRect(QTextTable *table, const QTextTableCell &cell) const;
@@ -97,12 +97,12 @@ public:
bool contentHasAlignment() const;
protected:
- void documentChanged(int from, int oldLength, int length);
- void resizeInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat &format);
- void positionInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat &format);
+ void documentChanged(int from, int oldLength, int length) Q_DECL_OVERRIDE;
+ void resizeInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat &format) Q_DECL_OVERRIDE;
+ void positionInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat &format) Q_DECL_OVERRIDE;
void drawInlineObject(QPainter *p, const QRectF &rect, QTextInlineObject item,
- int posInDocument, const QTextFormat &format);
- virtual void timerEvent(QTimerEvent *e);
+ int posInDocument, const QTextFormat &format) Q_DECL_OVERRIDE;
+ virtual void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
private:
QRectF doLayout(int from, int oldLength, int length);
void layoutFinished();
diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp
index b6cc44cdeb..9c430ea67b 100644
--- a/src/gui/text/qtextdocumentwriter.cpp
+++ b/src/gui/text/qtextdocumentwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextdocumentwriter.h b/src/gui/text/qtextdocumentwriter.h
index 8235eeedc9..76bf3e9b24 100644
--- a/src/gui/text/qtextdocumentwriter.h
+++ b/src/gui/text/qtextdocumentwriter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 8f874e0245..10a61d3c84 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -881,16 +881,22 @@ static inline void qt_getJustificationOpportunities(const ushort *string, int le
int spaceAs;
switch (si.analysis.script) {
+ case QChar::Script_Arabic:
+ case QChar::Script_Syriac:
case QChar::Script_Nko:
case QChar::Script_Mandaic:
case QChar::Script_Mongolian:
case QChar::Script_PhagsPa:
+ case QChar::Script_Manichaean:
+ case QChar::Script_PsalterPahlavi:
// same as default but inter character justification takes precedence
spaceAs = Justification_Arabic_Space;
break;
+ case QChar::Script_Tibetan:
case QChar::Script_Hiragana:
case QChar::Script_Katakana:
+ case QChar::Script_Bopomofo:
case QChar::Script_Han:
// same as default but inter character justification is the only option
spaceAs = Justification_Character;
@@ -979,7 +985,7 @@ void QTextEngine::shapeText(int item) const
string = reinterpret_cast<const ushort *>(casedString.constData());
}
- if (!ensureSpace(itemLength)) {
+ if (Q_UNLIKELY(!ensureSpace(itemLength))) {
Q_UNREACHABLE(); // ### report OOM error somehow
return;
}
@@ -1051,12 +1057,12 @@ void QTextEngine::shapeText(int item) const
}
#ifdef QT_ENABLE_HARFBUZZ_NG
- if (qt_useHarfbuzzNG())
+ if (Q_LIKELY(qt_useHarfbuzzNG()))
si.num_glyphs = shapeTextWithHarfbuzzNG(si, string, itemLength, fontEngine, itemBoundaries, kerningEnabled);
else
#endif
si.num_glyphs = shapeTextWithHarfbuzz(si, string, itemLength, fontEngine, itemBoundaries, kerningEnabled);
- if (si.num_glyphs == 0) {
+ if (Q_UNLIKELY(si.num_glyphs == 0)) {
Q_UNREACHABLE(); // ### report shaping errors somehow
return;
}
@@ -1067,7 +1073,7 @@ void QTextEngine::shapeText(int item) const
QGlyphLayout glyphs = shapedGlyphs(&si);
#ifdef QT_ENABLE_HARFBUZZ_NG
- if (qt_useHarfbuzzNG())
+ if (Q_LIKELY(qt_useHarfbuzzNG()))
qt_getJustificationOpportunities(string, itemLength, si, glyphs, logClusters(&si));
#endif
@@ -1116,10 +1122,12 @@ QT_END_INCLUDE_NAMESPACE
int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *string, int itemLength, QFontEngine *fontEngine, const QVector<uint> &itemBoundaries, bool kerningEnabled) const
{
+ uint glyphs_shaped = 0;
+
hb_buffer_t *buffer = hb_buffer_create();
hb_buffer_set_unicode_funcs(buffer, hb_qt_get_unicode_funcs());
hb_buffer_pre_allocate(buffer, itemLength);
- if (!hb_buffer_allocation_successful(buffer)) {
+ if (Q_UNLIKELY(!hb_buffer_allocation_successful(buffer))) {
hb_buffer_destroy(buffer);
return 0;
}
@@ -1129,18 +1137,13 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st
props.script = hb_qt_script_to_script(QChar::Script(si.analysis.script));
// ### props.language = hb_language_get_default_for_script(props.script);
- uint glyphs_shaped = 0;
- int remaining_glyphs = itemLength;
-
for (int k = 0; k < itemBoundaries.size(); k += 3) {
- uint item_pos = itemBoundaries[k];
- uint item_length = (k + 4 < itemBoundaries.size() ? itemBoundaries[k + 3] : itemLength) - item_pos;
- uint item_glyph_pos = itemBoundaries[k + 1];
- uint engineIdx = itemBoundaries[k + 2];
+ const uint item_pos = itemBoundaries[k];
+ const uint item_length = (k + 4 < itemBoundaries.size() ? itemBoundaries[k + 3] : itemLength) - item_pos;
+ const uint engineIdx = itemBoundaries[k + 2];
- QFontEngine *actualFontEngine = fontEngine;
- if (fontEngine->type() == QFontEngine::Multi)
- actualFontEngine = static_cast<QFontEngineMulti *>(fontEngine)->engine(engineIdx);
+ QFontEngine *actualFontEngine = fontEngine->type() != QFontEngine::Multi ? fontEngine
+ : static_cast<QFontEngineMulti *>(fontEngine)->engine(engineIdx);
// prepare buffer
@@ -1153,35 +1156,35 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st
uint buffer_flags = HB_BUFFER_FLAG_DEFAULT;
// Symbol encoding used to encode various crap in the 32..255 character code range,
// and thus might override U+00AD [SHY]; avoid hiding default ignorables
- if (actualFontEngine->symbol)
+ if (Q_UNLIKELY(actualFontEngine->symbol))
buffer_flags |= HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES;
hb_buffer_set_flags(buffer, hb_buffer_flags_t(buffer_flags));
// shape
- bool shapedOk = false;
- if (hb_font_t *hb_font = hb_qt_font_get_for_engine(actualFontEngine)) {
+ {
+ hb_font_t *hb_font = hb_qt_font_get_for_engine(actualFontEngine);
+ Q_ASSERT(hb_font);
hb_qt_font_set_use_design_metrics(hb_font, option.useDesignMetrics() ? uint(QFontEngine::DesignMetrics) : 0); // ###
const hb_feature_t features[1] = {
{ HB_TAG('k','e','r','n'), !!kerningEnabled, 0, uint(-1) }
};
const int num_features = 1;
- shapedOk = hb_shape_full(hb_font, buffer, features, num_features, 0);
- }
- if (!shapedOk) {
- hb_buffer_destroy(buffer);
- return 0;
- }
- if (si.analysis.bidiLevel % 2)
- hb_buffer_reverse(buffer);
+ bool shapedOk = hb_shape_full(hb_font, buffer, features, num_features, 0);
+ if (Q_UNLIKELY(!shapedOk)) {
+ hb_buffer_destroy(buffer);
+ return 0;
+ }
- remaining_glyphs -= item_glyph_pos;
+ if (Q_UNLIKELY(HB_DIRECTION_IS_BACKWARD(props.direction)))
+ hb_buffer_reverse(buffer);
+ }
- // ensure we have enough space for shaped glyphs and metrics
const uint num_glyphs = hb_buffer_get_length(buffer);
- if (num_glyphs == 0 || !ensureSpace(glyphs_shaped + num_glyphs + remaining_glyphs)) {
+ // ensure we have enough space for shaped glyphs and metrics
+ if (Q_UNLIKELY(num_glyphs == 0 || !ensureSpace(glyphs_shaped + num_glyphs))) {
hb_buffer_destroy(buffer);
return 0;
}
@@ -1195,29 +1198,16 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st
uint str_pos = 0;
uint last_cluster = ~0u;
uint last_glyph_pos = glyphs_shaped;
- for (uint i = 0; i < num_glyphs; ++i) {
- g.glyphs[i] = infos[i].codepoint;
-
- g.advances[i] = QFixed::fromFixed(positions[i].x_advance);
- g.offsets[i].x = QFixed::fromFixed(positions[i].x_offset);
- g.offsets[i].y = QFixed::fromFixed(positions[i].y_offset);
-
- uint cluster = infos[i].cluster;
- if (last_cluster != cluster) {
- if (Q_UNLIKELY(g.glyphs[i] == 0)) {
- // hide characters that should normally be invisible
- switch (string[item_pos + str_pos]) {
- case QChar::LineFeed:
- case 0x000c: // FormFeed
- case QChar::CarriageReturn:
- case QChar::LineSeparator:
- case QChar::ParagraphSeparator:
- g.attributes[i].dontPrint = true;
- break;
- default:
- break;
- }
- }
+ for (uint i = 0; i < num_glyphs; ++i, ++infos, ++positions) {
+ g.glyphs[i] = infos->codepoint;
+
+ g.advances[i] = QFixed::fromFixed(positions->x_advance);
+ g.offsets[i].x = QFixed::fromFixed(positions->x_offset);
+ g.offsets[i].y = QFixed::fromFixed(positions->y_offset);
+
+ uint cluster = infos->cluster;
+ if (Q_LIKELY(last_cluster != cluster)) {
+ g.attributes[i].clusterStart = true;
// fix up clusters so that the cluster indices will be monotonic
// and thus we never return out-of-order indices
@@ -1225,13 +1215,38 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st
log_clusters[str_pos++] = last_glyph_pos;
last_glyph_pos = i + glyphs_shaped;
last_cluster = cluster;
- g.attributes[i].clusterStart = true;
+
+ // hide characters that should normally be invisible
+ switch (string[item_pos + str_pos]) {
+ case QChar::LineFeed:
+ case 0x000c: // FormFeed
+ case QChar::CarriageReturn:
+ case QChar::LineSeparator:
+ case QChar::ParagraphSeparator:
+ g.attributes[i].dontPrint = true;
+ break;
+ case QChar::SoftHyphen:
+ if (!actualFontEngine->symbol) {
+ // U+00AD [SOFT HYPHEN] is a default ignorable codepoint,
+ // so we replace its glyph and metrics with ones for
+ // U+002D [HYPHEN-MINUS] and make it visible if it appears at line-break
+ g.glyphs[i] = actualFontEngine->glyphIndex('-');
+ if (Q_LIKELY(g.glyphs[i] != 0)) {
+ QGlyphLayout tmp = g.mid(i, 1);
+ actualFontEngine->recalcAdvances(&tmp, 0);
+ }
+ g.attributes[i].dontPrint = true;
+ }
+ break;
+ default:
+ break;
+ }
}
}
while (str_pos < item_length)
log_clusters[str_pos++] = last_glyph_pos;
- if (engineIdx != 0) {
+ if (Q_UNLIKELY(engineIdx != 0)) {
for (quint32 i = 0; i < num_glyphs; ++i)
g.glyphs[i] |= (engineIdx << 24);
}
@@ -1621,10 +1636,10 @@ void QTextEngine::itemize() const
for (int i = 0; i < length; ++i) {
switch (analysis[i].script) {
case QChar::Script_Latin:
- case QChar::Script_Han:
case QChar::Script_Hiragana:
case QChar::Script_Katakana:
case QChar::Script_Bopomofo:
+ case QChar::Script_Han:
analysis[i].script = QChar::Script_Common;
break;
default:
@@ -1710,7 +1725,7 @@ bool QTextEngine::isRightToLeft() const
itemize();
// this places the cursor in the right position depending on the keyboard layout
if (layoutData->string.isEmpty())
- return qApp ? qApp->inputMethod()->inputDirection() == Qt::RightToLeft : false;
+ return QGuiApplication::inputMethod()->inputDirection() == Qt::RightToLeft;
return layoutData->string.isRightToLeft();
}
@@ -1959,7 +1974,7 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
if (feCache.prevFontEngine && feCache.prevFontEngine->type() == QFontEngine::Multi && feCache.prevScript == script) {
engine = feCache.prevFontEngine;
} else {
- engine = QFontEngineMultiBasicImpl::createMultiFontEngine(rawFont.d->fontEngine, script);
+ engine = QFontEngineMulti::createMultiFontEngine(rawFont.d->fontEngine, script);
feCache.prevFontEngine = engine;
feCache.prevScript = script;
engine->ref.ref();
@@ -1974,7 +1989,7 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
} else {
QFontEngine *scEngine = rawFont.d->fontEngine->cloneWithSize(smallCapsFraction * rawFont.pixelSize());
scEngine->ref.ref();
- scaledEngine = QFontEngineMultiBasicImpl::createMultiFontEngine(scEngine, script);
+ scaledEngine = QFontEngineMulti::createMultiFontEngine(scEngine, script);
scaledEngine->ref.ref();
feCache.prevScaledFontEngine = scaledEngine;
// If scEngine is not ref'ed by scaledEngine, make sure it is deallocated and not leaked.
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index ac7015639b..8037fd5f6d 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 0bffbcc802..c60d0cc775 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -258,20 +258,6 @@ private:
friend QDataStream &operator>>(QDataStream &, QTextFormat &);
};
-// this is only safe because sizeof(int) == sizeof(float)
-static inline uint hash(float d)
-{
-#ifdef Q_CC_GNU
- // this is a GCC extension and isn't guaranteed to work in other compilers
- // the reinterpret_cast below generates a strict-aliasing warning with GCC
- union { float f; uint u; } cvt;
- cvt.f = d;
- return cvt.u;
-#else
- return reinterpret_cast<uint&>(d);
-#endif
-}
-
static inline uint hash(const QColor &color)
{
return (color.isValid()) ? color.rgba() : 0x234109;
@@ -279,7 +265,7 @@ static inline uint hash(const QColor &color)
static inline uint hash(const QPen &pen)
{
- return hash(pen.color()) + hash(pen.widthF());
+ return hash(pen.color()) + qHash(pen.widthF());
}
static inline uint hash(const QBrush &brush)
@@ -292,7 +278,7 @@ static inline uint variantHash(const QVariant &variant)
// simple and fast hash functions to differentiate between type and value
switch (variant.userType()) { // sorted by occurrence frequency
case QVariant::String: return qHash(variant.toString());
- case QVariant::Double: return hash(variant.toDouble());
+ case QVariant::Double: return qHash(variant.toDouble());
case QVariant::Int: return 0x811890 + variant.toInt();
case QVariant::Brush:
return 0x01010101 + hash(qvariant_cast<QBrush>(variant));
@@ -303,7 +289,7 @@ static inline uint variantHash(const QVariant &variant)
case QVariant::Color: return hash(qvariant_cast<QColor>(variant));
case QVariant::TextLength:
return 0x377 + hash(qvariant_cast<QTextLength>(variant).rawValue());
- case QMetaType::Float: return hash(variant.toFloat());
+ case QMetaType::Float: return qHash(variant.toFloat());
case QVariant::Invalid: return 0;
default: break;
}
@@ -3472,14 +3458,16 @@ void QTextFormatCollection::setDefaultFont(const QFont &f)
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QTextLength &l)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QTextLength(QTextLength::Type(" << l.type() << "))";
- return dbg.space();
+ return dbg;
}
QDebug operator<<(QDebug dbg, const QTextFormat &f)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QTextFormat(QTextFormat::FormatType(" << f.type() << "))";
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index 94c5b83cc0..6c1b75aa35 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -126,7 +126,6 @@ Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextFormat &);
class Q_GUI_EXPORT QTextFormat
{
Q_GADGET
- Q_ENUMS(FormatType Property ObjectTypes)
public:
enum FormatType {
InvalidFormat = -1,
@@ -140,6 +139,7 @@ public:
UserFormat = 100
};
+ Q_ENUM(FormatType)
enum Property {
ObjectIndex = 0x0,
@@ -257,6 +257,7 @@ public:
// --
UserProperty = 0x100000
};
+ Q_ENUM(Property)
enum ObjectTypes {
NoObject,
@@ -266,6 +267,7 @@ public:
UserObject = 0x1000
};
+ Q_ENUM(ObjectTypes)
enum PageBreakFlag {
PageBreak_Auto = 0,
diff --git a/src/gui/text/qtextformat_p.h b/src/gui/text/qtextformat_p.h
index 72cd56cbbb..29656bbafe 100644
--- a/src/gui/text/qtextformat_p.h
+++ b/src/gui/text/qtextformat_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index e1a7781722..f8f41bb53d 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -45,7 +45,6 @@
#include "qtextdocument_p.h"
#include "qtextcursor.h"
#include "qfont_p.h"
-#include "private/qfunctions_p.h"
#include <algorithm>
@@ -323,12 +322,12 @@ bool operator<(const QTextHtmlEntity &entity1, const QTextHtmlEntity &entity2)
}
#endif
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &entityStr, const QTextHtmlEntity &entity)
+static bool operator<(const QString &entityStr, const QTextHtmlEntity &entity)
{
return entityStr < QLatin1String(entity.name);
}
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlEntity &entity, const QString &entityStr)
+static bool operator<(const QTextHtmlEntity &entity, const QString &entityStr)
{
return QLatin1String(entity.name) < entityStr;
}
@@ -443,18 +442,18 @@ static const QTextHtmlElement elements[Html_NumElements]= {
};
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlElement &e1, const QTextHtmlElement &e2)
+static bool operator<(const QTextHtmlElement &e1, const QTextHtmlElement &e2)
{
return QLatin1String(e1.name) < QLatin1String(e2.name);
}
#endif
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &str, const QTextHtmlElement &e)
+static bool operator<(const QString &str, const QTextHtmlElement &e)
{
return str < QLatin1String(e.name);
}
-Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlElement &e, const QString &str)
+static bool operator<(const QTextHtmlElement &e, const QString &str)
{
return QLatin1String(e.name) < str;
}
@@ -1051,25 +1050,14 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
// set element specific attributes
switch (id) {
case Html_a:
- charFormat.setAnchor(true);
for (int i = 0; i < attributes.count(); i += 2) {
const QString key = attributes.at(i);
if (key.compare(QLatin1String("href"), Qt::CaseInsensitive) == 0
&& !attributes.at(i + 1).isEmpty()) {
hasHref = true;
- charFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline);
- charFormat.setForeground(QGuiApplication::palette().link());
}
}
-
- break;
- case Html_em:
- case Html_i:
- case Html_cite:
- case Html_address:
- case Html_var:
- case Html_dfn:
- charFormat.setFontItalic(true);
+ charFormat.setAnchor(true);
break;
case Html_big:
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(1));
@@ -1077,36 +1065,27 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
case Html_small:
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(-1));
break;
- case Html_strong:
- case Html_b:
- charFormat.setFontWeight(QFont::Bold);
- break;
case Html_h1:
- charFormat.setFontWeight(QFont::Bold);
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(3));
margin[QTextHtmlParser::MarginTop] = 18;
margin[QTextHtmlParser::MarginBottom] = 12;
break;
case Html_h2:
- charFormat.setFontWeight(QFont::Bold);
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(2));
margin[QTextHtmlParser::MarginTop] = 16;
margin[QTextHtmlParser::MarginBottom] = 12;
break;
case Html_h3:
- charFormat.setFontWeight(QFont::Bold);
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(1));
margin[QTextHtmlParser::MarginTop] = 14;
margin[QTextHtmlParser::MarginBottom] = 12;
break;
case Html_h4:
- charFormat.setFontWeight(QFont::Bold);
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(0));
margin[QTextHtmlParser::MarginTop] = 12;
margin[QTextHtmlParser::MarginBottom] = 12;
break;
case Html_h5:
- charFormat.setFontWeight(QFont::Bold);
charFormat.setProperty(QTextFormat::FontSizeAdjustment, int(-1));
margin[QTextHtmlParser::MarginTop] = 12;
margin[QTextHtmlParser::MarginBottom] = 4;
@@ -1115,11 +1094,7 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
margin[QTextHtmlParser::MarginTop] = 12;
margin[QTextHtmlParser::MarginBottom] = 12;
break;
- case Html_center:
- blockFormat.setAlignment(Qt::AlignCenter);
- break;
case Html_ul:
- listStyle = QTextListFormat::ListDisc;
// nested lists don't have margins, except for the toplevel one
if (!isNestedList(parser)) {
margin[QTextHtmlParser::MarginTop] = 12;
@@ -1128,7 +1103,6 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
// no left margin as we use indenting instead
break;
case Html_ol:
- listStyle = QTextListFormat::ListDecimal;
// nested lists don't have margins, except for the toplevel one
if (!isNestedList(parser)) {
margin[QTextHtmlParser::MarginTop] = 12;
@@ -1136,26 +1110,12 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
}
// no left margin as we use indenting instead
break;
- case Html_code:
- case Html_tt:
- case Html_kbd:
- case Html_samp:
- charFormat.setFontFamily(QString::fromLatin1("Courier New,courier"));
- // <tt> uses a fixed font, so set the property
- charFormat.setFontFixedPitch(true);
- break;
case Html_br:
text = QChar(QChar::LineSeparator);
- wsm = QTextHtmlParserNode::WhiteSpacePre;
break;
- // ##### sub / sup
case Html_pre:
- charFormat.setFontFamily(QString::fromLatin1("Courier New,courier"));
- wsm = WhiteSpacePre;
margin[QTextHtmlParser::MarginTop] = 12;
margin[QTextHtmlParser::MarginBottom] = 12;
- // <pre> uses a fixed font
- charFormat.setFontFixedPitch(true);
break;
case Html_blockquote:
margin[QTextHtmlParser::MarginTop] = 12;
@@ -1170,28 +1130,6 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
case Html_dd:
margin[QTextHtmlParser::MarginLeft] = 30;
break;
- case Html_u:
- charFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline);
- break;
- case Html_s:
- charFormat.setFontStrikeOut(true);
- break;
- case Html_nobr:
- wsm = WhiteSpaceNoWrap;
- break;
- case Html_th:
- charFormat.setFontWeight(QFont::Bold);
- blockFormat.setAlignment(Qt::AlignCenter);
- break;
- case Html_td:
- blockFormat.setAlignment(Qt::AlignLeft);
- break;
- case Html_sub:
- charFormat.setVerticalAlignment(QTextCharFormat::AlignSubScript);
- break;
- case Html_sup:
- charFormat.setVerticalAlignment(QTextCharFormat::AlignSuperScript);
- break;
default: break;
}
}
@@ -1346,6 +1284,14 @@ void QTextHtmlParserNode::applyCssDeclarations(const QVector<QCss::Declaration>
case QCss::QtListNumberSuffix:
textListNumberSuffix = decl.d->values.first().variant.toString();
break;
+ case QCss::TextAlignment:
+ switch (identifier) {
+ case QCss::Value_Left: blockFormat.setAlignment(Qt::AlignLeft); break;
+ case QCss::Value_Center: blockFormat.setAlignment(Qt::AlignCenter); break;
+ case QCss::Value_Right: blockFormat.setAlignment(Qt::AlignRight); break;
+ default: break;
+ }
+ break;
default: break;
}
}
@@ -1713,14 +1659,14 @@ public:
inline QTextHtmlStyleSelector(const QTextHtmlParser *parser)
: parser(parser) { nameCaseSensitivity = Qt::CaseInsensitive; }
- virtual QStringList nodeNames(NodePtr node) const;
- virtual QString attribute(NodePtr node, const QString &name) const;
- virtual bool hasAttributes(NodePtr node) const;
- virtual bool isNullNode(NodePtr node) const;
- virtual NodePtr parentNode(NodePtr node) const;
- virtual NodePtr previousSiblingNode(NodePtr node) const;
- virtual NodePtr duplicateNode(NodePtr node) const;
- virtual void freeNode(NodePtr node) const;
+ virtual QStringList nodeNames(NodePtr node) const Q_DECL_OVERRIDE;
+ virtual QString attribute(NodePtr node, const QString &name) const Q_DECL_OVERRIDE;
+ virtual bool hasAttributes(NodePtr node) const Q_DECL_OVERRIDE;
+ virtual bool isNullNode(NodePtr node) const Q_DECL_OVERRIDE;
+ virtual NodePtr parentNode(NodePtr node) const Q_DECL_OVERRIDE;
+ virtual NodePtr previousSiblingNode(NodePtr node) const Q_DECL_OVERRIDE;
+ virtual NodePtr duplicateNode(NodePtr node) const Q_DECL_OVERRIDE;
+ virtual void freeNode(NodePtr node) const Q_DECL_OVERRIDE;
private:
const QTextHtmlParser *parser;
@@ -1834,6 +1780,189 @@ void QTextHtmlParser::importStyleSheet(const QString &href)
}
}
+QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode &node)
+{
+ QVector<QCss::Declaration> decls;
+ QCss::Declaration decl;
+ QCss::Value val;
+ switch (node.id) {
+ case Html_a:
+ case Html_u: {
+ bool needsUnderline = (node.id == Html_u) ? true : false;
+ if (node.id == Html_a) {
+ for (int i = 0; i < node.attributes.count(); i += 2) {
+ const QString key = node.attributes.at(i);
+ if (key.compare(QLatin1String("href"), Qt::CaseInsensitive) == 0
+ && !node.attributes.at(i + 1).isEmpty()) {
+ needsUnderline = true;
+ decl.d->property = QLatin1String("color");
+ decl.d->propertyId = QCss::Color;
+ val.type = QCss::Value::Color;
+ val.variant = QVariant(QGuiApplication::palette().link());
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ }
+ }
+ }
+ if (needsUnderline) {
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("text-decoration");
+ decl.d->propertyId = QCss::TextDecoration;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = QVariant(QCss::Value_Underline);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ }
+ break;
+ }
+ case Html_b:
+ case Html_strong:
+ case Html_h1:
+ case Html_h2:
+ case Html_h3:
+ case Html_h4:
+ case Html_h5:
+ case Html_th:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("font-weight");
+ decl.d->propertyId = QCss::FontWeight;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = QVariant(QCss::Value_Bold);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ if (node.id == Html_b || node.id == Html_strong)
+ break;
+ // Delibrate fall through
+ case Html_big:
+ case Html_small:
+ if (node.id != Html_th) {
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("font-size");
+ decl.d->propertyId = QCss::FontSize;
+ decl.d->inheritable = false;
+ val.type = QCss::Value::KnownIdentifier;
+ switch (node.id) {
+ case Html_h1: val.variant = QVariant(QCss::Value_XXLarge); break;
+ case Html_h2: val.variant = QVariant(QCss::Value_XLarge); break;
+ case Html_h3: case Html_big: val.variant = QVariant(QCss::Value_Large); break;
+ case Html_h4: val.variant = QVariant(QCss::Value_Medium); break;
+ case Html_h5: case Html_small: val.variant = QVariant(QCss::Value_Small); break;
+ default: break;
+ }
+ decl.d->values = QVector<QCss::Value>() << val;
+ decls << decl;
+ break;
+ }
+ // Delibrate fall through
+ case Html_center:
+ case Html_td:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("text-align");
+ decl.d->propertyId = QCss::TextAlignment;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = (node.id == Html_td) ? QVariant(QCss::Value_Left) : QVariant(QCss::Value_Center);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ case Html_s:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("text-decoration");
+ decl.d->propertyId = QCss::TextDecoration;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = QVariant(QCss::Value_LineThrough);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ case Html_em:
+ case Html_i:
+ case Html_cite:
+ case Html_address:
+ case Html_var:
+ case Html_dfn:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("font-style");
+ decl.d->propertyId = QCss::FontStyle;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = QVariant(QCss::Value_Italic);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ case Html_sub:
+ case Html_sup:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("vertical-align");
+ decl.d->propertyId = QCss::VerticalAlignment;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = (node.id == Html_sub) ? QVariant(QCss::Value_Sub) : QVariant(QCss::Value_Super);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ case Html_ul:
+ case Html_ol:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("list-style");
+ decl.d->propertyId = QCss::ListStyle;
+ val.type = QCss::Value::KnownIdentifier;
+ val.variant = (node.id == Html_ul) ? QVariant(QCss::Value_Disc) : QVariant(QCss::Value_Decimal);
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ case Html_code:
+ case Html_tt:
+ case Html_kbd:
+ case Html_samp:
+ case Html_pre: {
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("font-family");
+ decl.d->propertyId = QCss::FontFamily;
+ QVector<QCss::Value> values;
+ val.type = QCss::Value::String;
+ val.variant = QLatin1String("Courier New");
+ values << val;
+ val.type = QCss::Value::TermOperatorComma;
+ val.variant = QVariant();
+ values << val;
+ val.type = QCss::Value::String;
+ val.variant = QLatin1String("courier");
+ values << val;
+ decl.d->values = values;
+ decl.d->inheritable = true;
+ decls << decl;
+ }
+ if (node.id != Html_pre)
+ break;
+ // Delibrate fall through
+ case Html_br:
+ case Html_nobr:
+ decl = QCss::Declaration();
+ decl.d->property = QLatin1String("whitespace");
+ decl.d->propertyId = QCss::Whitespace;
+ val.type = QCss::Value::KnownIdentifier;
+ switch (node.id) {
+ case Html_br: val.variant = QVariant(QCss::Value_PreWrap); break;
+ case Html_nobr: val.variant = QVariant(QCss::Value_NoWrap); break;
+ case Html_pre: val.variant = QVariant(QCss::Value_Pre); break;
+ default: break;
+ }
+ decl.d->values = QVector<QCss::Value>() << val;
+ decl.d->inheritable = true;
+ decls << decl;
+ break;
+ default:
+ break;
+ }
+ return decls;
+}
+
QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
{
QVector<QCss::Declaration> decls;
@@ -1861,8 +1990,20 @@ QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
const char *extraPseudo = 0;
if (nodes.at(node).id == Html_a && nodes.at(node).hasHref)
extraPseudo = "link";
- decls = selector.declarationsForNode(n, extraPseudo);
-
+ // Ensure that our own style is taken into consideration
+ decls = standardDeclarationForNode(nodes.at(node));
+ decls += selector.declarationsForNode(n, extraPseudo);
+ n = selector.parentNode(n);
+ while (!selector.isNullNode(n)) {
+ QVector<QCss::Declaration> inheritedDecls;
+ inheritedDecls = selector.declarationsForNode(n, extraPseudo);
+ for (int i = 0; i < inheritedDecls.size(); ++i) {
+ const QCss::Declaration &decl = inheritedDecls.at(i);
+ if (decl.d->inheritable)
+ decls.prepend(decl);
+ }
+ n = selector.parentNode(n);
+ }
return decls;
}
diff --git a/src/gui/text/qtexthtmlparser_p.h b/src/gui/text/qtexthtmlparser_p.h
index 976a1a918c..460e32d5bb 100644
--- a/src/gui/text/qtexthtmlparser_p.h
+++ b/src/gui/text/qtexthtmlparser_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextimagehandler.cpp b/src/gui/text/qtextimagehandler.cpp
index 37c18e3624..e85890baf2 100644
--- a/src/gui/text/qtextimagehandler.cpp
+++ b/src/gui/text/qtextimagehandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextimagehandler_p.h b/src/gui/text/qtextimagehandler_p.h
index c986c81f8b..5cdbe99530 100644
--- a/src/gui/text/qtextimagehandler_p.h
+++ b/src/gui/text/qtextimagehandler_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -60,8 +60,8 @@ class Q_GUI_EXPORT QTextImageHandler : public QObject,
public:
explicit QTextImageHandler(QObject *parent = 0);
- virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
- virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
+ virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) Q_DECL_OVERRIDE;
+ virtual void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) Q_DECL_OVERRIDE;
QImage image(QTextDocument *doc, const QTextImageFormat &imageFormat);
};
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 52d2ba0d54..cab9f6ae61 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -2091,7 +2091,9 @@ static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine,
qreal minY = 0;
qreal maxY = 0;
QVector<quint32> glyphs;
+ glyphs.reserve(glyphsArray.size());
QVector<QPointF> positions;
+ positions.reserve(glyphsArray.size());
for (int i=0; i<glyphsArray.size(); ++i) {
glyphs.append(glyphsArray.at(i) & 0xffffff);
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h
index 1e0ab9b5c9..47dcd388e2 100644
--- a/src/gui/text/qtextlayout.h
+++ b/src/gui/text/qtextlayout.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp
index 13da035043..884b5f178b 100644
--- a/src/gui/text/qtextlist.cpp
+++ b/src/gui/text/qtextlist.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextlist.h b/src/gui/text/qtextlist.h
index 61f4885e42..12de39be17 100644
--- a/src/gui/text/qtextlist.h
+++ b/src/gui/text/qtextlist.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index d155e31f31..425126d474 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h
index 5a0e2c60a6..9ad912d992 100644
--- a/src/gui/text/qtextobject.h
+++ b/src/gui/text/qtextobject.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextobject_p.h b/src/gui/text/qtextobject_p.h
index 16a8164464..19d1dadd5f 100644
--- a/src/gui/text/qtextobject_p.h
+++ b/src/gui/text/qtextobject_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index ef7bbb44ff..6b17a264b1 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -88,7 +88,7 @@ public:
if (contentStream)
contentStream->close();
}
- virtual void addFile(const QString &, const QString &, const QByteArray &)
+ virtual void addFile(const QString &, const QString &, const QByteArray &) Q_DECL_OVERRIDE
{
// we ignore this...
}
@@ -131,7 +131,7 @@ public:
zip.close();
}
- virtual void addFile(const QString &fileName, const QString &mimeType, const QByteArray &bytes)
+ virtual void addFile(const QString &fileName, const QString &mimeType, const QByteArray &bytes) Q_DECL_OVERRIDE
{
zip.addFile(fileName, bytes);
addFile(fileName, mimeType);
@@ -278,7 +278,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
writer.writeStartElement(textNS, QString::fromLatin1("p"));
writer.writeAttribute(textNS, QString::fromLatin1("style-name"), QString::fromLatin1("p%1")
.arg(block.blockFormatIndex()));
- for (QTextBlock::Iterator frag= block.begin(); !frag.atEnd(); frag++) {
+ for (QTextBlock::Iterator frag = block.begin(); !frag.atEnd(); ++frag) {
writer.writeCharacters(QString()); // Trick to make sure that the span gets no linefeed in front of it.
writer.writeStartElement(textNS, QString::fromLatin1("span"));
diff --git a/src/gui/text/qtextodfwriter_p.h b/src/gui/text/qtextodfwriter_p.h
index 5c06511c14..20805a8d27 100644
--- a/src/gui/text/qtextodfwriter_p.h
+++ b/src/gui/text/qtextodfwriter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index dc38b1a105..dbafcfd58e 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtextoption.h b/src/gui/text/qtextoption.h
index 694adc5cb9..b2e4476927 100644
--- a/src/gui/text/qtextoption.h
+++ b/src/gui/text/qtextoption.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index c2cc822ad6..e5acccb55b 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -37,7 +37,6 @@
#include <qdebug.h>
#include "qtexttable_p.h"
#include "qvarlengtharray.h"
-#include "private/qfunctions_p.h"
#include <algorithm>
#include <stdlib.h>
@@ -371,12 +370,12 @@ struct QFragmentFindHelper
const QTextDocumentPrivate::FragmentMap &fragmentMap;
};
-Q_STATIC_GLOBAL_INLINE_OPERATOR bool operator<(int fragment, const QFragmentFindHelper &helper)
+static inline bool operator<(int fragment, const QFragmentFindHelper &helper)
{
return helper.fragmentMap.position(fragment) < helper.pos;
}
-Q_STATIC_GLOBAL_INLINE_OPERATOR bool operator<(const QFragmentFindHelper &helper, int fragment)
+static inline bool operator<(const QFragmentFindHelper &helper, int fragment)
{
return helper.pos < helper.fragmentMap.position(fragment);
}
diff --git a/src/gui/text/qtexttable.h b/src/gui/text/qtexttable.h
index 5d2467e3a0..6ceb1fdd0f 100644
--- a/src/gui/text/qtexttable.h
+++ b/src/gui/text/qtexttable.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qtexttable_p.h b/src/gui/text/qtexttable_p.h
index 0459242ae9..58a4b7d32d 100644
--- a/src/gui/text/qtexttable_p.h
+++ b/src/gui/text/qtexttable_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -58,8 +58,8 @@ public:
~QTextTablePrivate();
static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat);
- void fragmentAdded(QChar type, uint fragment);
- void fragmentRemoved(QChar type, uint fragment);
+ void fragmentAdded(QChar type, uint fragment) Q_DECL_OVERRIDE;
+ void fragmentRemoved(QChar type, uint fragment) Q_DECL_OVERRIDE;
void update() const;
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 90db029a12..9f561dcb02 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -194,7 +194,7 @@ static int inflate(Bytef *dest, ulong *destLen, const Bytef *source, ulong sourc
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = const_cast<Bytef*>(source);
stream.avail_in = (uInt)sourceLen;
if ((uLong)stream.avail_in != sourceLen)
return Z_BUF_ERROR;
@@ -229,7 +229,7 @@ static int deflate (Bytef *dest, ulong *destLen, const Bytef *source, ulong sour
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = const_cast<Bytef*>(source);
stream.avail_in = (uInt)sourceLen;
stream.next_out = dest;
stream.avail_out = (uInt)*destLen;
@@ -1008,7 +1008,7 @@ QByteArray QZipReader::fileData(const QString &fileName) const
do {
baunzip.resize(len);
res = inflate((uchar*)baunzip.data(), &len,
- (uchar*)compressed.constData(), compressed_size);
+ (const uchar*)compressed.constData(), compressed_size);
switch (res) {
case Z_OK:
diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h
index c950c2505a..df7e2d26e9 100644
--- a/src/gui/text/qzipreader_p.h
+++ b/src/gui/text/qzipreader_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h
index e4e4e7fa37..bd8d0b423d 100644
--- a/src/gui/text/qzipwriter_p.h
+++ b/src/gui/text/qzipwriter_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 091129f5be..61e239f678 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -86,7 +86,7 @@ HEADERS += \
contains(QT_CONFIG, harfbuzz)|contains(QT_CONFIG, system-harfbuzz) {
DEFINES += QT_ENABLE_HARFBUZZ_NG
- include($$PWD/../../3rdparty/harfbuzzng.pri)
+ include($$PWD/../../3rdparty/harfbuzz_dependency.pri)
SOURCES += text/qharfbuzzng.cpp
HEADERS += text/qharfbuzzng_p.h
diff --git a/src/gui/util/qabstractlayoutstyleinfo.cpp b/src/gui/util/qabstractlayoutstyleinfo.cpp
index 4338a0ccbf..e85f2ec190 100644
--- a/src/gui/util/qabstractlayoutstyleinfo.cpp
+++ b/src/gui/util/qabstractlayoutstyleinfo.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -35,11 +35,4 @@
QT_BEGIN_NAMESPACE
-bool QAbstractLayoutStyleInfo::hasChanged() const
-{
- if (m_changed == Unknown)
- m_changed = hasChangedCore() ? Changed : Unchanged;
- return m_changed == Changed;
-}
-
QT_END_NAMESPACE
diff --git a/src/gui/util/qabstractlayoutstyleinfo_p.h b/src/gui/util/qabstractlayoutstyleinfo_p.h
index 3479c47c4e..4327057f97 100644
--- a/src/gui/util/qabstractlayoutstyleinfo_p.h
+++ b/src/gui/util/qabstractlayoutstyleinfo_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -53,13 +53,8 @@ QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QAbstractLayoutStyleInfo {
public:
- typedef enum {
- Unknown = 0,
- Changed,
- Unchanged
- } ChangedState;
- QAbstractLayoutStyleInfo() : m_isWindow(false), m_changed(Changed) {}
+ QAbstractLayoutStyleInfo() : m_isWindow(false) {}
virtual ~QAbstractLayoutStyleInfo() {}
virtual qreal combinedLayoutSpacing(QLayoutPolicy::ControlTypes /*controls1*/,
QLayoutPolicy::ControlTypes /*controls2*/, Qt::Orientation /*orientation*/) const {
@@ -74,15 +69,9 @@ public:
virtual qreal spacing(Qt::Orientation orientation) const = 0;
- virtual bool hasChangedCore() const = 0;
+ virtual bool hasChangedCore() const { return false; } // ### Remove when usage is gone from subclasses
- void updateChanged(ChangedState change) {
- m_changed = change;
- }
-
- bool hasChanged() const;
-
- virtual void invalidate() { updateChanged(Changed);}
+ virtual void invalidate() { }
virtual qreal windowMargin(Qt::Orientation orientation) const = 0;
@@ -92,7 +81,9 @@ public:
protected:
unsigned m_isWindow : 1;
- mutable unsigned m_changed : 2;
+ mutable unsigned m_hSpacingState: 2;
+ mutable unsigned m_vSpacingState: 2;
+ mutable qreal m_spacing[2];
};
QT_END_NAMESPACE
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp
index 9d90aaf25c..4c92e5d000 100644
--- a/src/gui/util/qdesktopservices.cpp
+++ b/src/gui/util/qdesktopservices.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/util/qdesktopservices.h b/src/gui/util/qdesktopservices.h
index ca29175792..6000c9d589 100644
--- a/src/gui/util/qdesktopservices.h
+++ b/src/gui/util/qdesktopservices.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/util/qgridlayoutengine.cpp b/src/gui/util/qgridlayoutengine.cpp
index 65f2297fce..28545d934f 100644
--- a/src/gui/util/qgridlayoutengine.cpp
+++ b/src/gui/util/qgridlayoutengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -33,10 +33,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
-#include <math.h>
-
#include "qgridlayoutengine_p.h"
#include "qvarlengtharray.h"
@@ -156,7 +152,7 @@ void QGridLayoutRowData::reset(int count)
hasIgnoreFlag = false;
}
-void QGridLayoutRowData::distributeMultiCells(const QGridLayoutRowInfo &rowInfo)
+void QGridLayoutRowData::distributeMultiCells(const QGridLayoutRowInfo &rowInfo, bool snapToPixelGrid)
{
MultiCellMap::const_iterator i = multiCellMap.constBegin();
for (; i != multiCellMap.constEnd(); ++i) {
@@ -175,7 +171,7 @@ void QGridLayoutRowData::distributeMultiCells(const QGridLayoutRowInfo &rowInfo)
qreal extra = compare(box, totalBox, j);
if (extra > 0.0) {
calculateGeometries(start, end, box.q_sizes(j), dummy.data(), newSizes.data(),
- 0, totalBox, rowInfo);
+ 0, totalBox, rowInfo, snapToPixelGrid);
for (int k = 0; k < span; ++k)
extras[k].q_sizes(j) = newSizes[k];
@@ -190,11 +186,19 @@ void QGridLayoutRowData::distributeMultiCells(const QGridLayoutRowInfo &rowInfo)
}
multiCellMap.clear();
}
+namespace {
+
+// does not return int
+static inline qreal qround(qreal f)
+{
+ return std::floor(f + qreal(0.5));
+}
+}
void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSize, qreal *positions,
qreal *sizes, qreal *descents,
const QGridLayoutBox &totalBox,
- const QGridLayoutRowInfo &rowInfo)
+ const QGridLayoutRowInfo &rowInfo, bool snapToPixelGrid)
{
Q_ASSERT(end > start);
@@ -337,17 +341,19 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz
bool keepGoing = somethingHasAMaximumSize;
while (keepGoing) {
+ //sumCurrentAvailable is so large that something *might* reach its maximum size
keepGoing = false;
for (int i = 0; i < n; ++i) {
if (newSizes[i] >= 0.0)
continue;
- qreal maxBoxSize;
- if (isLargerThanMaximum)
- maxBoxSize = rowInfo.boxes.value(start + i).q_maximumSize;
- else
- maxBoxSize = boxes.at(start + i).q_maximumSize;
+ const QVector<QGridLayoutBox> &rBoxes = isLargerThanMaximum ? rowInfo.boxes : boxes;
+ const QGridLayoutBox &box = rBoxes.value(start + i);
+ qreal maxBoxSize = box.q_maximumSize;
+
+ if (snapToPixelGrid)
+ maxBoxSize = qMax(box.q_minimumSize, std::floor(maxBoxSize));
qreal avail = sumCurrentAvailable * factors[i] / sumFactors;
if (sizes[i] + avail >= maxBoxSize) {
@@ -360,7 +366,6 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz
}
}
}
-
for (int i = 0; i < n; ++i) {
if (newSizes[i] < 0.0) {
qreal delta = (sumFactors == 0.0) ? 0.0
@@ -404,6 +409,10 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz
Q_ASSERT(surplus == 0);
#endif
}
+ if (snapToPixelGrid) {
+ for (int i = 0; i < n; ++i)
+ positions[i] = qround(positions[i]);
+ }
if (descents) {
for (int i = 0; i < n; ++i) {
@@ -755,10 +764,11 @@ void QGridLayoutRowInfo::dump(int indent) const
}
#endif
-QGridLayoutEngine::QGridLayoutEngine(Qt::Alignment defaultAlignment)
+QGridLayoutEngine::QGridLayoutEngine(Qt::Alignment defaultAlignment, bool snapToPixelGrid)
{
m_visualDirection = Qt::LeftToRight;
m_defaultAlignment = defaultAlignment;
+ m_snapToPixelGrid = snapToPixelGrid;
invalidate();
}
@@ -1009,8 +1019,17 @@ void QGridLayoutEngine::setGeometries(const QRectF &contentsGeometry, const QAbs
if (item->rowSpan() != 1)
height += q_yy[item->lastRow()] - y;
+ const Qt::Alignment align = effectiveAlignment(item);
QRectF geom = item->geometryWithin(contentsGeometry.x() + x, contentsGeometry.y() + y,
- width, height, q_descents[item->lastRow()], effectiveAlignment(item));
+ width, height, q_descents[item->lastRow()], align);
+ if (m_snapToPixelGrid) {
+ // x and y should already be rounded, but the call to geometryWithin() above might
+ // result in a geom with x,y at half-pixels (due to centering within the cell)
+ geom.setX(qround(geom.x()));
+ // Do not snap baseline aligned items, since that might cause the baselines to not be aligned.
+ if (align != Qt::AlignBaseline)
+ geom.setY(qround(geom.y()));
+ }
visualRect(&geom, visualDirection(), contentsGeometry);
item->setGeometry(geom);
}
@@ -1063,7 +1082,7 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
//Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as
//constraints to find the row heights
q_columnData.calculateGeometries(0, columnCount(), width, sizehint_xx.data(), sizehint_widths.data(),
- 0, sizehint_totalBoxes[Hor], q_infos[Hor]);
+ 0, sizehint_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], sizehint_xx.data(), sizehint_widths.data(), Qt::Vertical, styleInfo);
sizeHintCalculated = true;
}
@@ -1080,7 +1099,7 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as
//constraints to find the column widths
q_rowData.calculateGeometries(0, rowCount(), height, sizehint_yy.data(), sizehint_heights.data(),
- 0, sizehint_totalBoxes[Ver], q_infos[Ver]);
+ 0, sizehint_totalBoxes[Ver], q_infos[Ver], m_snapToPixelGrid);
ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], sizehint_yy.data(), sizehint_heights.data(), Qt::Horizontal, styleInfo);
sizeHintCalculated = true;
}
@@ -1367,7 +1386,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData,
rowStretch = qMax(rowStretch, itemStretch);
} else {
QGridLayoutMultiCellData &multiCell =
- rowData->multiCellMap[qMakePair(row, effectiveRowSpan)];
+ rowData->multiCellMap[qMakePair(row, itemRowSpan)];
box = &multiCell.q_box;
multiCell.q_stretch = itemStretch;
}
@@ -1535,7 +1554,7 @@ void QGridLayoutEngine::ensureColumnAndRowData(QGridLayoutRowData *rowData, QGri
rowData->reset(rowCount(orientation));
fillRowData(rowData, colPositions, colSizes, orientation, styleInfo);
const QGridLayoutRowInfo &rowInfo = q_infos[orientation == Qt::Vertical];
- rowData->distributeMultiCells(rowInfo);
+ rowData->distributeMultiCells(rowInfo, m_snapToPixelGrid);
*totalBox = rowData->totalBox(0, rowCount(orientation));
if (totalBox != &q_totalBoxes[o])
@@ -1590,7 +1609,7 @@ Qt::Orientation QGridLayoutEngine::constraintOrientation() const
void QGridLayoutEngine::ensureGeometries(const QSizeF &size,
const QAbstractLayoutStyleInfo *styleInfo) const
{
- if (!styleInfo->hasChanged() && q_cachedSize == size)
+ if (q_cachedSize == size)
return;
q_cachedSize = size;
@@ -1607,25 +1626,23 @@ void QGridLayoutEngine::ensureGeometries(const QSizeF &size,
//Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as
//constraints to find the row heights
q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(),
- 0, q_totalBoxes[Hor], q_infos[Hor] );
+ 0, q_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], q_xx.data(), q_widths.data(), Qt::Vertical, styleInfo);
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data()
q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(),
- q_descents.data(), q_totalBoxes[Ver], q_infos[Ver]);
+ q_descents.data(), q_totalBoxes[Ver], q_infos[Ver], m_snapToPixelGrid);
} else {
//We have items whose width depends on their height (WFH)
ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], NULL, NULL, Qt::Vertical, styleInfo);
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as
//constraints to find the column widths
q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(),
- q_descents.data(), q_totalBoxes[Ver], q_infos[Ver]);
+ q_descents.data(), q_totalBoxes[Ver], q_infos[Ver], m_snapToPixelGrid);
ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], q_yy.data(), q_heights.data(), Qt::Horizontal, styleInfo);
//Calculate row heights and positions, and put results in q_yy.data() and q_heights.data()
q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(),
- 0, q_totalBoxes[Hor], q_infos[Hor]);
+ 0, q_totalBoxes[Hor], q_infos[Hor], m_snapToPixelGrid);
}
}
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h
index b75312bfe8..73601153c6 100644
--- a/src/gui/util/qgridlayoutengine_p.h
+++ b/src/gui/util/qgridlayoutengine_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -226,10 +226,10 @@ class QGridLayoutRowData
{
public:
void reset(int count);
- void distributeMultiCells(const QGridLayoutRowInfo &rowInfo);
+ void distributeMultiCells(const QGridLayoutRowInfo &rowInfo, bool snapToPixelGrid);
void calculateGeometries(int start, int end, qreal targetSize, qreal *positions, qreal *sizes,
qreal *descents, const QGridLayoutBox &totalBox,
- const QGridLayoutRowInfo &rowInfo);
+ const QGridLayoutRowInfo &rowInfo, bool snapToPixelGrid);
QGridLayoutBox totalBox(int start, int end) const;
void stealBox(int start, int end, int which, qreal *positions, qreal *sizes);
@@ -331,7 +331,7 @@ private:
class Q_GUI_EXPORT QGridLayoutEngine
{
public:
- QGridLayoutEngine(Qt::Alignment defaultAlignment = Qt::Alignment(0));
+ QGridLayoutEngine(Qt::Alignment defaultAlignment = Qt::Alignment(0), bool snapToPixelGrid = false);
inline ~QGridLayoutEngine() { qDeleteAll(q_items); }
int rowCount(Qt::Orientation orientation) const;
@@ -436,7 +436,10 @@ private:
QLayoutParameter<qreal> q_defaultSpacings[NOrientations];
QGridLayoutRowInfo q_infos[NOrientations];
Qt::LayoutDirection m_visualDirection;
+
+ // Configuration
Qt::Alignment m_defaultAlignment;
+ unsigned m_snapToPixelGrid : 1;
// Lazily computed from the above user input
mutable int q_cachedEffectiveFirstRows[NOrientations];
diff --git a/src/gui/util/qhexstring_p.h b/src/gui/util/qhexstring_p.h
index 8ffad4a7f2..66d6d0f2dc 100644
--- a/src/gui/util/qhexstring_p.h
+++ b/src/gui/util/qhexstring_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/util/qlayoutpolicy.cpp b/src/gui/util/qlayoutpolicy.cpp
index a7f2515164..0a050184a6 100644
--- a/src/gui/util/qlayoutpolicy.cpp
+++ b/src/gui/util/qlayoutpolicy.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Quick Layouts module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -119,9 +119,10 @@ QDataStream &operator>>(QDataStream &stream, QLayoutPolicy &policy)
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QLayoutPolicy &p)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QLayoutPolicy(horizontalPolicy = " << p.horizontalPolicy()
<< ", verticalPolicy = " << p.verticalPolicy() << ')';
- return dbg.space();
+ return dbg;
}
#endif
diff --git a/src/gui/util/qlayoutpolicy_p.h b/src/gui/util/qlayoutpolicy_p.h
index 22c7ad10ef..e41a964048 100644
--- a/src/gui/util/qlayoutpolicy_p.h
+++ b/src/gui/util/qlayoutpolicy_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Quick Layouts module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp
index f879847935..6b1e20c844 100644
--- a/src/gui/util/qvalidator.cpp
+++ b/src/gui/util/qvalidator.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -40,7 +40,7 @@
#include "private/qlocale_p.h"
#include <limits.h>
-#include <math.h>
+#include <cmath>
QT_BEGIN_NAMESPACE
@@ -384,7 +384,7 @@ static int numDigits(qlonglong n)
{
if (n == 0)
return 1;
- return (int)log10(double(n)) + 1;
+ return (int)std::log10(double(n)) + 1;
}
static qlonglong pow10(int exp)
diff --git a/src/gui/util/qvalidator.h b/src/gui/util/qvalidator.h
index f09c349ac8..0435e4e9ff 100644
--- a/src/gui/util/qvalidator.h
+++ b/src/gui/util/qvalidator.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -11,9 +11,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -24,8 +24,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -90,8 +90,8 @@ public:
QIntValidator(int bottom, int top, QObject *parent = 0);
~QIntValidator();
- QValidator::State validate(QString &, int &) const;
- void fixup(QString &input) const;
+ QValidator::State validate(QString &, int &) const Q_DECL_OVERRIDE;
+ void fixup(QString &input) const Q_DECL_OVERRIDE;
void setBottom(int);
void setTop(int);
@@ -120,7 +120,6 @@ class Q_GUI_EXPORT QDoubleValidator : public QValidator
Q_PROPERTY(double bottom READ bottom WRITE setBottom NOTIFY bottomChanged)
Q_PROPERTY(double top READ top WRITE setTop NOTIFY topChanged)
Q_PROPERTY(int decimals READ decimals WRITE setDecimals NOTIFY decimalsChanged)
- Q_ENUMS(Notation)
Q_PROPERTY(Notation notation READ notation WRITE setNotation NOTIFY notationChanged)
public:
@@ -132,7 +131,8 @@ public:
StandardNotation,
ScientificNotation
};
- QValidator::State validate(QString &, int &) const;
+ Q_ENUM(Notation)
+ QValidator::State validate(QString &, int &) const Q_DECL_OVERRIDE;
virtual void setRange(double bottom, double top, int decimals = 0);
void setBottom(double);
@@ -171,7 +171,7 @@ public:
explicit QRegExpValidator(const QRegExp& rx, QObject *parent = 0);
~QRegExpValidator();
- virtual QValidator::State validate(QString& input, int& pos) const;
+ virtual QValidator::State validate(QString& input, int& pos) const Q_DECL_OVERRIDE;
void setRegExp(const QRegExp& rx);
const QRegExp& regExp() const { return r; }