| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The problem was the QGLContextResource destructor which was called
when the QtOpenGL dll was unloaded. At this point in time, the gl
driver had already been unloaded so any gl calls at this point in time
would crash. It is simply wrong for the destructor to try to clean up,
so we instead output a warning if resources are leaked.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
QGLPaintDevice::format() was returning the context's format, not
the format of the window surface's FBO. This caused the OpenGL1
paint engine to think that the window didn't have depth and
stencil buffers, even though the FBO most certainly did.
This change makes QGLPaintDevice::format() virtual and overrides it
in QGLFBOGLPaintDevice to return an updated format that includes
the context parameters plus the extra features that the FBO supports.
Reviewed-by: Tom Cooksey
|
|
|
|
|
|
|
|
|
| |
Text drawing on OpenGL/ES 1.1 systems using QPF was displaying filled
boxes in place of the character glyphs. This is due to the QPF
implementation of alphaMapForGlyph() returning a different
color table than that expected by QGLGlyphCache::cacheGlyphs().
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
|
|
|
|
|
|
| |
Previously, QtOpenGL assumed that by linking against QtGui, it would
automatically also be linked against EGL. However, this is no longer the
case after 83940f25dba51a9942ab55ed8475fc7fc8a8da84 which makes sure
only QtGui links against EGL and not other libs/apps linking against
QtGui.
Reviewed-by: Rhys Weatherley
|
|
|
|
|
|
|
| |
This bug was exposed by a change in the QSvg module, and it
fixes the framebufferobject and pbuffers2 GL examples.
Reviewed-by: Kim
|
|
|
|
|
|
| |
QGLPixmapData needs to be #define'd out for OpenGL ES 1.x
Reviewed-by: Trustme
|
|
|
|
| |
Reviewed-by: Tom
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/opengl/qgl.cpp
src/opengl/qgl_p.h
src/opengl/qpaintengine_opengl.cpp
|
| |
| |
| |
| |
| |
| |
| | |
A new QGLFramebufferObject constructor was added after the
QGLPaintDevice was branched which therefore didn't get patched.
Reviewed-by: Trustme
|
| |
| |
| |
| | |
Reviewed-by: Trustme
|
| |\ |
|
| | |
| | |
| | |
| | | |
Reviewed-by: Trust Me
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QGLShader and QGLShaderProgram used to delete the GL object id
in the wrong context. But fixing this means we must keep track of
when contexts are destroyed so that we don't try to access a
context from a shader if it goes away. We also need to transfer
ownership from one context to another when they are shared.
This change introduces QGLSharedResourceGuard, which keeps track
of a context and a GL object identifier. When the context goes
away, ownership is passed to a shared context. When there are
no more shared contexts, the identifier automatically zeroes.
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QGLGradientCache for the OpenGL1 paint engine has to destroy
the cached gradient textures if the QGLContext changes.
Problem is, it wasn't changing back to the previous context
to destroy those textures.
Task-number: 249919
Reviewed-by: Sarah Smith
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the last patch in the QGLPaintDevice series. Although previous
patches have not been reviewed individually, Samuel's reviewed
QGLPaintDevice API and all the changes as the code stands with this
patch.
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch changes the ordering of QGL2PaintEngine::begin a bit because
QGLPixmapData needs to use the paint engine's drawTexture method within
beginPaint().
Also, this initialises needsSync to true and removes the setState call.
So now all the state initialisation is done in ensureActive rather than
begin.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the paint engine cleared the surface's buffers in begin.
This logic really belongs in QGLPaintDevice::beginPaint as not all paint
devices will want this behaviour (in fact most don't). This also makes
QGLPaintDevice API much simpler as the virtual getters for the clear
color, etc. can be removed. It's much cleaner this way. The only
possible problem is with the GL1 engine, which also cleared the
accumulation & depth buffers in begin. However, the engine will also
clear the depth buffer later as part of it's clipping logic. It also
doesn't use the accumulation buffer, so clearing it seems unnessisary.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch also refactors QGL2PaintEngineEx::ensureActive() and the
logic which handles multiple paint engines rendering to the same
QGLContext. In a nut-shell:
* QGLPaintDevice::beginPaint() stores the currently bound FBO
* QGLPaintDevice::ensureActiveTarget() makes sure that GL rendering will
end up in the paint device (I.e. the right context is current and the
right FBO is bound). If a different context or FBO was bound, it is
_not_ remembered.
* QGLPaintDevice::endPaint() restores whatever FBO was bound when
beginPaint() was called.
This logic allows interleaved painter rendering to multiple FBOs and
contexts to work as expected. It also allows a stacked begin/end to work
properly when it's mixed with native GL rendering (as far as current
render target is concerened. GL state clobbering is obviously a
different topic).
QGLPaintDevice::context() also had to be made virtual as there's no good
place to call setContext. This might be possible to change in the future
though.
Finally, to make this work, QGLFramebufferObjectPrivate had to be moved
into it's own private header.
|
| |
| |
| |
| |
| | |
Add a new QGLPBufferGLPaintDevice implementation which allows the GL
engines to target QGLPixelBuffers again.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a new abstract base class which inherits from
QPaintDevice called QGLPaintDevice. This base class will contain
everything the GL paint engines need to know about the surface they are
drawing onto. As such, new surfaces can be targeted by the GL paint
engines without having to modify QtOpenGL. This is very useful for
plugins, specifically QGraphicsSystem plugins.
To unify things a little, the GL paint engines will use the same
QGLPaintDevice API to render into existing target surfaces (QGLWidget,
QGLPixelBuffer & QGLFrameBufferObject). Ideally we'd make QGLPaintDevice
a common ancestor for these surfaces, but obviously that wil break B/C.
This patch only implements QGLWidget using the new interface. Rendering
to other surfaces will be fixed in following patches.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some applications that uses a mix of OpenGL and QPainter code may
not work correctly with the new GL 2 engine (e.g. the composition demo).
The same is most likely also true for user apps, therefore we need
a way to enforce the usage of the old GL 1 engine for the sake of
compatibility.
Task-number: 260872
Reviewed-by: Samuel
|
| |
| |
| |
| | |
Reviewed-by: Sarah Smith
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QImage::Format_RGB16 textures were broken on some OpenGL/ES 1.1
systems because the "format" was set to GL_RGBA and the "texture_format"
was set to GL_RGB, with a pixel type of GL_UNSIGNED_SHORT_5_6_5.
OpenGL/ES 1.1, ES 2.0, and desktop GL all require the two format
parameters to glTexImage2D() to be GL_RGB if the pixel type is
GL_UNSIGNED_SHORT_5_6_5.
Reviewed-by: Sarah Smith
|
| |
| |
| |
| |
| |
| |
| | |
The original renderText() was using the highly unportable (to OpenGL/ES)
glGetDoublev() and glGetIntegerv() functions.
Reviewed-by: Sarah Smith
|
| |
| |
| |
| | |
Reviewed-by: Sarah Smith
|
| |
| |
| |
| | |
Reviewed-By: Trust Me
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid crashing when framebuffer object created in one context is used
in a shared context after the original context is destroyed.
Task-number: 260874
Reviewed-by: Samuel
|
|/
|
|
| |
Reviewed-by: Trond
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
|
|
|
|
|
|
|
|
| |
QGLFormat was being deep-copied many times per frame because of
code like this:
if (context()->format().doubleBuffer()) { ...
This change modifies QGLFormat to use implicit sharing to reduce
the overhead of the above type of checks.
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
| |
The documentation says "Returns true if all the options of the
two QGLFormats are equal", but that's not what it was doing.
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-by: Alex
|
|
|
|
|
|
|
| |
The custom shader code in the OpenGL2 paint engine needs time to
mature before we make this official public API.
Reviewed-by: trustme
|
|
|
|
|
|
|
|
| |
Previously, it was possible that painting using QPainter to a different
GL target (E.g. QGLWidget) would unbind the FBO. In such cases, isBound
returned true, even though the FBO wasn't bound to any context.
Reviewed-by: Samuel
|
|
|
|
|
|
|
| |
Renaming setInternalFormat() to setInternalTextureFormat() (and
similarly for the accessor) makes the API a bit more explicit.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some concerns were expressed about the float precision of QMatrix4x4,
which this change addresses by using qreal instead.
The QVector2D/3D/4D classes still use float internally, so that they
can be used directly in large arrays of vertex values to be uploaded
to an OpenGL server.
QQuaternion is a client-side class, and it should produce rotations
that are consistent with QMatrix4x4. So its precision was changed too.
A consequence of this change is that the following no longer works
in a portable fashion:
QMatrix4x4 mat;
...
glLoadMatrixf(mat.constData());
The caller must now repack the argument to convert from qreal to GLfloat.
Reviewed-by: Michael Goddard
Reviewed-by: Andreas
|
|
|
|
|
|
|
|
|
|
| |
The type of GLenum was changed between 10.4 and 10.5, so to support
compiling on one and deploying on the other we need this hack. Also
get rid of the complex QGLFramebufferObjectFormat constructor in
favor of a simple default constructor and setters, which is more
Qt-ish anyway, and avoids ambiguities on mac.
Reviewed-by: Trond
|
|
|
|
| |
Reviewed-by: Trond
|
|
|
|
|
|
|
| |
The shader manager needs to be recreated since the context it was
created with might not be valid any more.
Reviewed-by: Kim
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
doc/src/frameworks-technologies/dbus-adaptors.qdoc
doc/src/qtdbus.qdoc
src/gui/accessible/qaccessible_mac_cocoa.mm
src/gui/kernel/qapplication_win.cpp
src/xmlpatterns/parser/createTokenLookup.sh
tests/auto/linguist/lupdate/testdata/good/merge_versions/project.ui
tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui
tests/auto/linguist/lupdate/testdata/good/parseui/project.ui
tests/auto/runQtXmlPatternsTests.sh
tests/auto/test.pl
tests/auto/uic/baseline/batchtranslation.ui
tests/auto/uic/baseline/batchtranslation.ui.h
tests/auto/uic/baseline/config.ui
tests/auto/uic/baseline/config.ui.h
tests/auto/uic/baseline/finddialog.ui
tests/auto/uic/baseline/finddialog.ui.h
tests/auto/uic/baseline/formwindowsettings.ui
tests/auto/uic/baseline/formwindowsettings.ui.h
tests/auto/uic/baseline/helpdialog.ui
tests/auto/uic/baseline/helpdialog.ui.h
tests/auto/uic/baseline/listwidgeteditor.ui
tests/auto/uic/baseline/listwidgeteditor.ui.h
tests/auto/uic/baseline/mainwindowbase.ui
tests/auto/uic/baseline/mainwindowbase.ui.h
tests/auto/uic/baseline/newactiondialog.ui
tests/auto/uic/baseline/newactiondialog.ui.h
tests/auto/uic/baseline/newform.ui
tests/auto/uic/baseline/newform.ui.h
tests/auto/uic/baseline/orderdialog.ui
tests/auto/uic/baseline/orderdialog.ui.h
tests/auto/uic/baseline/paletteeditor.ui
tests/auto/uic/baseline/paletteeditor.ui.h
tests/auto/uic/baseline/paletteeditoradvancedbase.ui
tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h
tests/auto/uic/baseline/phrasebookbox.ui
tests/auto/uic/baseline/phrasebookbox.ui.h
tests/auto/uic/baseline/plugindialog.ui
tests/auto/uic/baseline/plugindialog.ui.h
tests/auto/uic/baseline/previewwidget.ui
tests/auto/uic/baseline/previewwidget.ui.h
tests/auto/uic/baseline/previewwidgetbase.ui
tests/auto/uic/baseline/previewwidgetbase.ui.h
tests/auto/uic/baseline/qfiledialog.ui
tests/auto/uic/baseline/qfiledialog.ui.h
tests/auto/uic/baseline/qtgradientdialog.ui
tests/auto/uic/baseline/qtgradientdialog.ui.h
tests/auto/uic/baseline/qtgradientviewdialog.ui
tests/auto/uic/baseline/qtgradientviewdialog.ui.h
tests/auto/uic/baseline/saveformastemplate.ui
tests/auto/uic/baseline/saveformastemplate.ui.h
tests/auto/uic/baseline/statistics.ui
tests/auto/uic/baseline/statistics.ui.h
tests/auto/uic/baseline/stringlisteditor.ui
tests/auto/uic/baseline/stringlisteditor.ui.h
tests/auto/uic/baseline/tabbedbrowser.ui
tests/auto/uic/baseline/tabbedbrowser.ui.h
tests/auto/uic/baseline/tablewidgeteditor.ui
tests/auto/uic/baseline/tablewidgeteditor.ui.h
tests/auto/uic/baseline/translatedialog.ui
tests/auto/uic/baseline/translatedialog.ui.h
tests/auto/uic/baseline/treewidgeteditor.ui
tests/auto/uic/baseline/treewidgeteditor.ui.h
tests/auto/uic/baseline/trpreviewtool.ui
tests/auto/uic/baseline/trpreviewtool.ui.h
tests/auto/uic3/baseline/about.ui
tests/auto/uic3/baseline/about.ui.4
tests/auto/uic3/baseline/actioneditor.ui
tests/auto/uic3/baseline/actioneditor.ui.4
tests/auto/uic3/baseline/config.ui
tests/auto/uic3/baseline/config.ui.4
tests/auto/uic3/baseline/configtoolboxdialog.ui
tests/auto/uic3/baseline/configtoolboxdialog.ui.4
tests/auto/uic3/baseline/connectiondialog.ui
tests/auto/uic3/baseline/connectiondialog.ui.4
tests/auto/uic3/baseline/createtemplate.ui
tests/auto/uic3/baseline/createtemplate.ui.4
tests/auto/uic3/baseline/customwidgeteditor.ui
tests/auto/uic3/baseline/customwidgeteditor.ui.4
tests/auto/uic3/baseline/dbconnection.ui
tests/auto/uic3/baseline/dbconnection.ui.4
tests/auto/uic3/baseline/dbconnectioneditor.ui
tests/auto/uic3/baseline/dbconnectioneditor.ui.4
tests/auto/uic3/baseline/dbconnections.ui
tests/auto/uic3/baseline/dbconnections.ui.4
tests/auto/uic3/baseline/editfunctions.ui
tests/auto/uic3/baseline/editfunctions.ui.4
tests/auto/uic3/baseline/finddialog.ui
tests/auto/uic3/baseline/finddialog.ui.4
tests/auto/uic3/baseline/formsettings.ui
tests/auto/uic3/baseline/formsettings.ui.4
tests/auto/uic3/baseline/gotolinedialog.ui
tests/auto/uic3/baseline/gotolinedialog.ui.4
tests/auto/uic3/baseline/helpdialog.ui
tests/auto/uic3/baseline/helpdialog.ui.4
tests/auto/uic3/baseline/iconvieweditor.ui
tests/auto/uic3/baseline/iconvieweditor.ui.4
tests/auto/uic3/baseline/listboxeditor.ui
tests/auto/uic3/baseline/listboxeditor.ui.4
tests/auto/uic3/baseline/listeditor.ui
tests/auto/uic3/baseline/listeditor.ui.4
tests/auto/uic3/baseline/listvieweditor.ui
tests/auto/uic3/baseline/listvieweditor.ui.4
tests/auto/uic3/baseline/mainfilesettings.ui
tests/auto/uic3/baseline/mainfilesettings.ui.4
tests/auto/uic3/baseline/mainwindowbase.ui
tests/auto/uic3/baseline/mainwindowbase.ui.4
tests/auto/uic3/baseline/mainwindowwizard.ui
tests/auto/uic3/baseline/mainwindowwizard.ui.4
tests/auto/uic3/baseline/multilineeditor.ui
tests/auto/uic3/baseline/multilineeditor.ui.4
tests/auto/uic3/baseline/newform.ui
tests/auto/uic3/baseline/newform.ui.4
tests/auto/uic3/baseline/paletteeditor.ui
tests/auto/uic3/baseline/paletteeditor.ui.4
tests/auto/uic3/baseline/paletteeditoradvanced.ui
tests/auto/uic3/baseline/paletteeditoradvanced.ui.4
tests/auto/uic3/baseline/paletteeditoradvancedbase.ui
tests/auto/uic3/baseline/paletteeditoradvancedbase.ui.4
tests/auto/uic3/baseline/pixmapcollectioneditor.ui
tests/auto/uic3/baseline/pixmapcollectioneditor.ui.4
tests/auto/uic3/baseline/pixmapfunction.ui
tests/auto/uic3/baseline/pixmapfunction.ui.4
tests/auto/uic3/baseline/preferences.ui
tests/auto/uic3/baseline/preferences.ui.4
tests/auto/uic3/baseline/previewwidget.ui
tests/auto/uic3/baseline/previewwidget.ui.4
tests/auto/uic3/baseline/previewwidgetbase.ui
tests/auto/uic3/baseline/previewwidgetbase.ui.4
tests/auto/uic3/baseline/projectsettings.ui
tests/auto/uic3/baseline/projectsettings.ui.4
tests/auto/uic3/baseline/replacedialog.ui
tests/auto/uic3/baseline/replacedialog.ui.4
tests/auto/uic3/baseline/richtextfontdialog.ui
tests/auto/uic3/baseline/richtextfontdialog.ui.4
tests/auto/uic3/baseline/settingsdialog.ui
tests/auto/uic3/baseline/settingsdialog.ui.4
tests/auto/uic3/baseline/sqlformwizard.ui
tests/auto/uic3/baseline/sqlformwizard.ui.4
tests/auto/uic3/baseline/startdialog.ui
tests/auto/uic3/baseline/startdialog.ui.4
tests/auto/uic3/baseline/statistics.ui
tests/auto/uic3/baseline/statistics.ui.4
tests/auto/uic3/baseline/tabbedbrowser.ui
tests/auto/uic3/baseline/tabbedbrowser.ui.4
tests/auto/uic3/baseline/tableeditor.ui
tests/auto/uic3/baseline/tableeditor.ui.4
tests/auto/uic3/baseline/topicchooser.ui
tests/auto/uic3/baseline/topicchooser.ui.4
tests/auto/uic3/baseline/variabledialog.ui
tests/auto/uic3/baseline/variabledialog.ui.4
tests/auto/uic3/baseline/wizardeditor.ui.4
tests/auto/uiloader/baseline/batchtranslation.ui
tests/auto/uiloader/baseline/config.ui
tests/auto/uiloader/baseline/finddialog.ui
tests/auto/uiloader/baseline/formwindowsettings.ui
tests/auto/uiloader/baseline/helpdialog.ui
tests/auto/uiloader/baseline/listwidgeteditor.ui
tests/auto/uiloader/baseline/mainwindowbase.ui
tests/auto/uiloader/baseline/newactiondialog.ui
tests/auto/uiloader/baseline/newform.ui
tests/auto/uiloader/baseline/orderdialog.ui
tests/auto/uiloader/baseline/paletteeditor.ui
tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui
tests/auto/uiloader/baseline/phrasebookbox.ui
tests/auto/uiloader/baseline/plugindialog.ui
tests/auto/uiloader/baseline/previewwidget.ui
tests/auto/uiloader/baseline/previewwidgetbase.ui
tests/auto/uiloader/baseline/qfiledialog.ui
tests/auto/uiloader/baseline/qtgradientdialog.ui
tests/auto/uiloader/baseline/qtgradienteditor.ui
tests/auto/uiloader/baseline/qtgradientviewdialog.ui
tests/auto/uiloader/baseline/saveformastemplate.ui
tests/auto/uiloader/baseline/statistics.ui
tests/auto/uiloader/baseline/stringlisteditor.ui
tests/auto/uiloader/baseline/tabbedbrowser.ui
tests/auto/uiloader/baseline/tablewidgeteditor.ui
tests/auto/uiloader/baseline/translatedialog.ui
tests/auto/uiloader/baseline/treewidgeteditor.ui
tests/auto/uiloader/baseline/trpreviewtool.ui
tools/assistant/compat/mainwindow.cpp
tools/assistant/tools/assistant/mainwindow.cpp
tools/designer/src/designer/versiondialog.cpp
tools/linguist/linguist/mainwindow.cpp
tools/linguist/shared/make-qscript.sh
tools/qdbus/qdbusviewer/qdbusviewer.cpp
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| | |
Task-number: 260697
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| | |
When creating a QGLPixelBuffer with context sharing, the sharing flag
was only set on the pixel buffer, not the other context.
Reviewed-by: Trond
|