Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How Can I use Hardware Rendering instead of Software Rendering with QtSDK 4.8.0 on Mac OS X Lion?



  • I was wondering if someone could help me with this.
    I have implemented OpenGL-based Qt application.
    The same program when run on Windows performs 10 times as fast.
    I think the problem is due to software rendering.
    Is there anything I need to do to actually get hardware rendering instead of software rendering with QT on Mac?

    1. Test Macs : macbook (2009) OS X Snowleopard, macbook (2011) pro OS X Lion, iMac (2011 mid) OS X Lion

    2. Xcode 4.2.1 Build 4D502 for OS X Lion
      gcc version 4.2.1 (Apple Inc. build 5666)

    3. QtSDK 4.8.0
      Install dmg : Qt_SDK_Mac64_online_v1_2_en.dmg (QtSDK 4.8.0)
      and
      Install source code compile : qt-everywhere-opensource-src-4.8.0.tar

    ./configure -prefix /Users/kyle.lee/QtSDK4.8.0 -arch x86_64 -framework -cocoa -platform macx-g++42 -no-qt3support -debug-and-release -opensource -opengl desktop -graphicssystem opengl -shared
    make
    sudo make install

    1. Test Result (Same Application)
      Windows Application Rendering Speed : 1~3 milliseconds
      Mac Application Rendering Speed : 100~500 milliseconds

    2. Timer
      I'm using timer as follows.
      QTimer->setInterval(15);

    • Set the graphics system as follows.
      main.cpp

    a. QApplication::setGraphicsSystem("opengl"); // error
    b. QApplication::setGraphicsSystem("raster"); // default
    c. QApplication::setGraphicsSystem("x11"); // the same speed as raster
    d. QApplication::setGraphicsSystem("native"); // the same speed as raster

    "opengl" setting is crash.
    the others setting are same speed as default.


Log in to reply