opentk / GLWpfControl

A fast native control for OpenTK 4.x + 3.x on WPF.
MIT License
196 stars 49 forks source link

Can't create control on Intel integrated gpu #136

Open Krugpelke opened 2 months ago

Krugpelke commented 2 months ago

GPU - Intel UHD Graphics 630 GLWpfControl - 4.0.0 - 4.3.2 Can't create GLWpfControl, DXOpenDeviceNV returns an empty GLDeviceHandle, DXInterop.GetLastError shows -1073283022 and Marshal.GetLastWin32Error shows 0, so not sure why this is happening. Previously I thought that this might be due to missing NV_DX_interop support, but Wgl.Arb.GetExtensionsString does show this string. I've tried changing multisampling samples, opengl version from 3.0 to 4.6 and context profiles, but neither seems to have any impact.

Krugpelke commented 2 months ago

So this is either integrated+dedicated gpu issue, or a multi-monitor issue. I've successfully created and rendered the example project (except with multisampling enabled) after specifying to only use the integrated card in bios and starting the pc with a single monitor. I'll test more when I get to pcs with only integrated gpus.

Krugpelke commented 2 months ago

This is what I tested with the example project:

iGPU+dGPU PC with two monitors

iGPU PC with two monitors

iGPU+dGPU laptop

Interesting thing to note though, when rendering on iGPU, everything seems to render correctly but the debug callback is actually showing this error: [DebugSeverityHigh source=DebugSourceApi type=DebugTypeError id=1282] Error has been generated. GL error GL_INVALID_OPERATION in FramebufferRenderbuffer: (ID: 1914656587) Generic error This happens at ReallocateFramebufferIfNeeded when trying to attach depth-stencil renderbuffer to framebuffer.