GLWpfControl Does Not Render for MajorVersion=4, MinorVersion=6 Not Even a Clear Blue Background
I was able to follow the Getting Started section and get that setup with a blue background for version MajorVersion=3, MinorVersion=3.
However, it does not seem like I can get GLWpfControl to display a clear blue background for MajorVersion=4, MinorVersion=6 for GLWpfControl v4.3.1 and OpenTK 4.8.2. The display is just black. OpenGL reports OpenGL Error: InvalidOperation but it is not a FramebufferErrorCode as that is reported as Complete. Neither Profile = ContextProfile.Core nor Profile = ContextProfile.Compatibility works.
If I revert to GLWpfControl v4.2.3 for MajorVersion=4, MinorVersion=6 then no OpenGL Error is thrown but the screen is still black. Same is true for MinorVersion=1-6 on MajorVersion=4.
Then I cloned the example projects and neither the MainWindow example with Inset nor the TabbedMainWindowTest showed any drawing, only a black background.
Any suggestions on how to set this up properly?
What hardware are you running this on? Are you sure you have OpenGL 4+ support? Does your gpu+driver support the NV_DX_interop extension?
Hi, I have a similar issue - I cant render anything with the most up-to-dat version of the nuget (4.3.1) using any of the OpenGL versions - I'm getting only the black screen. I can get this to render only using nuget 4.2.3 and OpenGL version 3.1 or lower. I will much appreciate any hints on how I can make it work with the latest version. Is there any easy way to check which OpenGL versions are supported on my computer? The same with the NV_DX_interop?
What graphics cards do both of you run?
@jakubwlodarz93 are you able to run the example project?
@NogginBops, I am using a NVIDIA RTX2070 graphics adapter with driver 31.0.15.5212. From what I understand this supports NV_DX_interop.
I also have a Intel(R) UHD Graphics Adapter with driver 31.0.101.2114.
I did some additional testing:
- for GLWpfControl v4.2.3 both NVIDIA and Intel work.
- for GLWpfControl v4.3.1 only NVIDIA works but not Intel.
Ok that's progress. I introduced a Intel specific bug in the last update. Only problem is I don't have an intel graphics card to test on...
This issue seems to be related more to integrated graphics not intel specific while using intergrated gpu on my ryzen processor this bug appears, but setting in windows options to use dedicated gpu works fine, issue relates also to the framebuffer operations
I'm having this problem too. 4.2.3 runs correctly, when update to 4.3.0, it have a black screen. My GPU is AMD integrated graphics.
AMD Radeon(TM) 780M
Driver version: 31.0.14005.1004
Driver Date: 2023/7/20
DirectX Version: 12 (FL 12.1)
I use CodeXL to debug opengl error, the error information is:
It seems like this code have problem, in GLWpfControlRenderer:
I'm having this problem too. 4.2.3 runs correctly, when update to 4.3.0, it have a black screen.
My GPU is AMD integrated graphics.
AMD Radeon(TM) 780M
Driver version: 31.0.14005.1004
Driver Date: 2023/7/20
DirectX Version: 12 (FL 12.1)
I use CodeXL to debug opengl error, the error information is:
It seems like this code have problem, in GLWpfControlRenderer:
@NogginBops
Ok, great! I actually have access to Ryzen integrated graphics that I can test on. Will investigate this for 4.3.2.
So I have tried debugging this and I've started to form a theory on why this might not work.
What is happening is that OpenGL and DirectX are using different devices to create their resources, and then when registering these resources in NV_DX_interop it fails because the resources are created on different GPUs.
If I look in the tool DxCapsViewer I can see that my nvidia graphics card is listed as a DirectX 9 device but my AMD integrated graphics card only appears in DirectX 10+ APIs.
I've not been able to figure out how to make the AMD integrated graphics able to appear in the DirectX 9 device list yet. I've tried updating my drivers, but that didn't do it.
Is it really because multiple graphics cards are causing the inability to interact? On my laptop, which has only one AMD integrated graphics card, this problem also occurs.
I see. I do think what I said might still be an issue. I guess I should test if the older versions work on my integrated graphics
I am experiencing the same issue with 4.3.1 on Intel UHD on my i5-10400. Do you need any more info?
I also have the problem that version 4.3.1 simply renders black instead of the blue clear color. However, I don't have integrated graphics, but a dedicated AMD Radeon RX 580.
@Xerxes004 @insel-maz could you maybe try running the code in #131 and see if it works? It's my current attempt at fixing this issue.
@NogginBops Tab 1 now shows up properly but I get a crash when switching to Tab 2. Would you like me to post the stack trace here or in #131?
@NogginBops Tab 1 now shows up properly but I get a crash when switching to Tab 2. Would you like me to post the stack trace here or in #131?
So you can see one triangle? You can post the stacktrace in #131
@NogginBops Tab 1 now shows up properly but I get a crash when switching to Tab 2. Would you like me to post the stack trace here or in #131?
So you can see one triangle? You can post the stacktrace in #131
Correct, I see one triangle, and the background changes color as expected. I realize my "Tab 1, Tab2" terminology isn't very accurate, so specifically I see the triangle on "Control 1" tab. When clicking "Control 2" is when I see the exception.
Yeah ok, so multisampling seems to not work on AMD and Intel integrated graphics cards. Not sure why this is, would be great to know if it's a driver bug or if it's our API usage that is wrong.
@Xerxes004 @insel-maz could you maybe try running the code in #131 and see if it works? It's my current attempt at fixing this issue.
The issue remains for me. No crash but a black background for tab "Control 1" and tab "Control 2". Tag 4.2.3 is the last version that works for me. My system is quite old (PCIe 2.0), which may be the cause.