summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Improvements to graphics effects API after review round.Samuel Rødal2009-11-103-29/+29
| | | | | | | | | | | | * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
* API review: Rename numRects() -> rectCount()Marius Storm-Olsen2009-11-091-1/+1
| | | | | | | QRegion::numRects() is marked obsolete. Removed all usage of the old function inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-062-2/+2
| | | | | | | | | | 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
* Fix fuzzy aliased rendering on GLES2Tom Cooksey2009-11-062-2/+13
| | | | | | | | | | The GL2 paint engine adds a (0.49,0.49) pixel offset when doing aliased rendering. But this assumed if it was doing aliased rendering then multisampling was disabled. On GLES, multisampling is always enabled if the surface has it enabled. So on GLES, we never add the offset if the surface is multisampled. Reviewed-By: Gunnar
* Fixed bad joins in the new stroker... Normal generation was broken.gunnar2009-11-051-4/+2
| | | | Reviewed-by: Trustme
* Use fallback stroker for cosmetic strokes with asymetric transformsGunnar Sletta2009-11-051-0/+8
| | | | Reviewed-by: Samuel
* Fix docs for QGLFramebufferObject & add warnings in bind/releaseTom Cooksey2009-11-051-7/+16
| | | | | | | Warnings are for binding/releasing when the current context isn't in the same context group as the FBO was created in. Reviewed-By: Trond
* Remove unnessisary QGLFBOGLPaintDevice re-implementationsTom Cooksey2009-11-052-33/+0
| | | | | | | Now QGLFBO doesn't do stacking, QGLPaintDevice's base implementation is ok to use. Reviewed-By: Trond
* Removed the FBO stacking behaviour and the test attached to it.Trond Kjernåsen2009-11-052-28/+9
| | | | | | | Having this behaviour in QGLFrameBufferObject complicates alot of things and isn't really necessary. Reviewed-by: Tom Cooksey
* Fixed soft-light composition mode in raster and OpenGL1.Kim Motoyoshi Kalland2009-11-052-339/+361
| | | | | | | | | Updated the soft-light composition mode implementation in the raster and OpenGL1 engines to use the equations in the SVG specification as of April 2009. Task-number: QTBUG-3193 Reviewed-by: Trond
* Modify QGLShader and QGLShaderProgram in response to API reviewRhys Weatherley2009-11-055-168/+205
| | | | Reviewed-by: Sarah Smith
* Add QMacGLCompatTypes to QGLShaderProgram APITom Cooksey2009-11-042-0/+61
|
* Fixed hardcoded GL library names on WinCE.Trond Kjernåsen2009-11-041-16/+1
| | | | | Task-number: QTBUG-5148 Reviewed-by: Tom Cooksey
* Fixed compilation and linking of EGL on Windows CE.Trond Kjernåsen2009-11-041-8/+2
| | | | | | | | | Moved duplicated and broken code for setting up the include and library paths into the egl.prf feature file, which egl.pri and opengl.pro now includes using the qmake feature system. Task-number: QTBUG-5148 Reviewed-by: Tom Cooksey
* Compile on Mac OS XEskil Abrahamsen Blomfeldt2009-11-041-1/+1
| | | | | | | On Mac, there are compat overloads to e.g. setInternalTextureFormat() so we need to specify which function to call to avoid ambiguity. Reviewed-by: Samuel
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-032-30/+3
|\
| * Fixed some compiler warnings.Samuel Rødal2009-11-032-30/+3
| | | | | | | | Reviewed-by: Trond
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-033-16/+17
|\ \ | |/ |/|
| * Sanitize building Qt with OpenGL ES supportHarald Fernengel2009-11-021-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL and QMAKE_LIBS_OPENGL_ES2 so we do not have to force users to copy/paste around entire mkspecs just to change the OpenGL backend. This should make the "-opengl es2" (and friends) configure option work out of the box with any mkspec on Linux+WinCE. Also removes a WinCE specific hack that is not required anymore. Reviewed-by: Tom Cooksey Reviewed-by: Trond Kjernåsen Approved-by: Lars Knoll
| * Compilation error qegl_p.h not found for OpenGL ES enabled build of QtKeith Isdale2009-11-021-3/+3
| | | | | | | | | | | | | | | | | | for WindowsCE Be more consistant in the usage of <private/foo_p.h> vs "foo_p.h" Task-number: QTBUG-5149 Reviewed-by: Trond Kjernåsen
| * Merge commit '8c4edbd04f350294462fd689748de2dd7cc84d47' into 4.6-upstreamBradley 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-graphics-team into 4.6Gunnar Sletta2009-11-026-31/+403
|\ \ \ \
| * | | | Minor doc fixes for QGLContext::BindOption.Samuel Rødal2009-11-021-1/+3
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Gunnar Sletta
| * | | | Fixed compiler warning on GCC about empty while statement.Samuel Rødal2009-11-021-1/+1
| | | | |
| * | | | Optimized animated blur radii in the GL 2 paint engine.Samuel Rødal2009-11-023-12/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We add an internal cache which keeps four half-scaled versions of the source pixmap at different blur radii, then we simply interpolate between the two pixmaps around the desired blur radius, or between the base source pixmap and the first blurred version. Reviewed-by: Gunnar Sletta
| * | | | Moved Qt::RenderHint back into QGraphicsBlurEffect and added a hint.Samuel Rødal2009-11-021-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added AnimationHint, which didn't make too much sense in a generic enum, so Qt::RenderHint was moved back into QGraphicsBlurEffect as QGraphicsBlurEffect::BlurHint. Reviewed-by: Gunnar Sletta
| * | | | Added strict size parameter to QGLFramebufferObject pool.Samuel Rødal2009-11-022-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strict size parameter can be used when it's critical that we get the exact size we ask for. Reviewed-by: Gunnar Sletta
* | | | | Better cosmetic pen scaling for beziers in tristroker.Gunnar Sletta2009-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-By: Samuel
* | | | | Safeguard isNull() pixmaps in bindTexture and remove a compile warningGunnar Sletta2009-11-022-1/+40
|/ / / / | | | | | | | | | | | | Reviewed-by: TrustMe
* | | | Remove partial shader support from QGLShader/QGLShaderProgramRhys Weatherley2009-11-012-185/+6
| | | | | | | | | | | | | | | | Reviewed-by: trustme
* | | | Implement a simple caching algorithm for shader programs.Tom Cooksey2009-10-302-31/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the number of programs held in the cache exceeds a threshold, the least frequantly used programs get deleted. This also covers programs with custom snippets of code. As a conequence, when a QGLCustomShaderStage gets deleted, any programs using that code will (eventually) be freed. Reviewed-By: Samuel Rødal
* | | | Rename qglEngineShaderSourceCode to qShaderSnippetsTom Cooksey2009-10-302-71/+93
| | | | | | | | | | | | | | | | This patch also adds a "snippetNameStr" helper for debugging.
* | | | Refactor of shader manager to not use partial shadersTom Cooksey2009-10-304-217/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first step towards supporting binary shaders. Note: This change will introduce a (rare) leak of shader objects, as the shaders will never be kicked out from the cache (because the cache is still a QList) :-) This will be corrected by the next patch. Reviewed-By: Samuel
* | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-10-303-4/+6
|\ \ \ \ | |/ / / |/| | |
| * | | Added QImagePixmapCleanupHooks functions for enabling hooks.Samuel Rødal2009-10-293-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Better than having to befriend QPixmapData and setting is_cached manually. Reviewed-by: Tom Cooksey
* | | | 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