| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression from 4.5, where exporting a GL capable display
from an old X11 HP/Sun workstation to a modern Linux machine causes
crashes and lots of X11 error output. Just relying on the client
GL version number is not enough under X11, since the server might
only support GL 1.1 with non or very few extensions.
Also, the extension checks worked a bit randomly since it checked
for sub-strings which might or might not occur within one or more
full extension names.
Task-number: QTBUG-5853
Reviewed-by: Kim
|
|
|
|
|
|
|
|
|
|
| |
The documentation for QGLContext::isSharing() indicates that
the function returns true only when the context is sharing.
However, previously the sharing flag would stay on if the
context was created as sharing but is no longer sharing.
Task-number: QTBUG-5578
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
|
|
|
| |
QPaintDevice and QImage used the functions numColors(), setNumColors(),
and numBytes(). However, this is not consistent with the rest of the Qt
API which uses *Count() and set*Count().
Removed all usage of these functions inside Qt and test-cases.
Reviewed-by: Andreas Aardal Hanssen
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Gunnar Sletta
|
| | |
|
|/
|
|
| |
Reviewed-by: TrustMe
|
|
|
|
|
|
|
| |
Better than having to befriend QPixmapData and setting is_cached
manually.
Reviewed-by: Tom Cooksey
|
|
|
|
| |
Reviewed-by: Tom
|
|
|
|
|
|
|
| |
We can't create a QGLWidget in the QGLEngineSelector, since it may
be called before a QApplication object has been constructed.
Reviewed-by: Kim
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the QExplicitlySharedDataPointer change, the ref-count was 0 when
calling the cleanup hooks from ~QPixmap. That enabled the hook to figure
out if the pixmap is being modified or deleted. As the ref count is now
1 when calling the cleanup hooks in ~QPixmap, we need to seperate the
hooks.
This change should make using textre-from-pixmap faster as the EGL/glX
surface wont get re-created everytime the pixmap is modified.
Reviewed-By: Gunnar
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Tom
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The qt_qgl_paint_engine() function was being used by QWS, but there's
no reason why it can't be used by other platforms too. This should
also fix ES 2.0 paint engine support under QWS, which was stubbed out.
Reviewed-by: Sarah Smith
Reviewed-by: Gunnar
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The GLSL implementation messes up return values from functions so that
all our srcPixel()'s become black and several matrices are off. We
don't want to rewrite the shader code to fit an "ancient" graphics
card, so we simply fall back to the GL 1 engine.
Reviewed-by: Trond
(cherry picked from commit 33ed3d0bacddce214a43be60eb6481903e753a88)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When QGLPixmapData is bound after a fill(), without being painted on in
the mean-time, it's cheaper to directly generate a source image than to
go through convertToGLFormat(), since all the pixels in the image will
have the same value.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| | |
Don't use texture_from_pixmap extension for QBitmaps.
Reviewed-by: Tom
|
|/
|
|
|
|
|
|
|
| |
The GLSL implementation messes up return values from functions so that
all our srcPixel()'s become black and several matrices are off. We
don't want to rewrite the shader code to fit an "ancient" graphics
card, so we simply fall back to the GL 1 engine.
Reviewed-by: Trond
|
|
|
|
|
|
|
| |
The cleanup code for the QX11PixmapData was called incorrectly for
QGLPixmapData.
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
| |
After we started caching the current context internally, it revealed
an old bug: when a QGLWidget is reparented under X11, it will
get a new window id, but its context will still be bound to the
old window, so we need to rebind it.
Reviewed-by: Samuel
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
|
|
|
|
|
| |
Context resources are per-group, so they should be managed
by the group. This should also improve performance of context
shutdown slightly by removing QGLSignalProxy::aboutToDestroyContext()
signal dispatches to the resources.
Reviewed-by: trustme
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Move the list of shared contexts from QGLShareRegister into
QGLContextGroup. There is then no need for the QHash.
Reviewed-by: trustme
|
| | |
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QScopedPointer changes mean that the pixmap data's reference count
is now decremented after the cleanup hooks are called. The hooks should
also only be called when the pixmap data gets deleted, so we don't
actually have to check the reference count at all.
Reviewed-by: TrustMe
|
|/
|
|
| |
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several problems:
1. The demo leaked the scene contents, which caused cleanup problems.
2. The QGLContext::currentContext() could be changed behind Qt's back
under Windows (the temp contexts never reset the current context).
3. QGLFormat::openGLVersionFlags() function would return uninitialized
flags if the QGLWidget constructor happened to call
qt_gl_preferGL2Engine().
Reviewed-by: Kim
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
|
|
|
| |
Also, move the EGL makeCurrent(), doneCurrent(), swapBuffers(),
and reset() functions into the common qgl_egl.cpp.
Reviewed-by: Sarah Smith
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The handling for the current QGLContext was looking up the same
TLS data several times per call (hasLocalData() and localData()
calls particularly).
This change also refactors the code a little so that the
setting of the QGLContext within makeCurrent() and doneCurrent()
is in one location in the code instead of six (one per platform).
Reviewed-by: Michael Brasser
Reviewed-by: Sarah Smith
|
| |
|
|
|
|
| |
Reviewed-by: Sarah Smith
|
| |
|
| |
|
|
|
|
|
|
| |
Update documentation and #ifdef out the implementation.
Reviewed-by: trustme
|
| |
|
|
|
|
|
|
|
|
|
| |
The renderText() function is only for legacy desktop systems,
so revert the previous attempts to port it to OpenGL/ES.
Documentation note added to direct users to QPainter::drawText()
for the correct way to render text onto an OpenGL paint device.
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: Gunnar
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: trustme
|
|
|
|
| |
Reviewed-by: Tom
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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
|