SP5: The specified window isn't an OpenGL window
See original GitHub issueBug Report
Issue: when I run a test project with .net framework 4.6.2 and set to build x64 taeget, it will crash
System.Windows.Markup.XamlParseException:“对类型“SkiaSharp.Views.WPF.SKGLElement”的构造函数执行符合指定的绑定约束的调用时引发了异常。”
GraphicsContextException: The specified window isn't an OpenGL window
( I tested it is ok on .net 6.0 )
Reproducing:
- follow WPF demo in this repo, create a WPF .net framework project
- add nuget pack to this project, version 5.0.2 beta
- add
<ScottPlot:WpfPlot Name="WpfPlot" />
toMainWindow.xaml
- add a target
x64
and changeAny CPU
to this - run, then crash at
InitializeComponent()
whole project here: ScottPlotTest.zip
System Details
- ScottPlot Version: 5.0.2 beta
- Operating System: Windows 10
- Application Type: WPF
- .NET Version: .net framework 4.6.2
last version(5.0.1 beta) works well
Issue Analytics
- State:
- Created 6 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
SDL_GL_CreateContext fails on MacOS Big Sur #4428
It works on MacOS Catalina and on Ubuntu. The error msg is: "Unable to create context: The specified window isn't an OpenGL window"....
Read more >Context creation fails - c++
So now when I execute the project, first I make the window (this is succesfull) and then I call the mainLoop procedure (from...
Read more >Context is NULL with SDL_CreateWindowFrom Win32
According to this thread it seems that creating OpenGL contexts from foreign windows isn't currently supported in SDL.
Read more >[SDL 1.3] Create Opengl Context without window?
Hi is it possible to create an opengl context in SDL 1.3 without a window? E.g. Create SDL Window Get Opengl Context from...
Read more >Difference between window and context? : r/opengl
A window is something you can draw to (a drawable). A context is kind of the "machine" that is doing the drawing. It...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
reason found: https://github.com/opentk/GLWpfControl/issues/103#issuecomment-1469591911
it’s GLWpfControl’s bug, not ScottPlot’s bug
https://user-images.githubusercontent.com/10357394/223733746-ef8ace0b-aaf6-41c3-ae82-0482a31ad169.mp4