summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-09-181-0/+1
|\
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Tom Cooksey2009-09-178-184/+23
| |\ | | | | | | | | | | | | Conflicts: tests/auto/qtwidgets/tst_qtwidgets.cpp
| * | Add a QMAKE_LFLAGS_EGL and QMAKE_LFLAGS_OPENGLTom Cooksey2009-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you link cross-compiled applications on Linux, the linker needs to be able to find not just the libraries the application links against (like libQtGui.so), but the libraries' dependencies. E.g. examples/widgets/wiggly links against QtGui. QtGui links against libEGL.so. Therefore, when you link wiggly, the linker has to be able to find libEGL.so, even though wiggly doesn't use EGL directly. To facilitate this, -Wl,rpath-link=/path/to/egl needs to be added to QMAKE_PRL_LIBS in libQtGui.prl and -Wl,rpath-link=/path/to/gl needs to be added to QMAKE_PRL_LIBS in libQtOpenGL.prl. This only needs to be done when the EGL/GL libs are not in the default search directories. As the paths will also change depending on the mkspec, two new variables have been added: QMAKE_LFLAGS_EGL & QMAKE_LFLAGS_OPENGL. These can be set in the mkspec and will be added to the relevent prls. E.g. QMAKE_LFLAGS_EGL += -Wl,-rpath-link=$${QMAKE_LIBDIR_EGL} QMAKE_LFLAGS_OPENGL += -Wl,-rpath-link=$${QMAKE_LIBDIR_OPENGL} Reviewed-by: Marius Storm-Olsen
* | | context()->makeCurrent() is called above, so this is redundant.Gunnar Sletta2009-09-171-2/+0
| |/ |/| | | | | Reviewed-by: Samuel
* | qdoc: QGLContext::drawTexture referring to itself.Rhys Weatherley2009-09-171-4/+0
| |
* | Revert "Added support for subpixel antialiasing on text in the GL2 engine."Rhys Weatherley2009-09-177-180/+23
|/ | | | | | Breaks the GL2 paint engine on X11 and OpenGL/ES 2.0. This reverts commit b8ff02a67ebd8246253823b53cfed98eef400547.
* Make QtOpenGL on X11/EGL less chatty with it's debug outputTom Cooksey2009-09-161-5/+6
| | | | Reviewed-by: Trustme
* Added support for subpixel antialiasing on text in the GL2 engine.Kim Motoyoshi Kalland2009-09-167-23/+180
| | | | | | The antialiasing is currently not gamma corrected. Reviewed-by: Samuel
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-09-165-36/+62
|\
| * Reduce overhead of paint engine-specific pixmap filtersRhys Weatherley2009-09-164-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Engine-specific pixmap filters were being created, used, and destroyed every time draw() was called on QPixmapColorizeFilter, QPixmapBlurFilter, and so on. This had a heavy performance penalty and made it difficult for the GL paint engine to cache shaders from one request to the next. A generic filter can request an engine-specific filter that matches its parameters. The engine can either create a new one or return a previously allocated filter object. Ownership of engine-specific pixmap filter objects is moved to the paint engine itself. Reviewed-by: Andrew den Exter Reviewed-by: Michael Brasser Reviewed-by: Michael Goddard Reviewed-by: Sarah Smith
| * Only regenerate pixmap filter source if the parameters have changed.Rhys Weatherley2009-09-151-2/+31
| | | | | | | | Reviewed-by: trustme
| * Remove unnecessary definitions in GL pixmap filter code.Rhys Weatherley2009-09-151-5/+0
| | | | | | | | | | | | The code does not use QGLShader directly any more. Reviewed-by: trustme
| * Fix glMatrixMode() arguments for desktop OpenGLRhys Weatherley2009-09-151-2/+2
| | | | | | | | | | | | | | The defines are GL_MODELVIEW/GL_PROJECTION, not GL_MODELVIEW_MATRIX/etc. The _MATRIX defines are for fetching the matrix, not setting it. Reviewed-by: trustme
| * Compilation fix for OpenGL/ES 2.0Rhys Weatherley2009-09-151-0/+2
| | | | | | | | | | | | Matrix functions do not exist under OpenGL/ES 2.0. Reviewed-by: trustme
| * Increased performance of blurpicker example with GL 2 engine.Samuel Rødal2009-09-151-8/+8
| | | | | | | | | | | | | | Slightly increase threshold for when to shrink an FBO, and reduce the number of calls to glBindFramebuffer. Reviewed-by: Tom
* | Fixed glsl warnings on mac and stop using texturecoords when not neededGunnar Sletta2009-09-163-26/+20
| | | | | | | | | | | | | | | | | | | | The setTextureCoordsEnabled was enabled in two places, but never disabled causing it to always be used. When using a varying in a vertex shader and not using it again in the fragment shader this produces a warning, and rightly so. Since the property is 100% detectable based on the fragment shader used, move the logic into the shader selection code and kill the property all together. This should also speed up solid filling a bit...
* | Silenced GLSL compiler warning on Mac OS XGunnar Sletta2009-09-152-1/+5
|/
* 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