summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Remove shader/program binary support for nowRhys Weatherley2009-10-282-222/+0
| | | | | | | | | | After API review discussions, it was decided to remove shader binary support until we have a better handle on what we need. Applications can directly load shader binaries on the shaderId() using glShaderBinary() directly so they aren't prevented from using the feature. Reviewed-by: trustme
* Fix namespace buildRichard Moe Gustavsen2009-10-282-0/+6
| | | | | | Looks like a couple of files missed the namespace macro... Rev-By: gunnar
* Suppress warnings in QtOpenGL codeRhys Weatherley2009-10-263-1/+5
|
* Suppress warnings under OpenGL/ES 2.0 in QGLShaderProgramRhys Weatherley2009-10-261-0/+55
|
* Fix OpenGL/ES 2.0 bug in previous QGLShaderProgram check-inRhys Weatherley2009-10-261-1/+1
|
* Use QObjectPrivate within QGLShaderPrivate and QGLShaderProgramPrivateRhys Weatherley2009-10-262-47/+134
| | | | Reviewed-by: Sarah Smith
* Optimize concatenation of partial shadersRhys Weatherley2009-10-262-30/+95
| | | | Reviewed-by: Sarah Smith
* Issue a warning if bindAttributeLocation() is used after shaders linkedRhys Weatherley2009-10-251-3/+8
| | | | | | | | | Attribute locations must be bound before a shader program is linked according to the GLSL specification. Issue a warning to the user if they do it in the wrong order, which should help to isolate hard to find bugs much quicker. Reviewed-by: trustme
* Added license headers to new filesGunnar Sletta2009-10-222-0/+82
|
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-221-1/+1
|\ | | | | | | | | Conflicts: src/gui/painting/qtextureglyphcache.cpp
| * Fix dangling shader manager pointersJulian de Bhal2009-10-201-1/+1
| | | | | | | | | | | | | | | | | | The QGLEngineShaderManager pointers in QGLCustomShaderStagePrivate have been changed to QPointers to prevent the QGLPixmapFilters in QGL2PaintEngineEx from dereferencing the QGLEngineShaderManager after it is destroyed. Reviewed-by: Rhys Weatherley
* | Fixed an assert when running the composition demo on Mac.Trond Kjernåsen2009-10-201-16/+19
| | | | | | | | | | | | | | We can't create a QGLWidget in the QGLEngineSelector, since it may be called before a QApplication object has been constructed. Reviewed-by: Kim
* | Make sure QGLTextureCache exists when creating surfaces for pixmapsTom Cooksey2009-10-202-2/+8
| | | | | | | | | | | | | | QGLTextureCache installs pixmap cleanup hooks which are used to clean up the EGL surfaces. Reviewed-By: Trustme
* | Add a new window surface which utilises QX11GLPixmapDataTom Cooksey2009-10-205-4/+239
| | | | | | | | | | The new surface uses XCopyArea to post updates to the window and thus, supports partial updates.
* | Fixed a stencil clearing bug in the GL 1 engine.Trond Kjernaasen2009-10-201-19/+21
| | | | | | | | | | | | | | | | If the system clip changed the stencil buffer wasn't necessarily updated correctly. Use a region to keep track of the dirty areas in the stencil buffer, like we do in the GL 2 engine. Reviewed-by: Samuel
* | Fix build on desktop X11Tom Cooksey2009-10-202-3/+1
| | | | | | | | Hash-Define out X11GL pixmap data until the GLX implementation is ready.
* | Use different GL contexts for ARGB & RGB pixmapsTom Cooksey2009-10-191-31/+100
| | | | | | | | | | | | | | | | | | On 16 bpp systems, RGB pixmaps are 16-bit whereas ARGB pixmaps are 32-bit. This means two different EGL configs are used which are incompatable with each other. As a result, we have to use 2 different EGL contexts - one for each config. Reviewed-By: Trustme
* | Add a new QX11GLPixmapData which renders to X pixmaps using GLTom Cooksey2009-10-197-5/+302
| | | | | | | | | | Enable it by setting QT_USE_X11GL_PIXMAPS environment variable while using the -graphicssystem opengl
* | Separate modification & destruction pixmap cleanup hooksTom Cooksey2009-10-192-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Integrated new triangulating stroker into QtGunnar Sletta2009-10-195-54/+730
|/
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-1914-234/+34
|\
| * Recognize transformed screens when looking for a QGLScreenRhys Weatherley2009-10-161-1/+2
| | | | | | | | | | | | | | | | | | | | If the QWS_DISPLAY is specified as "Transformed:powervr:...", then we will encounter QScreen::TransformedClass rather than QScreen::ProxyClass when searching for the QGLScreen. This change makes the code search for both. Task-number: QT-2261 Reviewed-by: Sarah Smith
| * Remove unnecessary QWSGLPaintDevice now that we have QGLPaintDeviceRhys Weatherley2009-10-157-178/+2
| | | | | | | | Reviewed-by: Tom
| * 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
* | Fixed crash in the Boxes demo when using -graphicssystem opengl.Kim Motoyoshi Kalland2009-10-161-0/+6
| | | | | | | | | | | | | | | | | | | | QGLWindowSurface::flush() assumed that updateGeometry() had been called, but in some cases it hadn't. It would therefore dereference a null pointer and crash. This has been fixed by returning from flush() if updateGeometry() has not been called. This fixes the symptom rather than the bug, so we still need to find out why it hasn't been called. Reviewed-by: Trond
* | Fixed a crash in the tst_qgl test.Trond Kjernåsen2009-10-161-1/+2
| | | | | | | | | | | | | | QGLFramebuffer::isBound() would crash if it was called when there wasn't a current context bound. Reviewed-by: Kim
* | Optimized QPixmap::fill for GL backend when pixmap is used as is.Samuel Rødal2009-10-152-25/+43
| | | | | | | | | | | | | | | | | | 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
* | Fixed tst_QPixmap test failures with GL pixmap backend.Samuel Rødal2009-10-151-0/+4
| | | | | | | | | | | | Fixes test failures in fill() and setGetMask(). Reviewed-by: Trond
* | Fixed buggy bitmap drawing in GL 2 engine on X11.Samuel Rødal2009-10-151-1/+1
| | | | | | | | | | | | Don't use texture_from_pixmap extension for QBitmaps. Reviewed-by: Tom
* | Fixed bitmap brushes and tiled bitmaps in the OpenGL1 paint engine.Kim Motoyoshi Kalland2009-10-153-92/+132
| | | | | | | | | | | | | | Fixed drawing of bitmap brushes and tiled bitmaps so that they are painted with the brush colour or pen colour instead of black. Reviewed-by: Trond
* | Fixed the GLSL-to-assembly code generator to output enums correctly.Kim Motoyoshi Kalland2009-10-141-21/+32
| | | | | | | | | | | | | | | | Fixed the output of enums such that the last item in the enum is not followed by comma. Changed the output of the license to say that the file is part of the QtOpenGL module, not the test suite. Reviewed-by: Trond
* | Cleaned up OpenGL1 paint engine GLSL code.Kim Motoyoshi Kalland2009-10-1420-1063/+1009
| | | | | | | | | | | | | | Fixed warnings about int->float and float->vecN conversions. Removed unused shader files. Reviewed-by: Trond
* | Added QPixmapData::createCompatiblePixmapData() used by QPixmap::copy().Samuel Rødal2009-10-142-0/+7
| | | | | | | | | | | | QPixmap::copy() now returns a pixmap with the same pixmap backend. Reviewed-by: Gunnar Sletta
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-10-144-15/+13
|\ \
| * | Fixed upside down brush patterns in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-142-3/+0
| | | | | | | | | | | | | | | Task-number: QTBUG-2222 Reviewed-by: Gunnar
| * | Fixed handling of brush origin in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-132-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | Fixed the OpenGL paint engines so that the brush origin is applied correctly and for all brushes just like in the raster paint engine. Task-number: QTBUG-2676 Reviewed-by: Trond
* | | updated fragment programs after changes to .glsl filesGunnar Sletta2009-10-141-141/+105
|/ /
* | 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
* | Fixed bug when using QGLWidgets in -graphicssystem openglSamuel Rødal2009-10-122-1/+18
|/ | | | | | We need to make sure that the FBO is bound in a valid context. Reviewed-by: Tom
* 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