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. Error in Qt 6.2.0: Qt3D.Renderer.OpenGL.Backend: bool Qt3DRender::Render::OpenGL::GraphicsContext::makeCurrent(QSurface*) makeCurrent failed
Forum Updated to NodeBB v4.3 + New Features

Error in Qt 6.2.0: Qt3D.Renderer.OpenGL.Backend: bool Qt3DRender::Render::OpenGL::GraphicsContext::makeCurrent(QSurface*) makeCurrent failed

Scheduled Pinned Locked Moved Solved Game Development
2 Posts 1 Posters 758 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
    #1

    Hello,

    I have this error in Qt 6.2.0:

    Qt3D.Renderer.OpenGL.Backend: bool Qt3DRender::Render::OpenGL::GraphicsContext::makeCurrent(QSurface*) makeCurrent failed
    

    I created "Qt QWidgets Application". I deleted the Widget class. I added this modules in .pro: QT += 3dcore 3dextras

    main.cpp

    
    #include <QtWidgets/QApplication>
    #include <Qt3DExtras/Qt3DWindow>
    
    class Widget : public Qt3DExtras::Qt3DWindow
    {
    public:
        Widget()
        {
            setTitle("Qt3D");
            resize(500, 500);
        }
    };
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        Widget w;
        w.show();
        return a.exec();
    }
    
    1 Reply Last reply
    0
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by
      #2

      When I wrote this question I understood the answer. I forgot to add activation of second video of my laptop at the beginning of main.cpp:

      #ifdef _WIN32
      #include <windows.h>
      extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
      extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
      #endif
      
      1 Reply Last reply
      1

      • Login

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