summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qglengineshadersource_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.6Sergio Ahumada2012-11-271-18/+18
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I8b2ed2e09e9beb46bdda354017c29f00be6ae76f Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | Reviewed-by: Trust Me
* Workaround for ATI driver bug when using QGraphicsEffect with GL.Kim Motoyoshi Kalland2010-05-121-1/+0
| | | | | | | | | If you forward declare a shader function which takes a sampler as argument, the shader program will fail to link on ATI cards under Windows. Task-number: QTBUG-10510 Reviewed-by: Trond
* Worked around driver bug causing clipping errors on N900.Samuel Rødal2010-03-101-3/+8
| | | | | | | | | Apparently the driver does some optimization which causes it to behave erratically when stencil testing is enabled. Multiplying the return value from the texture lookup by 1.0 disables the optimization. Task-number: QTBUG-8753 Reviewed-by: Trond
* Purely cosmetic (formatting) changes to GL2 engine's GLSLTom Cooksey2010-01-211-333/+357
| | | | | | This makes GLSL dumps _significantly_ easier to read. Reviewed-By: TrustMe
* Use an attribute value for the PMV matrix rather than a uniformTom Cooksey2010-01-211-8/+26
| | | | | | | | | | | | | | This has several advantages: First, updating an attribute value seems to be cheaper than updating a uniform. Second, vertex atribute values are independent of shader program, which means they persist across changing of the shader program. This makes code simpler and reduces GL state changes. Note: Credit goes to Samuel for finding this little gem. :-) For the 25920 solid QGraphicsRectItem test case, this gives 10% improvement on desktop and 27% on the SGX. Reviewed-By: Kim
* Remove unnecessary depth uniform from GL2 engine's GLSLTom Cooksey2010-01-211-6/+0
| | | | Reviewed-By: Samuel
* Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | Reviewed-by: Trust Me
* Use 3x3 PMV matrices rather than 4x4 in the GL2 engineTom Cooksey2009-12-221-34/+32
| | | | | | | | | | | | | QGraphicsView based applications will set a new transform for every item before it's painted. This leads to lots of updates to the PMV matrix. So switching to a 3x3 rather than a 4x4 gives us less data to pass to GL for each QGraphicsItem which gets rendered. It also means the vertex shader is more efficient. However, this patch only gives a maximum 2.5% speed improvement on the SGX, which seems to be only due to the faster vertex shader rather than the reduced amount of data we pass to GL. Reviewed-By: Kim
* Added some optimizations to the blur and drop shadow GL filters.Samuel Rødal2009-10-291-8/+8
| | | | | | | | | | | | | | | | | | | | * 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
* Fixed upside down brush patterns in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-141-1/+0
| | | | | Task-number: QTBUG-2222 Reviewed-by: Gunnar
* Added support for drawing a pixmap multiple times in one call.Kim Motoyoshi Kalland2009-10-021-0/+20
| | | | | | | | | 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
* Resubmit support for subpixel antialiasing on text in the GL2 engine.Kim Motoyoshi Kalland2009-09-221-0/+33
| | | | | | | The antialiasing is currently not gamma corrected and is disabled on OpenGL ES 2.0. Reviewed-by: Samuel
* Revert "Resubmit support for subpixel antialiasing on text in the GL2 engine."Rhys Weatherley2009-09-221-33/+0
| | | | This reverts commit 1b34feacef7a2d3ac005449a7cfbcb08a6bbf947.
* Resubmit support for subpixel antialiasing on text in the GL2 engine.Kim Motoyoshi Kalland2009-09-211-0/+33
| | | | | | | The antialiasing is currently not gamma corrected and is disabled on OpenGL ES 2.0. Reviewed-by: Samuel
* Revert "Added support for subpixel antialiasing on text in the GL2 engine."Rhys Weatherley2009-09-171-33/+0
| | | | | | Breaks the GL2 paint engine on X11 and OpenGL/ES 2.0. This reverts commit b8ff02a67ebd8246253823b53cfed98eef400547.
* Added support for subpixel antialiasing on text in the GL2 engine.Kim Motoyoshi Kalland2009-09-161-0/+33
| | | | | | The antialiasing is currently not gamma corrected. Reviewed-by: Samuel
* Fix drawTiledPixmap for NPOT pixmaps on OpenGL ES 2.0Tom Cooksey2009-09-141-0/+12
| | | | | | | | | OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, we emulate GL_REPEAT by only taking the fractional part of the texture coords in the fragment shader. Task-number: 260982 Reviewed-by: Samuel
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Don't flip texture coords in texture brushes in accordance with new bindTextureGunnar Sletta2009-08-271-1/+0
| | | | Reviewed-by: Trond
* Improved GLSL precision specifiers in GL 2 engine.Samuel Rødal2009-08-261-24/+24
| | | | | | | | | | | | | | | | The recommended specifiers are lowp for colors / normal vectors, mediump for texture coordinates when a limited range is sufficient, and highp for generic texture coordinates and vertex coordinates / transformation matrices. We used to use mediump for texture coordinate in some places, but since we don't control the texturing scenarios we need to handle the worst case, which is zooming in on part of a large texture (2048x2048) with bilinear filtering. To properly handle this case without color banding mediump is probably not sufficient, so we'll use highp for texture coordinates. Reviewed-by: Tom
* Added missing precision specifiers to custom shader effect.Samuel Rødal2009-08-261-1/+1
| | | | | | The precision specifiers need to be there on OpenGL ES 2.0. Reviewed-by: Tom
* Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-191-3/+3
|\ | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h
| * Fixed text rendering on GL ES 2 implementations.Trond Kjernåsen2009-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | Some GL ES 2 implementations seem to have problems with glCopyTexSubImage2D(), so we fall back and read the old font texture into system memory and re-upload the new font texture. Also, the precision used for texture coordinates in the fragment programs wasn't high enough, which could lead to rendering artifacts. Reviewed-by: Samuel
* | Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-171-1/+1
|\|
| * Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Added custom shader hook to the GL 2 paint engine.Samuel Rødal2009-06-301-0/+8
|/ | | | | This will make it easier to implement pixmap filters, YUV->RGB conversions, etc in other parts of Qt.
* Fixed buggy clipping when using projective transforms in GL 2 engine.Samuel Rødal2009-06-251-14/+4
| | | | | | | | | | | The gl_Position x, y, and z coordinates are always divided by the homogenuous w coordinate to yield the final coordinates. Since we want the depth to be constant for the whole item we need to premultiply it by the w-coordinate. We can do this in the main() function in the vertex programs since all the vertex programs use the depth uniform, thus simplifying the programs a bit. Reviewed-by: Trond
* Update license headers in files that are new in 4.6.Jason McDonald2009-06-171-2/+2
| | | | Reviewed-by: Trust Me
* Fixed incorrect rendering of bitmap/pattern brushes in GL 2 engine.Samuel Rødal2009-06-121-1/+16
| | | | | | | | | The pen color should be used when drawPixmap is called with a bitmap, and the brush color should be used for texture patterns that are bitmaps. Task-number: 245802 Reviewed-by: Trond
* Improved clipping in GL2 paint engine.Samuel Rødal2009-06-091-0/+14
| | | | | | | | | | | | | Use the stencil method to draw clip paths and regions to the Z-buffer instead of using glClear / glScissor. Using different depth values for the various clip parts also makes restore() very cheap when only IntersectClip is used. As an additional bonus this patch gives antialiased clip in the GL 2 paint engine. Task-number: 254658 Reviewed-by: Trond
* Implemented QGLTextureGlyphCache to avoid wasting glyph cache memory.Samuel Rødal2009-06-031-2/+7
| | | | | | | | | Now there's only a copy of the texture glyph cache in graphics memory, avoiding the system memory copy that we used earlier. In addition the texture will use the GL_ALPHA texture format when possible, making it consume less graphics memory as well. Reviewed-by: Tom
* Fix GLSL for OMAP3 and error checkingTom Cooksey2009-05-201-1/+1
|
* Change fragment shaders to apply the mask as the final stepTom Cooksey2009-04-221-2/+2
| | | | I.e. After composition, not before.
* Make text rendering work again on the GL2 engineTom Cooksey2009-04-211-5/+4
| | | | | - But now it can handle non-solid-color pens, the whole reason for the refactor in the first place.
* Kill unused SimpleVertexShader & rename vertex coords arrayTom Cooksey2009-04-201-20/+12
| | | | | | | | Rename inputVertex -> vertexCoordsArray to be more consistent with other vertex attribute array naming conventions. SimpleVertexShader has also been replaced with a combination of MainVertexShader & PositionOnlyVertexShader, so can be killed.
* Refactor opacity handling & make drawImage/drawPixmap work againTom Cooksey2009-04-201-14/+14
|
* Fix various issues with conical grad GLSL codeTom Cooksey2009-04-171-4/+6
| | | | | | - atan2 is just called atan in GLSL (which supports overloads) - varyings can't be modified in fragment shaders - #defines need to be on their own line
* Add a "shocking pink" shader for rendering into stencil buffTom Cooksey2009-04-171-0/+5
| | | | | | If you see shocking pink in the rendering output, it's probably because the "simple" shader is in use but color writes have somehow been enabled. :-)
* Fix GLSL warning & possible artifacts with radial gradientsTom Cooksey2009-04-171-1/+1
| | | | Reviewed-by: Samuel Rødal
* Clean up existing & implement missing GLSL for new shader managerTom Cooksey2009-04-161-0/+385