summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Removed GL1 pixmap filters and ported colorize filter to GL2 engine.Samuel Rødal2009-09-153-61/+22
| | | | | | | | The GL1 engine will use the raster fall back for pixmap filters. We anyhow use GLSL for the filters, which requires OpenGL 2 support, and in that case the GL2 engine is the default. Reviewed-by: Gunnar Sletta
* Fixed rendering errors in blurpicker with -graphicssystem openglSamuel Rødal2009-09-152-1/+16
| | | | | | | | | | | | | | | | 1) Need to transfer to brush drawing mode when switching active engine, to make sure we reset the vertex / texture coordinate pointers for image drawing. 2) QGLPixmapGLPaintDevice::beginPaint() was changed to use QGLContext::drawTexture() for blitting the old texture contents to the render FBO, which means that we also need to set up viewport, modelview, and projection matrices, and ensure that clipping / stencil testing is disabled. 3) Make sure stencil testing is disabled when clearing the FBO. Reviewed-by: Tom
* 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: Shift snippets in QGLShaderProgram out into doc/src/snippetsRhys Weatherley2009-09-151-49/+3
|
* Really fixed clipping bug in portedcanvas with -graphicssystem opengl.Samuel Rødal2009-09-141-1/+1
| | | | | | | | Change c72eaee91136bbe1a9fa99cdb0a7593bec60264b was wrong, we should call ensureActive(), not syncState(). Task-number: 261113 Reviewed-by: Trond
* Fixed clipping bug in GL 2 engine.Samuel Rødal2009-09-141-0/+1
| | | | | | | | | | | When dumping the rectangle clip to the depth buffer due to needing to intersect with a more complex clip, we didn't take into consideration that writeClip will transform the path by the current matrix, whereas the rectangle clip is in device coordinates. Thus, we need to map the path by the inverse matrix. Task-number: 260701 Reviewed-by: Trond
* Fixed clipping bug in portedcanvas with -graphicssystem openglSamuel Rødal2009-09-141-0/+3
| | | | | | | | | We need to call ensureActive() when save() is called, to make sure systemStateChanged() gets called and updates the scissorTestEnabled flag, so that we don't lose it on the next restore(). Task-number: 261113 Reviewed-by: Trond
* Ensured that we use GL 1 engine when -graphicssystem opengl1 is used.Samuel Rødal2009-09-141-1/+1
| | | | Reviewed-by: Trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-09-141-0/+12
|\
| * Fix drawTiledPixmap for NPOT pixmaps on OpenGL ES 2.0Tom Cooksey2009-09-141-0/+12
| | | | | | | | | | | | | | | | | | OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, we emulate GL_REPEAT by only taking the fractional part of the texture coords in the fragment shader. Task-number: 260982 Reviewed-by: Samuel
* | Some small optimizations to gl2 engine.Gunnar Sletta2009-09-142-30/+11
| | | | | | | | | | | | | | | | | | | | Use qpen_ and qbrush_ accessors for slightly better performance and avoid calling for the same value again and again. Secondly, the engine doesn't use its pen and brush states so there is no point in maintaining them, so don't reset old brush all the time. Reviewed-by: Samuel
* | Fixed crash in gl when stroking with a Qt::NoBrush penGunnar Sletta2009-09-141-1/+3
|/ | | | Reviewed-by: Samuel
* Performance: reduce TLS overhead of QGLContext::currentContext()Rhys Weatherley2009-09-148-64/+42
| | | | | | | | | | | | | The handling for the current QGLContext was looking up the same TLS data several times per call (hasLocalData() and localData() calls particularly). This change also refactors the code a little so that the setting of the QGLContext within makeCurrent() and doneCurrent() is in one location in the code instead of six (one per platform). Reviewed-by: Michael Brasser Reviewed-by: Sarah Smith
* qdoc: QGLWidget::colormap() returns a QGLColormap, not a QColormapRhys Weatherley2009-09-141-2/+2
|
* Use redF(), etc when setting GL colorsRhys Weatherley2009-09-141-5/+3
| | | | Reviewed-by: Sarah Smith
* 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