Skip to content

More graceful way to see if OpenGL is supported or not #112

@MikaelStalvik

Description

@MikaelStalvik

When trying to initialize the GLWpfControl on a device (VirtualBox for example) which does not support OpenGL, a hard exception is thrown: "OpenTK.Windowing.GraphicsLibraryFramework.GLFWException: WGL: The driver does not appear to support OpenGL"

Stack trace
OpenTK.Windowing.GraphicsLibraryFramework.GLFWException: WGL: The driver does not appear to support OpenGL at OpenTK.Windowing.Desktop.GLFWProvider.<>c.<.cctor>b__10_0(ErrorCode errorCode, String description) at OpenTK.Windowing.GraphicsLibraryFramework.GLFWNative.glfwCreateWindow(Int32 width, Int32 height, Byte* title, Monitor* monitor, Window* share) at OpenTK.Windowing.GraphicsLibraryFramework.GLFW.CreateWindow(Int32 width, Int32 height, String title, Monitor* monitor, Window* share) at OpenTK.Windowing.Desktop.NativeWindow..ctor(NativeWindowSettings settings) at OpenTK.Wpf.DxGlContext.GetOrCreateSharedOpenGLContext(GLWpfControlSettings settings) at OpenTK.Wpf.DxGlContext..ctor(GLWpfControlSettings settings) at OpenTK.Wpf.GLWpfControlRenderer..ctor(GLWpfControlSettings settings) at OpenTK.Wpf.GLWpfControl.Start(GLWpfControlSettings settings) at MyApp.UserControls.ShaderUserControl.InitControl()

Feature request
Could it be possible to add a method that can check if OpenGL is supported or not, which can be invoked prior to the GLWpfControl.Start call to more gracefully handle devices that does not support OpenGL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions