asny / three-d

2D/3D renderer - makes it simple to draw stuff across platforms (including web)
MIT License
1.34k stars 110 forks source link

Access violation using headless context #468

Closed NoodlesOfWrath closed 2 months ago

NoodlesOfWrath commented 3 months ago

I encountered an access violation while using the headless context. I created a minimum reproducible example here.

Run Instructions

asny commented 3 months ago

I'm very unsure what you want to do. You created an eframe window app and a headless rendering context. I don't think that combination will work. Either you want to do headless rendering (no rendering to the screen) and use a headless context or you want to render to the screen and use a normal context.

Btw, I get this error:

`winit` requires control over the principal class. You must create the event loop before other parts of your application initialize NSApplication

Which means that you need to create an event loop if you want to use eframe, the headless context does not do that.