GLFW fails to create context

Discussion in 'Windows Virtual Machine' started by remi1, Apr 11, 2023.

Tags:
  1. remi1

    remi1 Bit poster

    Messages:
    1
    Hi,
    I am currently trying out Parallels for having a Windows 11 dev to code my currently Windows only application while on vacation and my own laptop being in repair having to fall back on my mums Mac book. I am writing an application using GLFW and I have run the code successfully on my own Windows 10 PC, but ran into an issue on the Windows 11 VM.

    GLFW fails to create an OpenGL context and using an error callback I narrowed it down to this error: [65544] WGL: Failed to retrieve pixel format attributes: The operation completed successfully.

    I've tried the following to fix the issue:
    - Change the glad loader
    - Change the OpenGL hints and version hints including checking the supported versions using glcapsviewer
    - Launch the VM using video.gl3=0
    - Download random sample code removing all program logic and tried running a bare bones GLFW application in my project

    I know this error could be my fault and I could be doing something very wrong here, but I have been trying to get to the root of this for almost two days now and I have made almost no progress.

    Thank you for taking the time to read this c:
    remi
     
  2. SkylarP

    SkylarP Bit poster

    Messages:
    2
    I am also having issues running OpenTK/GLFW on Windows 11.

    Code:
    Unhandled exception. System.DllNotFoundException: Unable to load DLL 'glfw' or one of its dependencies: The specified module could not be found. (0x8007007E)
       at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError)
       at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
       at OpenTK.Windowing.GraphicsLibraryFramework.GLFWNative.LoadLibrary(String libraryName, Version version, Assembly assembly, Nullable`1 searchPath)
       at OpenTK.Windowing.GraphicsLibraryFramework.GLFWNative.<>c.<.cctor>b__3_0(String name, Assembly assembly, Nullable`1 path)
       at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
       at OpenTK.Windowing.GraphicsLibraryFramework.GLFWNative.glfwInit()
       at OpenTK.Windowing.GraphicsLibraryFramework.GLFW.Init()
       at OpenTK.Windowing.Desktop.GLFWProvider.EnsureInitialized()
       at OpenTK.Windowing.Desktop.NativeWindowSettings..ctor()
       at Everdeep.Engine.Application.Window.<>c__DisplayClass76_0.<.ctor>b__0() in ./Src/Application/Window.cs:line 138
    [16:07:42.4485] [Client] [Error] Critical Error in main loop
    DllNotFoundException: Could not load the dll 'openal32.dll' (this load is intercepted, specified in DllImport as 'AL').
    ==== BEGIN STACK TRACE ====
       at IntPtr OpenTK.Audio.OpenAL.ALLoader.ImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
       at IntPtr System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(string libraryName, Assembly assembly, bool hasDllImportSearchPathFlags, uint dllImportSearchPathFlags)
       at ALDevice OpenTK.Audio.OpenAL.ALC.OpenDevice(in string devicename)
       at void Everdeep.Engine.Audio.AudioManager.PreInit() in ./Src/Audio/AudioManager.cs:line 151
       at void Everdeep.Engine.Application.EverdeepClient.PreInit() in ./Src/Application/EverdeepClient.cs:line 133
       at void Everdeep.Engine.Application.EverdeepCommon.Mainloop() in ./Src/Application/EverdeepCommon.cs:line 209
       at void Everdeep.Engine.Program.Main(string[] args) in ./Src/Program.cs:line 49
    ==== END STACK TRACE ====
    
    Wondering if anyone has run into a similar issue or might know how to fix this!
     

Share This Page