Hey,
I'd like to complete the ebiten backend a bit further to be able to use it as backend in giu ( see: AllenDang/giu#1001 ).
As far as I understand there are two problems now, one of which I do not understand.
- SetShouldClose is not implemented (cimgui_backend_impl.go:89-102)
The problem here is, that a window can not be closed the same way as with a GLFW window (which is closed by setting the shouldClose flag). Instead as I understand it within ebiten you can only terminate "the window" by returning a ebiten.Termination error from the Update function. That works in general, but... see 2)
- After Terminating a window I get an error I don't understand when creating a new one.
When opening a new window after closing the first one the line result.bgColorMagic.pkgMask1x1 = ebiten.NewImage(1, 1) (ebiten_backend.go:80) causes a panic because calling NewImage() cannot be called after RunGame finished (which it did because of closing the first window).
I don't understand why it complains about the NewImage() call when creating a new backend for the new window.
Any input and ideas are apprechiated.
Best,
Kalle
Hey,
I'd like to complete the ebiten backend a bit further to be able to use it as backend in giu ( see: AllenDang/giu#1001 ).
As far as I understand there are two problems now, one of which I do not understand.
The problem here is, that a window can not be closed the same way as with a GLFW window (which is closed by setting the shouldClose flag). Instead as I understand it within ebiten you can only terminate "the window" by returning a ebiten.Termination error from the Update function. That works in general, but... see 2)
When opening a new window after closing the first one the line
result.bgColorMagic.pkgMask1x1 = ebiten.NewImage(1, 1)(ebiten_backend.go:80) causes a panic because calling NewImage() cannot be called after RunGame finished (which it did because of closing the first window).I don't understand why it complains about the NewImage() call when creating a new backend for the new window.
Any input and ideas are apprechiated.
Best,
Kalle