summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Functions that are externally defined to QtOpenGL needs to be imported.Jani Hautakangas2010-10-211-2/+2
| | | | | | This is needed for RVCT4 Reviewed-by: Jason Barron
* Fix GL_OES_element_index_uint and add GL_OES_depth24 detection.Jani Hautakangas2010-10-201-5/+14
| | | | | | | | | GL_OES_element_index_uint detection was not working because EGL config wasn't yet resolved. In addition QFrameBufferObject should use 24bit depth render buffer if extension is available. Task-number: QTBUG-14542 Reviewed-by: Gunnar
* Fix compilationOlivier Goffart2010-09-221-2/+2
| | | | Reviewed-by: Kim
* Revert "Fixed painter path drawing on FBO without stencil buffer."Kim Motoyoshi Kalland2010-09-221-4/+0
| | | | | This reverts commit 89cbb165600de9a557a8a621dc41b93c2a7a2b52. The patch should be applied to Qt 4.8, not 4.7.
* Fixed stencil buffer on FBOs with OpenGL ES.Kim Motoyoshi Kalland2010-09-221-25/+76
| | | | | | | | If combined depth-stencil buffer is not supported, create separate depth and stencil buffers. Task-number: QTBUG-12861 Reviewed-by: Trond
* Fixed painter path drawing on FBO without stencil buffer.Kim Motoyoshi Kalland2010-09-201-0/+4
| | | | | Task-number: QTBUG-13450 Reviewed-by: Samuel
* OpenGL: Fix multisample renderbuffer creation when MAX_SAMPLES is 0.Christian Kamm2010-08-091-2/+2
| | | | | | | | Previously, we would try to create one with samples = 1 anyway, potentially resulting in an INVALID_VALUE error. Task-number: QTBUG-12757 Reviewed-by: Samuel Rødal
* Added static version of QGLFramebufferObject::release().Kim Motoyoshi Kalland2010-06-021-0/+30
| | | | | | The function is marked internal for now. Reviewed-by: Gunnar
* Merge remote branch 'origin/master' into qt-master-from-4.6Thiago Macieira2010-02-181-1/+1
|\ | | | | | | | | | | Conflicts: src/corelib/codecs/qtextcodec.h tests/auto/gestures/tst_gestures.cpp
| * doc: Fixed some qdoc errors.Martin Smith2010-02-161-1/+1
| |
* | Merge branch '4.6' into qt-master-from-4.6Thiago Macieira2010-02-171-0/+7
|\ \ | |/ |/| | | | | | | | | 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/+7
| | | | | | | | | | | | Got rid of an ugly switch statement. Reviewed-by: Tom
* | Remove obsolete OpenGL/ES CommonLite (fixed-point) supportRhys Weatherley2010-02-041-7/+3
|/ | | | | Task-number: QTBUG-7683 Reviewed-by: Tom Cooksey
* Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-7/+5
| | | | | | | | | | | | | | | | | | Qt used to store the GL extensions a particular implementation supported in a global cache, which was initialized once and never updated. This could cause problems because different types of context might support different kinds of extensions (e.g. the difference between sw and hw contexts). With this patch, the GL extensions are cached and updated within each QGLContext. It also makes the extension initialization lazy, which saves application initialization costs for embedded platforms. The patch introduces a internal cross platform QGLTemporaryContext class that is used to create a light-weight GL context without going via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks for now). Reviewed-by: Kim Reviewed-by: Samuel
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Update FBO docs to describe how QPainter changes the GL stateRhys Weatherley2009-12-171-0/+6
| | | | | | | | | Using a QPainter on a QGLFramebufferObject will not return the GL context to its original conditions, especially with the OpenGL2 paint engine. Update the docs to make this clearer. Task-number: QTBUG-6712 Reviewed-by: Daniel Pope
* Rebind window surface fbo after native GL renderingRhys Weatherley2009-12-041-2/+2
| | | | | | | | | 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
* Fix docs for QGLFramebufferObject & add warnings in bind/releaseTom Cooksey2009-11-051-7/+16
| | | | | | | Warnings are for binding/releasing when the current context isn't in the same context group as the FBO was created in. Reviewed-By: Trond
* Remove unnessisary QGLFBOGLPaintDevice re-implementationsTom Cooksey2009-11-051-30/+0
| | | | | | | Now QGLFBO doesn't do stacking, QGLPaintDevice's base implementation is ok to use. Reviewed-By: Trond
* Removed the FBO stacking behaviour and the test attached to it.Trond Kjernåsen2009-11-051-26/+7
| | | | | | | Having this behaviour in QGLFrameBufferObject complicates alot of things and isn't really necessary. Reviewed-by: Tom Cooksey
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-191-1/+3
|\
| * Don't delete an fbo's texture if the fbo isn't using a textureRhys Weatherley2009-10-121-1/+3
| | | | | | | | | | | | Also, unbind the texture after it is initialized. Reviewed-by: Sarah Smith
* | Fixed a crash in the tst_qgl test.Trond Kjernåsen2009-10-161-1/+2
| | | | | | | | | | | | | | QGLFramebuffer::isBound() would crash if it was called when there wasn't a current context bound. Reviewed-by: Kim
* | Fixed bug when using QGLWidgets in -graphicssystem openglSamuel Rødal2009-10-121-0/+17
|/ | | | | | We need to make sure that the FBO is bound in a valid context. Reviewed-by: Tom
* Check the framebuffer format against a format, not a texture targetRhys Weatherley2009-10-091-1/+1
| | | | | | | | The previous code was comparing QGLFramebufferObjectFormat::textureTarget() against GL_RGB to determine if alpha was present. This should be internalTextureFormat() instead. Reviewed-by: Sarah Smith
* Make QGLFramebufferObject crash-proof if QGLContext destroyed firstRhys Weatherley2009-10-011-23/+35
| | | | | | | | | | | | | | | | Sometimes it isn't possible to arrange for the QGLFramebufferObject to be destroyed before the QGLContext group in which it was created. Especially during application shutdown or in applications with multiple shared contexts. This change modifies QGLFramebufferObject to use QGLSharedResourceGuard, which ensures that when the last QGLContext in a sharing group is destroyed, any remaining FBO's will revert to !isValid(). It is now safe to destroy the context before the FBO, or the FBO before the context. Unit test included. Reviewed-by: Sarah Smith
* qdoc fixes to QGLFramebufferObject::blitFramebuffer()Rhys Weatherley2009-09-281-6/+11
|
* Don't round-trip to GL server for glGetError() in release mode.Rhys Weatherley2009-09-151-1/+10
| | | | | Reviewed-by: Samuel Reviewed-by: Tom Cooksey
* qdoc: document default values for QGLFramebufferObject propertiesRhys Weatherley2009-09-131-9/+17
|
* Made GL window surface work better with native child widgets.Samuel Rødal2009-09-111-0/+2
| | | | | | | Need to unbind the window surface FBO and re-bind it in the child widget's context before doing a blit. Reviewed-by: Kim
* Return the correct QGLFormat to the OpenGL1 paint engine for FBO'sRhys Weatherley2009-09-101-2/+13
| | | | | | | | | | | | | 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
* Fix build breakage on Mac CarbonTom Cooksey2009-09-091-1/+1
| | | | | | | A new QGLFramebufferObject constructor was added after the QGLPaintDevice was branched which therefore didn't get patched. Reviewed-by: Trustme
* Remove duplicate setFBO calls introduced by QGLPaintDevice mergeTom Cooksey2009-09-091-2/+0
| | | | Reviewed-by: Trustme
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Make QGLPixmapData work with the new QGLPaintDevice APITom Cooksey2009-09-081-0/+9
| | | | | | | | | | 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 QGLFramebufferObject work again using new QGLPaintDevice APITom Cooksey2009-09-081-72/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 operator== and != to QGLFramebufferObjectFormatRhys Weatherley2009-09-081-0/+28
| | | | Reviewed-by: Sarah Smith
* Convert QGLFramebufferObjectFormat to use implicit sharingRhys Weatherley2009-09-081-15/+56
| | | | Reviewed-by: Sarah Smith
* Fixed compile failure on Mac OS X.Samuel Rødal2009-09-071-2/+1
|
* Fixed crash in print preview dialog with graphicssystem OpenGL.Kim Motoyoshi Kalland2009-09-071-17/+18
| | | | | | | | Avoid crashing when framebuffer object created in one context is used in a shared context after the original context is destroyed. Task-number: 260874 Reviewed-by: Samuel
* Make QGLFramebufferObject::isBound() check it is the bound fboTom Cooksey2009-09-041-5/+3
| | | | | | | | Previously, it was possible that painting using QPainter to a different GL target (E.g. QGLWidget) would unbind the FBO. In such cases, isBound returned true, even though the FBO wasn't bound to any context. Reviewed-by: Samuel
* Slightly improved QGLFramebufferObjectFormat API.Samuel Rødal2009-09-041-14/+15
| | | | | | | Renaming setInternalFormat() to setInternalTextureFormat() (and similarly for the accessor) makes the API a bit more explicit. Reviewed-by: Trond
* Fixed issues with using GLenum in public API on mac.Samuel Rødal2009-09-031-31/+41
| | | | | | | | | | The type of GLenum was changed between 10.4 and 10.5, so to support compiling on one and deploying on the other we need this hack. Also get rid of the complex QGLFramebufferObjectFormat constructor in favor of a simple default constructor and setters, which is more Qt-ish anyway, and avoids ambiguities on mac. Reviewed-by: Trond
* Unambiguated QGLFramebufferObject constructor on Mac OS X.Samuel Rødal2009-09-011-1/+1
| | | | Reviewed-by: Trond
* Fixed toImage() not working on a multisample QGLFramebufferObject.Samuel Rødal2009-09-011-0/+10
| | | | | | | Need to blit into a regular QGLFramebufferObject first to force a multisample resolve. Reviewed-by: Trond
* Fixed QGLFramebufferObject::toImage() releasing the FBO if bound.Samuel Rødal2009-09-011-2/+5
| | | | Reviewed-by: Trond
* Fixed having a QPainter active on several FBOs at the same time.Samuel Rødal2009-08-311-10/+29
| | | | | | | It's insufficient to use a single paint engine to render to all FBOs. If the default engine is already in used we need to create our own engine. Reviewed-by: Trond
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me