summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpaintdevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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.