ottertino415 · 2022-03-11 23:58
I'm on mac osx and kind of experimented with emacs browsers, I found that I can compile emacs with xwidget's but mac osx version is quite unstable and most other solutions depends on webkitgtk which is not exactly working on mac's, so I experiment little bit with electron offscreen rendering and I'm able to get image of site on every rerender. I managed to successfully save it to file on every rerender and then show it from there in emacs using image-mode. Question is, can I do it more directly without filesystem? Send somehow image through stdio to emacs and render using image-mode? What would you recommend?
astoff1 · 2022-03-12 18:23
I suggest checking how pdf-tools works.
arthurno1 · 2022-03-12 21:44
What kind of interactive graphics are you looking for? You can do svg via svg.el which uses librsvg to do the rendering. I am not sure how fast it is, if it would do for a platformer, but you can probably achieve some decent interactivity. If it is enough or not, depends on your expectations and use-case.
There is also a [module to do OpenGL](https://github.com/Jimx-/emacs-gl). You will have to compile the module yourself, but it shouldn't be too hard. No idea though how well, if at all, it works on macos.
There is also this [guy with EAF](https://github.com/emacs-eaf/emacs-application-framework). I have never used it myself, but it seems to expose Qt, which should give you lots of opportunity. I don't know how simple/difficult it is to get it going, and how well it works on macos.
> Question is, can I do it more directly without filesystem? Send somehow image through stdio to emacs and render using image-mode?
Well, stdio means file system, stdin/out/err are files. You can start process directly from Emacs and get back result.
ottertino415 · 2022-03-12 23:14
Thank you, I will check it out.
ottertino415 · 2022-03-12 23:21
As I said, I'm thinking about using offscreen electron as browser. I tried eaf some time ago and I think I did not managed to get it work or it was too unstable (like actual xwidget webkit implementation on mac osx). I found that opengl but that is based on xwidget, but maybe I could render screen as texture? I will first try to find extensionless solution and maybe then.