summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-platform-team into 4.6Bradley T. Hughes2009-10-301-1/+4
|\
| * Merge branch '4.6' into 4.6-platformDenis Dzyubenko2009-10-267-78/+376
| |\
| * | Remove internal widgets from QApplication::topLevelWidgets()Prasanth Ullattil2009-10-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some internal hidden widgets which should not come up in the QApplication::topLevelWidgets() list. So the known ones are being removed from the QWidgetPrivate::allWidgets set. Task-number: QTBUG-739 Reviewed-by: Denis Dzyubenko Reviewed-by: Bradley T. Hughes
* | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-304-222/+6
|\ \ \
| * | | 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
* | | Made internal FBOs snap to power-of-two when not wasting too much space.Samuel Rødal2009-10-291-2/+15
| | | | | | | | | | | | | | | | | | This improves performance on certain OpenGL ES 2.0 platforms. Reviewed-by: Gunnar Sletta
* | | Got rid of redundant texture parameter settings in GL pixmap filters.Samuel Rødal2009-10-291-16/+0
| | | | | | | | | | | | | | | | | | The texture parameters are set in drawTexture anyways. Reviewed-by: Gunnar Sletta
* | | Added some optimizations to the blur and drop shadow GL filters.Samuel Rødal2009-10-294-181/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use ExpandToTransparentBorderPadMode since we can use GL_CLAMP_TO_EDGE to clamp to the texture. * Shrink the bounding rects reported by the blur and drop shadow filters (expanding by 2 * radius isn't needed). * Use a single-pass blur for radii <= 3 to avoid the overhead of rendering to an FBO. * Made the fast blur setting generate filters for only a predefined set of radii, and then use the actual blur radius to spread the sample points outwards. * Optimized the generated program to rely less on temporary variables, as those seemed to not be handled very well by certain GLSL compilers. Reviewed-by: Gunnar Sletta
* | | Fix bug for message error "Texture updload failed, error code 0x500"Stefano Pironato2009-10-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message come from the QGLContextPrivate::bindTexture. But since OpenGl errors are retains until glGetError is called the actual error was happening somewhere else. After adding in all the gl* call a check for a gl error, I was able to get the place where opengl fail with a GL_INVALID_ENUM. This happen in the call of glEnable(GL_TEXTURE_2D) in the file qgl_x11egl.cpp. This glEnable call does not need: removed. Reviewed-by: Tom Cooksey
* | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-10-271-2/+2
|\ \ \
| * | | Made blur and drop shadow APIs use qreal instead of int for blur radius.Samuel Rødal2009-10-271-2/+2
| |/ / | | | | | | | | | | | | | | | | | | There's no reason to lock ourselves to int in the API when some of the backend could handle floating point blur radii. Reviewed-by: Bjørn Erik Nilsen
* | | Merge branch 'vectorpath' into 4.6Gunnar Sletta2009-10-271-3/+1
|\ \ \
| * | | Make use of QVectorPath::isConvex() to speed up rounded rect fillingGunnar Sletta2009-10-271-3/+1
| | | | | | | | | | | | | | | | Reviewed-by: Samuel
* | | | Reset the GL error stack prior to checking for errors in bindTexture()Gunnar Sletta2009-10-271-0/+5
|/ / / | | | | | | | | | Reviewed-by: Tom
* | | Kill a tiny few sin/cos/sqrt calls in the new strokerGunnar Sletta2009-10-262-3/+12
|/ / | | | | | | Reviewed-by: Eskil
* | 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