Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create OpenGL context for format QSurfaceFormat #722

Closed
BlohoJo opened this issue Apr 3, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@BlohoJo
Copy link

commented Apr 3, 2019

Installed latest version (190228) on non GPU computer. It's Win7 x64, used installer shotcut-win64-190228.exe.

Get error on running. I was under impression this supported software emulation / non GPU?

opengl

Installation from this repository has libEGL.dll, libGLESv2.dll, and d3dcompiler_47.dll.

I have many applications that require OpenGL that I am able to run by simply copying a MESA software emulation opengl.dll into the application directory. That does not work with Shotcut. (I copied the MESA opengl32.dll into the Shotcut directory but the error above persists.) I see there is a opengl32sw.dll file in the Shotcut directory, the "sw" implying "software" so I assumed it was similar to MESA.

Is there any way to get this to run?

@BlohoJo

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

Just uninstalled and tried shotcut-win64-190127.exe. It works.

@ddennedy

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

I do not know why the new version does not work for you except that Qt, which uses OpenGL, was upgraded, and it might be using it in a way that is incompatible. Software OpenGL can be made to work. Find Qt::AA_UseSoftwareOpenGL on this page. I had a removed menu item for "Software" under Settings > Drawing Method because previously it did not work - probably due to a faulty build process. Now, in the new build, I just tested it, and it works (local 64-bit debug build)! I will re-enable it, and test the 32-bit and release builds. Yes, opengl32sw.dll is Mesa with llvmpipe.

@ddennedy

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

Software OpenGL enabled in 0bddee4

@ddennedy ddennedy added this to the v19.04 milestone Apr 12, 2019

@ddennedy ddennedy added the resolved label Apr 12, 2019

@ddennedy

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

Please test the beta, which adds Settings > Drawing Method > Software (Mesa).
https://github.com/mltframework/shotcut/releases/tag/v19.04.21

@ddennedy ddennedy closed this Apr 30, 2019

@ddennedy ddennedy changed the title OpenGL error Failed to create OpenGL context for format QSurfaceFormat May 6, 2019

@ddennedy

This comment has been minimized.

Copy link
Member

commented May 6, 2019

I have one system where the new Settings > Display Method > Software (Mesa) in version 19.04.30 works and another where it does not.

openglsw32.dll is a patched version of Mesa provided by Qt that does not appear to work reliably because I am now able to drop in the opengl32.dll from Mesa (mingw build), and it works on both systems. It does not work with the Shotcut Software setting, however, if you rename it opengl32sw.dll to overwrite the Qt-provided one.

If you, the reader got here because you switched to Display Method > Software to see what that is or if it is better, and now are stuck with the dreaded dialog
opengl error
Then, here is some information to revert your setting in the situation where one of the other Display Method options does partly work:

  • If you are using the Store app, you need to reset the app:
    1 - RIght click the app icon and choose More > App Settings...
    2 - Scroll down and click the Reset button (not Repair, the first one) under the Reset section.
  • If you are using the Windows installer, you can run the installer again and on a step near the end, there is a set of checkboxes with options:
    installer
    Click to enable the Remove Shotcut Settings from the Registry and continue.
  • If you are using the portable or comfortable to manually edit the registry:
    1 - start regedit
    2 - navigate to Computer\HKEY_CURRENT_USER\Software\Meltytech\Shotcut
    3 - look for the value opengl and delete it (resets to default) change it to:
  • If you have chosen to use an App Data Directory, there will be a registry value named appdatadir that is set, then you need to look for shotcut.ini in the specified folder, open it in a text editor, and remove or change theopengl key to one of:
    • 0 for Automatic
    • 15 for DirectX
    • 16 for OpenGL

@ddennedy ddennedy reopened this May 6, 2019

@ddennedy ddennedy removed the resolved label May 29, 2019

@ddennedy

This comment has been minimized.

Copy link
Member

commented May 29, 2019

Related Qt bug: https://bugreports.qt.io/browse/QTBUG-68407
I am trying to figure out a way for the user to get out of this hell in a more user-friendly way (not editing rergistry, resetting the app, or placing opengl32.dll).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.