| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Trust Me
|
| |
|
|
|
|
|
|
| |
As there are no SDKs available for our test device (HTC HD2) that support
OpenGL, we had to construct the libraries by extracting them from the ROM image.
This is still work in progress at this time.
|
|
|
|
|
| |
Reviewed-By: Trond
Autotest: tst_QGL::qglContextDefaultBindTexture
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/gui/kernel/qapplication_win.cpp
src/gui/kernel/qwidget.cpp
src/gui/kernel/qwidget_p.h
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were cases where the QGLWidget would not be fully
updated on screen on Windows Vista and Windows 7 with Aero
disabled.
Task-number: QTBUG-7865
Reviewed-by: Prasanth
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes quite a lot of issues:
* QtOpenGL only registered qpixmap destruction hooks on X11 and
those only cleanup the EGL/GLX surface, not the texture object.
* The QPixmap destruction hooks were only being called from the
QPixmap destructor. However, this means when a QPixmap is assigned
to another QPixmap, the hooks don't get called.
Task-number: QTBUG-7647
Reviewed-By: Samuel
Reviewed-By: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt used to store the GL extensions a particular implementation supported
in a global cache, which was initialized once and never updated.
This could cause problems because different types of context might
support different kinds of extensions (e.g. the difference between
sw and hw contexts). With this patch, the GL extensions are cached
and updated within each QGLContext. It also makes the extension
initialization lazy, which saves application initialization costs for
embedded platforms.
The patch introduces a internal cross platform QGLTemporaryContext
class that is used to create a light-weight GL context without going
via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks
for now).
Reviewed-by: Kim
Reviewed-by: Samuel
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
QIODevice: Fix readAll()
Temporary hackiesh solution to prevent BOM in the xml data.
Fixed qxmlstream autotest when using shadow builds.
Attempt at readding the capital P headers for Phonon
Remove special Phonon processing from syncqt.
Use the lowercase/shortname.h headers for Phonon includes
Fixes a crash when setting focus on a widget with a focus proxy.
Update copyright year to 2010
doc: Clarified activeSubControls and subControls.
Remove warning "statement with no effect"
doc: Clarified that .lnk files are System files on Windows.
|
| | |
| | |
| | |
| | | |
Reviewed-by: Trust Me
|
| | |
| | |
| | |
| | |
| | | |
Task-number: QT-2600
Reviewed-by: Samuel
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The GL2 engine (and probably Qt/3D) needs to track which vertex
attribute arrays are currently enabled and which are disabled. As
this is per-context state, the logical place to track this is in the
context and not in the paint engine.
This patch also makes the GL2 engine's shader manager enable/disable
the appropriate attribute arrays for a given shader program when it
is used.
Reviewed-By: Kim
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a QGLWidget is re-parented, it's native X11 window usually
gets destroyed and re-created. This also happens when you set a
window attribute or flag. On EGL, we must destroy the surface
for the window before destroying the window itself, otherwise
we can leak the surface. This also fixes lots of BadDrawable
errors when running the autotests (which were due to surface
leaks!).
Reviewed-By: TrustMe
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want to avoid any unnecessary mallocs when checking GL/GLX
extensions. The GL extension string can be quite long and contain
several hundred extensions. The old code forced one malloc for each
extension + 1 extra malloc for the extension string itself when
it was copied into the QByteArray.
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is a platform regression and should never have been there in the
first place. Having this as the default format on embedded devices
may drop the framerates with as much as 30% on selected HW.
Reviewed-by: Tom Cooksey
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| |
| | |
The auto-detect logic was looking for fragment programs to check
for OpenGL2 support. It should have been looking for fragment shaders.
Task-number: QTBUG-5638
Reviewed-by: Sarah Smith
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QGLContext::bindTexture(QString) function has been augmented
with support for ETC1, PVRTC2, and PVRTC4 compressed textures,
in addition to the existing DDS support.
The QGLPixmapData class has also been modified to recognize
compressed texture formats in fromFile() and fromData().
This change also fixes a bug in bindTexture() that prevented
the same compressed texture file from being bound in multiple
contexts. There is now a separate file cache for each context group.
Task-number: QT-2547
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| | |
The format and internal_format parameters to glTexImage2D need to always
match on OpenGL ES 2.0.
Reviewed-by: Tom Cooksey
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the user called QGLFramebufferObject::bind()/release() during a
beginNativePainting() callout, the release() would reset the context's
fbo to zero, not the actual window surface fbo.
Task-number: QTBUG-6204
Reviewed-by: Tom
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
QGLShareContextScope is safer and more reliable than trying to manually
detect how and when to temporarily switch contexts. Replace the few
remaining instances of context-switching with it.
Reviewed-by: trustme
|
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
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: Andrew den Exter
|
| |
| |
| |
| |
| |
| | |
The qt_qgl_egl_display() function no longer exists.
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: Samuel
|
| |
| |
| |
| | |
Reviewed-by: Sarah Smith
|
| |
| |
| |
| |
| |
| |
| | |
Also, move the EGL makeCurrent(), doneCurrent(), swapBuffers(),
and reset() functions into the common qgl_egl.cpp.
Reviewed-by: Sarah Smith
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Engine-specific pixmap filters were being created, used, and destroyed
every time draw() was called on QPixmapColorizeFilter, QPixmapBlurFilter,
and so on. This had a heavy performance penalty and made it difficult
for the GL paint engine to cache shaders from one request to the next.
A generic filter can request an engine-specific filter that matches its
parameters. The engine can either create a new one or return a previously
allocated filter object.
Ownership of engine-specific pixmap filter objects is moved to the
paint engine itself.
Reviewed-by: Andrew den Exter
Reviewed-by: Michael Brasser
Reviewed-by: Michael Goddard
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
|
| |
| |
| |
| |
| |
| | |
Update documentation and #ifdef out the implementation.
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Both the shaders and the engine states were shared between OpenGL
contexts, but the states should be only apply to one context, not a
group of contexts. This commit separates the shaders and the states.
Task-number: 257254
Reviewed-by: Samuel
|
| |
| |
| |
| | |
Reviewed-by: Trond
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I renamed QGLContextGroupResources to QGLContextGroup because we are
using it to identify context groups. I also added a pointer to one of
the contexts in the group. Together with qgl_share_reg(), the pointer
can be used to find all contexts in a group.
I renamed QGLContextPrivate::qt_get_extension_funcs() to
QGLContextPrivate::extensionFuncs() to follow Qt's naming convention.
Reviewed-by: Trond
|