| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Update documentation and #ifdef out the implementation.
Reviewed-by: trustme
|
| |
|
|
|
|
|
|
|
|
|
| |
The renderText() function is only for legacy desktop systems,
so revert the previous attempts to port it to OpenGL/ES.
Documentation note added to direct users to QPainter::drawText()
for the correct way to render text onto an OpenGL paint device.
Reviewed-by: trustme
|
|\
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
|
| |
| |
| |
| |
| |
| |
| | |
Stops the license checker failing each time the file is re-generated.
Also added "_P" to the generated header guard, as it's a private header.
Reviewed-by: Gunnar Sletta
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| | |
Need to unbind the window surface FBO and re-bind it in the child
widget's context before doing a blit.
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are too many platform regressions when using the FBO as a backend
for the opengl engine. We need to find whether it's possible to work
around them, but for the time being, to preserve compatibility, we
only use FBOs when using the opengl2 engine.
Example of issue: Smudged text and smudged diagonal lines on Windows XP
when running with opengl engine and latest nvidia driver.
Reviewed-by: Trond
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QGL2PaintEngineEx::clip() needs to call ensureActive() to make sure the
engine is active and synced before doing any clipping operations. We
also need to set needsSync to false before entering setState() since
otherwise we end up in an infinite loop in the case where
replayClipOperations() again calls QGL2PaintEngineEx::clip().
Reviewed-by: Tom
|
| |
| |
| |
| | |
Reviewed-by: Gunnar
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| |
| | |
This change should make qt_resolve_buffer_extensions() handle all
of the ARB, OES, and regular name variants for glBindBuffer(), etc
that may occur in the wild.
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It should be up to QGLPaintDevice::beginPaint() to make the correct
context current, so everything needing a current context needs to be
moved after that call.
This patch also modifies QGLPixmapData to use QGLContext::drawTexture
rather than the GL2 PE's drawTexture, which shouldn't be called inside
beginPaint as the paint engine hasn't been fully initialised yet.
Reviewed-by: Eskil
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We should bind the text mask texture after calling prepareForDraw(),
since prepareForDraw() might need to initialize the gradient texture,
which means the text mask will no longer be bound.
Task-number: 261058
Reviewed-by: Kim
|
| |
| |
| |
| | |
Reviewed-by: Tom
|
| |
| |
| |
| | |
Reviewed-by: Tom
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
wglGetProcAddress() on Windows requires a current context. Since there
was none, the resolution of GL extensions would silently fail, the
function pointers would be null and when we tried to use them later we
would get a crash (e.g. in startup of PadNavigator.) I've added an
assert to make the cause of the crash clearer, and a makeCurrent() to
fix the crash.
Reviewed-by: Tom
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The problem was the QGLContextResource destructor which was called
when the QtOpenGL dll was unloaded. At this point in time, the gl
driver had already been unloaded so any gl calls at this point in time
would crash. It is simply wrong for the destructor to try to clean up,
so we instead output a warning if resources are leaked.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QGLPaintDevice::format() was returning the context's format, not
the format of the window surface's FBO. This caused the OpenGL1
paint engine to think that the window didn't have depth and
stencil buffers, even though the FBO most certainly did.
This change makes QGLPaintDevice::format() virtual and overrides it
in QGLFBOGLPaintDevice to return an updated format that includes
the context parameters plus the extra features that the FBO supports.
Reviewed-by: Tom Cooksey
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Text drawing on OpenGL/ES 1.1 systems using QPF was displaying filled
boxes in place of the character glyphs. This is due to the QPF
implementation of alphaMapForGlyph() returning a different
color table than that expected by QGLGlyphCache::cacheGlyphs().
Reviewed-by: Sarah Smith
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| | |
Reviewed-by: trustme
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, QtOpenGL assumed that by linking against QtGui, it would
automatically also be linked against EGL. However, this is no longer the
case after 83940f25dba51a9942ab55ed8475fc7fc8a8da84 which makes sure
only QtGui links against EGL and not other libs/apps linking against
QtGui.
Reviewed-by: Rhys Weatherley
|
| |
| |
| |
| |
| |
| |
| | |
This bug was exposed by a change in the QSvg module, and it
fixes the framebufferobject and pbuffers2 GL examples.
Reviewed-by: Kim
|
| |
| |
| |
| |
| |
| | |
QGLPixmapData needs to be #define'd out for OpenGL ES 1.x
Reviewed-by: Trustme
|
| |
| |
| |
| | |
Reviewed-by: Tom
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/opengl/qgl.cpp
src/opengl/qgl_p.h
src/opengl/qpaintengine_opengl.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A new QGLFramebufferObject constructor was added after the
QGLPaintDevice was branched which therefore didn't get patched.
Reviewed-by: Trustme
|
| | |
| | |
| | |
| | | |
Reviewed-by: Trustme
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Trust Me
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QGLShader and QGLShaderProgram used to delete the GL object id
in the wrong context. But fixing this means we must keep track of
when contexts are destroyed so that we don't try to access a
context from a shader if it goes away. We also need to transfer
ownership from one context to another when they are shared.
This change introduces QGLSharedResourceGuard, which keeps track
of a context and a GL object identifier. When the context goes
away, ownership is passed to a shared context. When there are
no more shared contexts, the identifier automatically zeroes.
Reviewed-by: trustme
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QGLGradientCache for the OpenGL1 paint engine has to destroy
the cached gradient textures if the QGLContext changes.
Problem is, it wasn't changing back to the previous context
to destroy those textures.
Task-number: 249919
Reviewed-by: Sarah Smith
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the last patch in the QGLPaintDevice series. Although previous
patches have not been reviewed individually, Samuel's reviewed
QGLPaintDevice API and all the changes as the code stands with this
patch.
Reviewed-by: Samuel
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch changes the ordering of QGL2PaintEngine::begin a bit because
QGLPixmapData needs to use the paint engine's drawTexture method within
beginPaint().
Also, this initialises needsSync to true and removes the setState call.
So now all the state initialisation is done in ensureActive rather than
begin.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, the paint engine cleared the surface's buffers in begin.
This logic really belongs in QGLPaintDevice::beginPaint as not all paint
devices will want this behaviour (in fact most don't). This also makes
QGLPaintDevice API much simpler as the virtual getters for the clear
color, etc. can be removed. It's much cleaner this way. The only
possible problem is with the GL1 engine, which also cleared the
accumulation & depth buffers in begin. However, the engine will also
clear the depth buffer later as part of it's clipping logic. It also
doesn't use the accumulation buffer, so clearing it seems unnessisary.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch also refactors QGL2PaintEngineEx::ensureActive() and the
logic which handles multiple paint engines rendering to the same
QGLContext. In a nut-shell:
* QGLPaintDevice::beginPaint() stores the currently bound FBO
* QGLPaintDevice::ensureActiveTarget() makes sure that GL rendering will
end up in the paint device (I.e. the right context is current and the
right FBO is bound). If a different context or FBO was bound, it is
_not_ remembered.
* QGLPaintDevice::endPaint() restores whatever FBO was bound when
beginPaint() was called.
This logic allows interleaved painter rendering to multiple FBOs and
contexts to work as expected. It also allows a stacked begin/end to work
properly when it's mixed with native GL rendering (as far as current
render target is concerened. GL state clobbering is obviously a
different topic).
QGLPaintDevice::context() also had to be made virtual as there's no good
place to call setContext. This might be possible to change in the future
though.
Finally, to make this work, QGLFramebufferObjectPrivate had to be moved
into it's own private header.
|
| | |
| | |
| | |
| | |
| | | |
Add a new QGLPBufferGLPaintDevice implementation which allows the GL
engines to target QGLPixelBuffers again.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds a new abstract base class which inherits from
QPaintDevice called QGLPaintDevice. This base class will contain
everything the GL paint engines need to know about the surface they are
drawing onto. As such, new surfaces can be targeted by the GL paint
engines without having to modify QtOpenGL. This is very useful for
plugins, specifically QGraphicsSystem plugins.
To unify things a little, the GL paint engines will use the same
QGLPaintDevice API to render into existing target surfaces (QGLWidget,
QGLPixelBuffer & QGLFrameBufferObject). Ideally we'd make QGLPaintDevice
a common ancestor for these surfaces, but obviously that wil break B/C.
This patch only implements QGLWidget using the new interface. Rendering
to other surfaces will be fixed in following patches.
|