| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
| |
GL window surface and GL pixmap backend should work with old GL engine
as well, though not supported to the same degree.
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The window surface has been modified to track widget deletion to make
sure it doesn't try to access the widget's context data after deletion.
QGLPixmapData now also uses GL_RGB instead of GL_RGBA when appropriate,
and hasAlphaChannel() has been modified in view of this.
A number of other issues have been fixed in QGLPixmapData, and the
autotest has been modified to use a more lenient pixmap compare function
due to off-by-one pixel errors here and there.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
| |
If we're painting to very wide and then very tall pixmaps we don't want
the FBO to grow to max_width * max_height, instead we should recreate
the FBO if it grows too large compared to what's being painted.
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.
|
|
|
|
|
|
|
| |
When not setting filtering mode to GL_NEAREST/GL_LINEAR copying back
from FBO to texture fails for some reason.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using GL 2 as default engine breaks the use cases where OpenGL commands
are inter-mixed with QPainter commands, such as when using raw OpenGL in
graphicsview.
For now we'll use the old OpenGL engine for QGLWidget, QGLPixelBuffer,
and QGLFramebufferObject on desktop, and the OpenGL 2 paint engine when
the OpenGL graphics system is used.
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|