Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Deploying Qt3D application using MinGW 32. Unable to find renderer plugin for opengl
Forum Updated to NodeBB v4.3 + New Features

Deploying Qt3D application using MinGW 32. Unable to find renderer plugin for opengl

Scheduled Pinned Locked Moved Solved Game Development
7 Posts 4 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by 8Observer8
    #1

    When I run my simple example in debug mode from Qt Creator I see these messages:

    QString::arg: Argument missing: " Max Work Group Size: 1536, 1024, 64\n Max Work Group Count: 65535, 65535, 65535\n Max Invocations: 65535\n Max Shared Memory Size: 1536\n" , 49152 QObject::connect(QOpenGLContext, Unknown): invalid nullptr parameter
    My program works fine:

    BulletQt3DCpp.gif

    And when I switch to Release mode I see the same behavior like above. But I what to make a standalone application for running on another computers without Qt.

    I added this dll-files to Release folder:

    platforms/qwindows.dll
    libgcc_s_dw2-1.dll
    libstdc++-6.dll
    libwinpthread-1.dll
    Qt5Concurrent.dll
    Qt5Core.dll
    Qt5Gamepad.dll
    Qt5Gui.dll
    Qt5Network.dll
    Qt53DCore.dll
    Qt53DExtras.dll
    Qt53DInput.dll
    Qt53DLogic.dll
    Qt53DRender.dll
    

    But when I try to run Release version from Qt Creator I get this message in console:

    Unable to find renderer plugin for opengl
    23:00:29: The program has unexpectedly finished.
    

    And I get this exception:

    BulletQt3DCpp_FailFastException.png

    Fail Fast Exception. A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.
    

    My source code:

    Bullet3Qt3D.pro

    QT       += 3dcore 3drender 3dlogic 3dextras
    
    INCLUDEPATH += "E:\Libs\Bullet3-2.89\include"
    
    LIBS += -L"E:\Libs\Bullet3-2.89\lib"
    LIBS += -lBulletDynamics -lBulletCollision -lLinearMath
    
    SOURCES += \
        main.cpp
    
    RESOURCES += \
        Models.qrc
    

    main.cpp

    #ifdef _WIN32
    #include <windows.h>
    extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
    extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
    #endif
    
    #include <QGuiApplication>
    #include <QEntity>
    #include <Qt3DWindow>
    #include <btBulletDynamicsCommon.h>
    #include <QCamera>
    #include <QPointLight>
    #include <QTransform>
    #include <QSceneLoader>
    #include <QOrbitCameraController>
    #include <QPhongMaterial>
    
    int main(int argc, char *argv[])
    {
        QGuiApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
        QGuiApplication app(argc, argv);
        Qt3DExtras::Qt3DWindow view;
        view.setGeometry(500, 100, 270, 270);
    
        Qt3DRender::QCamera *camera = view.camera();
        camera->lens()->setPerspectiveProjection(60.0f, view.width()/(float)view.height(), 0.1f, 1000.0f);
        camera->setPosition(QVector3D(0.0f, 0.0f, 30.0f));
        camera->setViewCenter(QVector3D(0.0f, 0.0f, 0.0f));
    
        Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity;
    
        Qt3DCore::QEntity *lightEntity = new Qt3DCore::QEntity(rootEntity);
        Qt3DRender::QPointLight *pointLight = new Qt3DRender::QPointLight(lightEntity);
        Qt3DCore::QTransform *lightTransform = new Qt3DCore::QTransform(rootEntity);
        lightTransform->setTranslation(QVector3D(10.0f, 20.0f, 30.0f));
        lightEntity->addComponent(pointLight);
        lightEntity->addComponent(lightTransform);
    
        Qt3DCore::QEntity *cubeEntity = new Qt3DCore::QEntity(rootEntity);
        Qt3DRender::QSceneLoader *sceneLoader = new Qt3DRender::QSceneLoader(cubeEntity);
        sceneLoader->setSource(QUrl("qrc:/Models/Cube.obj"));
        cubeEntity->addComponent(sceneLoader);
        Qt3DCore::QTransform *cubeTransform = new Qt3DCore::QTransform(cubeEntity);
        cubeTransform->setScale(7.0f);
        cubeEntity->addComponent(cubeTransform);
        QStringList list = sceneLoader->entityNames();
    
        Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(rootEntity);
        rootEntity->addComponent(material);
    
        Qt3DExtras::QOrbitCameraController *cameraController = new Qt3DExtras::QOrbitCameraController(rootEntity);
        cameraController->setCamera(camera);
        cameraController->setLookSpeed(180.0f);
        cameraController->setLinearSpeed(50.0f);
    
        view.setRootEntity(rootEntity);
        view.show();
        return app.exec();
    }
    
    1 Reply Last reply
    1
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by
      #2

      I solved this problem. I copied the folder "renderers/openglrenderer.dll" to the release folder from "C:\Qt\5.15.0\mingw81_32\plugins"

      1 Reply Last reply
      2
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by
        #3

        These is a list what you need to move your Qt3D application on another computer. It requires 48 MB

        ListOfLibsForQt3D.png

        1 Reply Last reply
        2
        • N Offline
          N Offline
          n8behavior
          wrote on last edited by
          #4

          Exactly what I needed...tx!

          1 Reply Last reply
          1
          • A Offline
            A Offline
            AtomicZons
            wrote on last edited by
            #5

            Hi @8Observer8,
            thanks for providing the answer to your own question!
            In your case, does the solution also remove the "Argument missing" and "invalid nullptr parameter" messages?
            In my case it did not and I am wondering wether they are potentially problematic or not.
            Cheers

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vmetayer
              wrote on last edited by
              #6

              Hi, thanks for the answer to this problem.

              I ran into it while trying to use QT3D for Qt6, even after copying the plugins folder.
              I found the solution so i post it here for anyone having this problem with Qt6 :

              Qt6OpenGL.dll should also be copied next to the executable for it to work.

              1 Reply Last reply
              0
              • 8Observer88 Offline
                8Observer88 Offline
                8Observer8
                wrote on last edited by 8Observer8
                #7

                I built Qt to static release and compressed EXE using UPX. My EXE has only 7 MBytes. But I use pure OpenGL without Qt3D.

                8087a39e-0f00-4d58-9762-fe0f4646ad86-image.png

                Cube_OpenGLES20_Qt5Cpp.zip

                ea3efd6a-60aa-4340-a0d5-0aeb4f343d5b-image.png

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved