summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* qt_paint_device_metric() for fetching metricsRhys Weatherley2009-10-152-9/+2
| | | | | | | | | | Custom window surfaces, graphics systems, and Qt/Embedded screen drivers often need to access QPaintDevice::metric(), but it is protected. Hence the growing number of friends in QWidget and QImage. The qt_paint_device_metric() function provides a more future-proof approach that doesn't require lots of friends. Reviewed-by: Gunnar
* Centralize all GL paint engine creations into qt_qgl_paint_engine()Rhys Weatherley2009-10-154-32/+10
| | | | | | | | | 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
* Work around broken ATI X1600 drivers on Mac OS XGunnar Sletta2009-10-131-1/+19
| | | | | | | | | | 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)
* Fix save() and restore() for the OpenGL2 paint engine.Rhys Weatherley2009-10-122-13/+15
| | | | | | Task-number: QTBUG-4822, QTBUG-4824 Reviewed-by: Sarah Smith Reviewed-by: Samuel
* Don't delete an fbo's texture if the fbo isn't using a textureRhys Weatherley2009-10-122-2/+4
| | | | | | Also, unbind the texture after it is initialized. Reviewed-by: Sarah Smith
* Check the framebuffer format against a format, not a texture targetRhys Weatherley2009-10-091-1/+1
| | | | | | | | The previous code was comparing QGLFramebufferObjectFormat::textureTarget() against GL_RGB to determine if alpha was present. This should be internalTextureFormat() instead. Reviewed-by: Sarah Smith
* Suppress unnecessary warning messages if pbuffers are not supportedRhys Weatherley2009-10-091-3/+10
| | | | Reviewed-by: trustme
* EGL_SAMPLES should be 1, not -1, to select number of samplesRhys Weatherley2009-10-091-1/+1
| | | | Reviewed-by: trustme
* Prevent double-destroy of a pbuffer's EGLSurfaceRhys Weatherley2009-10-081-1/+1
| | | | | | | Fixing the surface memory leak in b125af1b for widgets caused this knock-on effect in pbuffers. Reviewed-by: trustme
* Fix detection of pbuffers on OpenGL/ES systemsRhys Weatherley2009-10-081-1/+1
| | | | | | | | The previous code was searching for an exact pbuffer format of RGBA = 1, 1, 1, 0, which of course is never going to happen. Instead, search for the best format. Reviewed-by: trustme
* Optimized rasterizing of paths using stencil method in GL 2 engine.Samuel Rødal2009-10-073-5/+43
| | | | | | | | | | | | Making the triangle fan of each sub path start at the sub path's centroid will on average improve performance for complex paths, because less pixels that are outside the path need to be touched. The centroid is a more balanced choice than just picking the first element of the sub path as triangle fan origin. A performance improvement of 20 % was measured for star formed paths. Reviewed-by: Trond
* Optimized clipping in the GL 2 engine for winding fills.Samuel Rødal2009-10-072-29/+41
| | | | | | | | | | | | | When no stencil clip is set we reduce the number of compositing passes for rendering winding fill paths from four to two. When stencil clip is set, the number of compositing passes is reduced from five to four. For clipping with a winding fill path, the number of compositing passes are reduced from five to four when stencil clipping is already enabled. A performance improvement of up to 85 % was measured in certain cases. Reviewed-by: Trond
* Fixing some GCC warningsJoão Abecasis2009-10-071-1/+1
| | | | Reviewed-by: Markus Goetz
* Fix compilation with -pedanticDavid Faure2009-10-072-5/+5
| | | | | Merge-request: 1716 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Optimized restore() in GL 2 paint engine.Samuel Rødal2009-10-062-19/+46
| | | | | | | Keep track of what state actually changed so we don't have to set all the uniforms as dirty etc. Reviewed-by: Trond
* Changed GL 2 engine render text implementation to use glDepthRange().Samuel Rødal2009-10-062-16/+30
| | | | This frees all the current dependencies on the depth uniform.
* Made depth tested renderText() work after stencil clipping change.Samuel Rødal2009-10-061-7/+10
| | | | Also we should force Raster_A8 glyph format in renderText().
* Added convex polygon optimization to QGL2PaintEngineExPrivate::fill().Samuel Rødal2009-10-061-5/+4
|
* Switched to using stencil instead of depth buffer for clipping.Samuel Rødal2009-10-062-121/+173
| | | | | Based on Aaron Kennedy's patch. All tests are green, but when enabling scissoring UniteClip seems to be broken atm.
* Moved GL 2 clip clearing code into a common function.Samuel Rødal2009-10-062-14/+15
|
* Got rid of some redundant state changes regarding GL depth state.Samuel Rødal2009-10-061-14/+9
|
* Renamed GL 2 engine variables to be clip buffer agnostic.Samuel Rødal2009-10-062-52/+52
|
* Switched to using GL_LEQUAL instead of GL_LESS in GL 2 engine.Samuel Rødal2009-10-061-10/+11
|
* Made GL 2 paint engine waste less bits in clipping algorithm.Samuel Rødal2009-10-061-5/+4
|
* Refactored GL 2 engine UniteClip to always increase max depth.Samuel Rødal2009-10-061-3/+2
|
* Moved maxDepth out of state object and got rid of unused state members.Samuel Rødal2009-10-062-14/+9
|
* Fixed missing stencil buffer clear when scissor testing is disabled.Samuel Rødal2009-10-061-1/+3
|
* Fixed bug in GL 2 engine when using beginNativePainting.Samuel Rødal2009-10-061-0/+2
| | | | | | | Need to set shader manager to dirty in case we change the shader program using native calls. Reviewed-by: Trond
* Fixed an assert occuring on X11 when destroying QPixmaps under GL.Trond Kjernåsen2009-10-061-2/+4
| | | | | | | The cleanup code for the QX11PixmapData was called incorrectly for QGLPixmapData. Reviewed-by: Samuel
* Fixed the X11 error output from the demos/boxes demo.Trond Kjernåsen2009-10-061-0/+5
| | | | | | | | | 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
* Implement the drop shadow filter for OpenGLRhys Weatherley2009-10-052-3/+166
| | | | | Task-number: QTBUG-4583 Reviewed-by: trustme
* Update systemclip based on the correct parametersGunnar Sletta2009-10-051-1/+1
| | | | Reviewed-by: Samuel
* Consistently use QGLShareContextScope for context switchingRhys Weatherley2009-10-054-63/+45
| | | | | | | | 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
* Merge QGLContextReference into QGLContextGroupRhys Weatherley2009-10-042-73/+62
| | | | Reviewed-by: trustme
* Move QGLContextResource management into QGLContextGroupRhys Weatherley2009-10-042-94/+37
| | | | | | | | | 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
* Add unit tests for QGLContextResourceRhys Weatherley2009-10-041-1/+1
| | | | Reviewed-by: trustme
* Changed implementation of qDrawBorderPixmap() to use qDrawPixmaps().Kim Motoyoshi Kalland2009-10-022-8/+12
| | | | Reviewed-by: Trond
* Added support for drawing a pixmap multiple times in one call.Kim Motoyoshi Kalland2009-10-025-45/+197
| | | | | | | | | This is internal API. It's possible to specify a horizontal and vertical scale, rotation, opacity and source rectangle for each pixmap item. Useful for particle effects. Reviewed-by: Trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-0216-438/+440
|\
| * Remove QHash overhead from QGLShareRegisterRhys Weatherley2009-10-022-28/+20
| | | | | | | | | | | | | | Move the list of shared contexts from QGLShareRegister into QGLContextGroup. There is then no need for the QHash. Reviewed-by: trustme
| * Remove unnecessary reference to QGLContextGroup::extensionFuncs()Rhys Weatherley2009-10-021-2/+0
| | | | | | | | Reviewed-by: Andrew den Exter
| * Remove unnecessary function definition: qt_qgl_egl_display()Rhys Weatherley2009-10-011-2/+0
| | | | | | | | | | | | The qt_qgl_egl_display() function no longer exists. Reviewed-by: trustme
| * Fix BadDrawable errors when re-parenting a QGLWidget on X11/EGLTom Cooksey2009-10-011-2/+13
| | | | | | | | | | | | | | | | | | | | It's actually not really reparenting, but calling setWindowFlags which triggered the errors. But setWindowFlags causes a re-parent. The context isn't really the right please to free the surface, but fixing that is a much more intrusive change. Reviewed-By: TrustMe
| * Refactor retrieving the X11 visual for EGLEskil Abrahamsen Blomfeldt2009-10-011-74/+84
| | | | | | | | | | | | | | | | | | We need this in qwindowsurface_gl.cpp. This patch was modified slightly by Tom, who stole it from another branch. :-) Reviewed-by: Gunnar
| * Doc: Mark new overloads with \since 4.6.Volker Hilsheimer2009-10-011-1/+6
| |
| * Fix warnings on mingwThierry Bastian2009-10-011-0/+1
| | | | | | | | Reviewed-by: trust me
| * Split EGL config selection & surface creation into seperate functionsTom Cooksey2009-10-011-73/+102
| | | | | | | | | | This is needed to implement render-to-pixmap on x11/EGL, which will also need to create an EGL surface for pixmaps.
| * QGLContext::areSharing() to check for GL share relationshipsRhys Weatherley2009-10-016-19/+29
| | | | | | | | Reviewed-by: Samuel
| * Add unit tests for QGLShareRegisterRhys Weatherley2009-10-011-1/+1
| | | | | | | | Reviewed-by: Sarah Smith
| * Use QGLSharedResourceGuard to track contexts in the shader managerRhys Weatherley2009-10-012-5/+5
| | | | | | | | Reviewed-by: Sarah Smith