| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Compile both GL and GL2 paint engine on desktop, and choose between them
at run-time based on GL version flags.
Reviewed-by: Tom
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Returns true if it had to change the shader program so the engine knows
it needs to clean the uniforms.
|
|\
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
RevBy: Trond
Details: Need to make sure clipping/scissoring etc is turned off and
that we are in a good state.
|
|
|
|
| |
RevBy: Tom
|
|
|
|
| |
RevBy: Tom
|
|
|
|
| |
RevBy: Tom
|
|
|
|
| |
RevBy: Tom
|
|
|
|
|
|
|
|
| |
RevBy: Tom
Details: Mode transfer lets us optimize the case where the same operation is
done a lot of times in a row, for example image or text drawing, by
being able to assume that most of the state has already been set up
properly.
|
|
|
|
|
|
|
| |
RevBy: Tom
Details: Buffer vertex and texture coordinates so that we get away
with just a single glDrawArrays call per text item.
Also move drawCachedGlyphs() into the private class.
|
|
|
|
|
| |
Details: Avoid adding 0.5 to dx() / dy() which caused images / glyphs to
get slight antialiasing and edge artifacts.
|
| |
|
|
|
|
|
|
|
|
| |
paint engine.
RevBy: Tom
Details: Now we can use the GL 2 paint engine on non-widget paint devices like pixel buffers,
framebuffer objects, and GL window surfaces. Using -graphicssystem opengl works now.
|
| |
|
|
|