summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpaintdevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| * Don't include qwindowsurface_gl_p.h on QT_OPENGL_ES_1.Samuel Rødal2011-03-291-1/+1
| | | | | | | | | | | | | | This causes linker errors since qwindowsurface.cpp isn't compiled. Task-number: QTBUG-14217 Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Merge branch 'master' into lighthouse-masterJørgen Lind2011-01-261-1/+1
|\ \ | |/
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Make it possible to vertically mirror gl paintingJørgen Lind2011-01-261-2/+4
|/ | | | | | | The GLPaintDevice gets a flip property. If this is set, the pvr matrix is altered to paint "upside down" Reviewed-by: sroedal
* Added workarounds for two MBX/SGX specific GL ES bugs/problems.Trond Kjernåsen2010-05-141-1/+4
| | | | | | | | | | | | | | The workaround flags are put into the platform independent section for now, since there might be a general need for these as we expand our GL and GL ES usage. The workaround_needsFullClearOnEveryFrame flag covers the case where you get a performance penalty on PowerVR hw if all rendering buffers are not cleared. The workaround_brokenFBOReadBack flag covers the case where copying pixels from a texture (e.g. via glCopyTexSubImage2d()) bound in an FBO doesn't work. Task-number: QTBUG-10670 Reviewed-by: Gunnar
* Implement QGLPaintDevice::metric()Tom Cooksey2010-04-221-0/+16
| | | | Reviewed-By: TrustMe
* Merge branch '4.6' into qt-master-from-4.6Thiago Macieira2010-02-171-0/+5
|\ | | | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/helpviewer.cpp
| * Moved 'hasAlpha' property from GL2 engine to GL paint device.Kim Motoyoshi Kalland2010-02-121-0/+5
| | | | | | | | | | | | Got rid of an ugly switch statement. Reviewed-by: Tom
* | Remove obsolete OpenGL/ES CommonLite (fixed-point) supportRhys Weatherley2010-02-041-6/+2
|/ | | | | Task-number: QTBUG-7683 Reviewed-by: Tom Cooksey
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Rebind window surface fbo after native GL renderingRhys Weatherley2009-12-041-0/+10
| | | | | | | | | If the user called QGLFramebufferObject::bind()/release() during a beginNativePainting() callout, the release() would reset the context's fbo to zero, not the actual window surface fbo. Task-number: QTBUG-6204 Reviewed-by: Tom
* Add a new QX11GLPixmapData which renders to X pixmaps using GLTom Cooksey2009-10-191-2/+12
| | | | | Enable it by setting QT_USE_X11GL_PIXMAPS environment variable while using the -graphicssystem opengl
* Compile fix for OpenGL/ES 1.1 CommonLite systemsRhys Weatherley2009-09-091-0/+4
| | | | Reviewed-by: trustme
* Suppress warnings in QtOpenGL on OpenGL/ES 1.1 systemsRhys Weatherley2009-09-091-1/+1
| | | | Reviewed-by: trustme
* Document why an FBO of 0 needs to be bound in QGLPaintBuffer sometimesRhys Weatherley2009-09-091-0/+6
| | | | Reviewed-by: trustme
* Fix OpenGL ES 1.x after QGLPaintDevice refactorTom Cooksey2009-09-091-0/+7
| | | | | | QGLPixmapData needs to be #define'd out for OpenGL ES 1.x Reviewed-by: Trustme
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Cleanup of QGLPaintDevice before it goes inTom Cooksey2009-09-081-48/+18
| | | | | | | | | 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
* Make QGLPixmapData work with the new QGLPaintDevice APITom Cooksey2009-09-081-8/+21
| | | | | | | | | | 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.
* Make QGLWindowSurface use new QGLPaintDevice APITom Cooksey2009-09-081-4/+5
|
* Move buffer clear out of the paint engine and into the QGLPaintDevicesTom Cooksey2009-09-081-24/+40
| | | | | | | | | | | | 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.
* Make QGLFramebufferObject work again using new QGLPaintDevice APITom Cooksey2009-09-081-46/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make QGLPixelBuffer work again using new QGLPaintDevice APITom Cooksey2009-09-081-1/+6
| | | | | Add a new QGLPBufferGLPaintDevice implementation which allows the GL engines to target QGLPixelBuffers again.
* Replace QGLDrawable with a new QGLPaintDeviceTom Cooksey2009-09-081-0/+192
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.