summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* qdoc: size of a QGLColormap is 256 on all platforms, not just WindowsRhys Weatherley2009-09-141-1/+1
|
* qdoc: QGLFormat documentation improvementsRhys Weatherley2009-09-141-5/+9
|
* qdoc: QGLWidgets -> QGLWidget, etc, for proper doc linking.Rhys Weatherley2009-09-132-12/+12
|
* qdoc: document default values for QGLFramebufferObject propertiesRhys Weatherley2009-09-131-9/+17
|
* QGLWidget::fontDisplayListBase() is not supported under OpenGL/ESRhys Weatherley2009-09-132-2/+10
| | | | | | Update documentation and #ifdef out the implementation. Reviewed-by: trustme
* qdoc: qglColor() doesn't work under OpenGL/ES 2.0Rhys Weatherley2009-09-131-0/+4
|
* Make QGLWidget::renderText() desktop onlyRhys Weatherley2009-09-131-175/+72
| | | | | | | | | 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
* Merge branch '4.5' into 4.6Thiago Macieira2009-09-122-4/+57
|\ | | | | | | | | | | Conflicts: tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
| * Make opengl fragment program generator output license header.Jason McDonald2009-09-102-4/+57
| | | | | | | | | | | | | | 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
| * Update license headers again.Jason McDonald2009-09-0860-240/+240
| | | | | | | | Reviewed-by: Trust Me
* | Made GL window surface work better with native child widgets.Samuel Rødal2009-09-112-18/+64
| | | | | | | | | | | | | | Need to unbind the window surface FBO and re-bind it in the child widget's context before doing a blit. Reviewed-by: Kim
* | Do not use FBO as backend for window surface in opengl engineEskil Abrahamsen Blomfeldt2009-09-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fixed clipping bugs in GL2 graphics system with oxygen style.Samuel Rødal2009-09-111-1/+3
| | | | | | | | | | | | | | | | | | | | 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
* | Make mipmaps work on OpenGL/ES 2.0Rhys Weatherley2009-09-111-0/+12
| | | | | | | | Reviewed-by: Gunnar
* | Dump texture formats in hex, not decimalRhys Weatherley2009-09-111-2/+2
| | | | | | | | Reviewed-by: trustme
* | Recognize the OES_packed_depth_stencil extensionRhys Weatherley2009-09-111-0/+4
| | | | | | | | Reviewed-by: trustme
* | Resolve GL buffer functions in a better wayRhys Weatherley2009-09-111-6/+6
| | | | | | | | | | | | | | | | 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
* | Resolve ARB_framebuffer_object and OES_framebuffer_object extensionsRhys Weatherley2009-09-102-18/+75
| | | | | | | | Reviewed-by: trustme
* | Make an EGL context current when initializing GL extensionsRhys Weatherley2009-09-103-0/+37
| | | | | | | | Reviewed-by: trustme
* | Re-order begin() so everything needing a current context has oneTom Cooksey2009-09-102-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fixed rendering of text with gradient pen in GL 2 engine.Samuel Rødal2009-09-101-5/+4
| | | | | | | | | | | | | | | | | | 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
* | Upload texturedata in matching internal format..Gunnar Sletta2009-09-101-12/+26
| | | | | | | | Reviewed-by: Tom
* | Don't yinvert pixmaps on eglx11Gunnar Sletta2009-09-101-3/+0
| | | | | | | | Reviewed-by: Tom
* | Fix crash in gl2 paint engine on WindowsEskil Abrahamsen Blomfeldt2009-09-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Rhys Weatherley2009-09-101-2/+7
|\ \
| * | Fixed crash on shutdown with GL when leaking QGLWidgetsGunnar Sletta2009-09-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Return the correct QGLFormat to the OpenGL1 paint engine for FBO'sRhys Weatherley2009-09-103-4/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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 font glyph handling for QPF fonts in the OpenGL1 paint engine.Rhys Weatherley2009-09-101-1/+18
| | | | | | | | | | | | | | | | | | 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
* | 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-093-4/+10
| | | | | | | | Reviewed-by: trustme
* | Compile fix for OpenGL/ES 1.1 systemsRhys Weatherley2009-09-091-0/+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
* | Make QtOpenGL link against EGL for OpenGL ESTom Cooksey2009-09-091-1/+9
| | | | | | | | | | | | | | | | | | | | 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
* | Fixed a bug in the GL1 engine when using a QBrush(Qt::NoBrush) as a pen.Trond Kjernåsen2009-09-091-1/+1
| | | | | | | | | | | | | | This bug was exposed by a change in the QSvg module, and it fixes the framebufferobject and pbuffers2 GL examples. Reviewed-by: Kim
* | 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
* | Made GL1 engine have proper y-rotation since qgldrawable refactorGunnar Sletta2009-09-092-10/+23
| | | | | | | | Reviewed-by: Tom
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-09-0963-1074/+1566
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/qgl.cpp src/opengl/qgl_p.h src/opengl/qpaintengine_opengl.cpp
| * | 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
| * | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Rhys Weatherley2009-09-0962-248/+248
| |\ \
| | * | Update license headers again.Jason McDonald2009-09-0962-248/+248
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | Clean up shader programs properlyRhys Weatherley2009-09-094-191/+232
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Clean up the gradient cache in the right contextRhys Weatherley2009-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Cleanup of QGLPaintDevice before it goes inTom Cooksey2009-09-089-430/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-087-85/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-084-33/+64
| | |
| * | Move buffer clear out of the paint engine and into the QGLPaintDevicesTom Cooksey2009-09-086-63/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0811-152/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-084-1/+29
| | | | | | | | | | | | | | | Add a new QGLPBufferGLPaintDevice implementation which allows the GL engines to target QGLPixelBuffers again.
| * | Replace QGLDrawable with a new QGLPaintDeviceTom Cooksey2009-09-0810-83/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.