summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Ensure that OpenGL contexts are attached to an NSView before first paintTor Arne Vestbø2010-09-021-3/+11
| | | | | | | | | | | | | | | | | | | | | | | Attaching an OpenGL context to an NSView too soon will result in an error "invalid drawable" printed on the console. We used to guard against this by checking the visible property of the NSWindow, but this turned out to be too late, as we had already recived an initial paint event by then as part of showing the window. The visual result was a single frame of gray painted before the user's paint event code took effect. We solve this by hooking into setInitialFirstResponder on the NSWindow, which is called as part of making the window visible for the first time. At this point it's safe to attach the GL context to the NSView, so we iterate all the GLWidget children of the top level window and make sure the context is attached by sending a MacGLWindowChange event. The check in qt_mac_update_child_gl_widgets() for a top level window had to be removed for this approach to work, but should be okey as we're only iterating the children. Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com> Reviewed-by: Trond Kjernåsen <trond.kjernasen@nokia.com>
* Fix memory leak.Sarah Smith2010-08-121-3/+8
| | | | | | | | | | | Mac only bug - run examples/opengl/overpainting under leak detect instrument on Mac OSX to see it. Memory leak in any application that called getProcAddress() - CFStrings have to be cleaned up if the name of the function you got them from contains the word "Create" - and we weren't doing that. Reviewed-by: Gunnar Sletta
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Kim Motoyoshi Kalland2010-02-091-2/+0
|\ | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| * Fixed bug where GL widget was not fully updated on Vista.Kim Motoyoshi Kalland2010-02-041-2/+0
| | | | | | | | | | | | | | | | | | There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-48/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix broken QGLWidget::renderPixmap on Mac/CarbonMorten Johan Sørvig2010-01-081-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task: ed2a03b3bc85be056eca87928d18a746faa07bca Reviewed-by: Trond Commit ed2a03b3bc85be056eca87928d18a746faa07bca removed all QuickDraw code and made QPixmap::macQDHandle() return 0 in all cases. Unfortunately QGLWidget::renderPixmap() depended on macQDHandle returning a valid handle, causing it to break. Fix this by inserting the macQDHandle implementation were we would call macQDHandle before. This is the only place in Qt where macQDHandle is used.
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| * | Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Remove QGLShareRegister and transfer its functionality to QGLContextGroupRhys Weatherley2010-01-041-1/+1
|/ / | | | | | | | | Task-number: QT-2600 Reviewed-by: Samuel
* | Fix memory leak.Morten Johan Sørvig2009-11-121-0/+1
| | | | | | Revby: Gunnar
* | Performance: reduce TLS overhead of QGLContext::currentContext()Rhys Weatherley2009-09-141-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update license headers again.Jason McDonald2009-09-091-4/+4
|/ | | | Reviewed-by: Trust Me
* 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
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Reparenting QGLWidgets did sometimes caused warnings to be printed onTrond Kjernåsen2009-04-151-1/+1
| | | | | | | | | | Mac/Cocoa. Check if the view is visible before attaching it to a context. Task-number: related to 250066 Reviewed-by: Norwegian Rock Cat BT: yes
* BT: Fix Cocoa bug w/OpenGL widgets in dock widgets would disappear.Norwegian Rock Cat2009-04-151-23/+5
| | | | | | | | | | | | The NSOpenGLContext seems to be tied to the window. So if the view changes from one window to another, the OpenGL context needs to be cleared. We can do this by hooking into the viewWillChangeWindow and viewDidChangeWindow events and clear and reset the drawable respectively. We also found out that QCocoaOpenGLView was not being used at all, so just remove it to get rid of any confusion. Task-number: 250066 Reviewed-by: Trond
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+982