| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Switching multisampling is not supported in GLES 2.0, but it's supported
in GL 2.0 so we should do it on desktop at least.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
| |
QPixmap shouldn't return true in hasAlphaChannel() for bitmaps, instead
the paint engine should check whether the pixmap is a bitmap or not. In
addition, QBrush::isOpaque() returned true for bitmap brushes, which is
wrong according to the documentation.
Reviewed-by: Trond
|
|
|
|
|
| |
Calling premultiplyColor() with a red channel of 255, alpha channel of
255, and opacity 1 would result in a color with red channel of 254.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Based on Zack's patch, 17e1bca1ce366395f8331e16aa96b7176ca1abac. Instead
of manually clearing the stencil buffer after drawing we simply do the
clearing and drawing in one go.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
An alternative solution is to swap the order of
-I../../include and -I../../include/QtOpenGL when
compiling the opengl module.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
| |
seem fixable easily)
Merge-request: 594
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
|
|
|
|
|
| |
Task-number: QT-80
Reviewed-by: Ian Walters
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
To allow mixing QPainter and raw OpenGL commands we need to have some
way for the user to say that's he's about to use raw OpenGL so that we
are free to do buffering optimizations in the paint engines and use
either GL1 or GL2 paint engine. As there's already a syncState()
function in QPaintEngine we've reused this and added
QPaintEngineEx::sync() which takes care of syncing/flushing the paint
engine.
Reviewed-by: Trond
|
|
|
|
|
| |
Make sure the correct texture unit is active when copying from the
pixmap to the FBO in begin().
|
|
|
|
|
|
|
|
| |
Even if the source pixels are opaque we have to enable blending for the
non-trivial composition modes. Some of the composition modes are
independent of source alpha and depend on destination alpha for example.
Reviewed-by: Tom
|
| |
|
|
|
|
| |
Reviewed-by: Tom
|
|
|
|
|
|
|
|
| |
QWidgets are filled with Qt::transparent when WA_TranslucentBackground
is set, reguardless of what their background colour has been set to.
This patch makes QGLWidgets behave the same way.
Reviewed-By: Samuel Rødal
|
|
|
|
|
|
|
| |
This patch enables QGLWidget's to have an ARGB visual on X11, alowing GL
rendering on semi-transparent windows.
Reviewed-By: Trond
|
|
|
|
|
|
|
| |
In the fill case we can simply set a flag saying the pixmap needs to be
filled, and then when painting on the pixmap we start by filling the
background using glClear via the existing
QGLDrawable::autoFillBackground interface.
|
|
|
|
|
|
|
| |
Make sure makeCurrent() on a window surface unbinds any active FBO, and
simplify ensureActive() code in GL2 paint engine a bit. We don't need
the last_engine pointer as ensureActive() will take care of ensuring the
correct engine is active anway.
|
|
|
|
|
|
| |
Override systemStateChanged() to get the system clip updates.
Reviewed-by: Trond
|
| |
|
|
|
|
| |
Reviewed-by: Trond
|
| |
|
|
|
|
|
|
|
| |
Compile both GL and GL2 paint engine on desktop, and choose between them
at run-time based on GL version flags.
Reviewed-by: Tom
|
|\
| |
| |
| |
| | |
Conflicts:
src/gui/painting/qpaintengine_raster.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clean up the extension naming and make things build on OpenGL ES 2.0
again. All the extensions which made it into OpenGL 2.0 spec have have
the EXT postfix removed. This also eliminates defines on ES 2.0 as the
code now refers to the in-spec names.
Reviewed-by: sroedal
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
|/ |
|
|
|
|
| |
The list of shaders shouldn't change too much now.
|
|
|
|
|
| |
Returns true if it had to change the shader program so the engine knows
it needs to clean the uniforms.
|
| |
|
|
|
|
| |
I.e. After composition, not before.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/opengl.pro
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Special-case TextDrawingMode in updateMatrix() as we know that we'll
have a pure translating transform, and round the transform's dx and dy
to avoid drawing on non-integer offsets.
Task-number: 245806
Reviewed-by: Tom
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the case where a GL pixmap is used when there it still has an active
engine we need to ensure that the pixmap has been flushed from the
render FBO first. The newly added QGLPixmapData::copyBackFromRenderFbo()
handles this.
In addition, because several GL 2 paint engines can be active on the same
context at the same time, we can't make any assumptions and need to call
the newly added QGL2PaintEngineEx::ensureCreated() in the beginning of
any state-dependent paint engine function.
QGL2PaintEngineEx::ensureCreated() correctly transfers control to the
current engine if a different engine is active.
Running lance with -pixmap and -graphicssystem opengl works correctly
with the GL pixmap backend now.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We now use FBOs to implement render-to-pixmap for the GL pixmap backend.
A multisample FBO is used for rendering, and is then blitted onto a
non-multisample FBO dynamically bound to the relevant texture.
Reviewed-by: Tom
|
| |
| |
| |
| | |
Only call updateDepthClip() if the clip has actually changed.
|
| |
| |
| |
| |
| | |
- But now it can handle non-solid-color pens, the whole reason for
the refactor in the first place.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
- 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
|
| |
| |
| |
| |
| |
| | |
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. :-)
|
| |
| |
| |
| | |
Reviewed-by: Samuel Rødal
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Reviewed-by: TrustMe
|