Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventLoop on main thread? #1

Open
virtualritz opened this issue Jul 28, 2020 · 3 comments
Open

EventLoop on main thread? #1

virtualritz opened this issue Jul 28, 2020 · 3 comments

Comments

@virtualritz
Copy link

This looks interesting. Unfortunately it won't run on macOS:

15:16:09 [INFO] added graph a795c3e9-0a2f-48bf-a9e2-03378e8e59b8 : Canvas with 1 versions to internal library
15:16:09 [INFO] added graph fd41d8ef-d10f-4499-8a90-35b73d8ff246 : Log with 1 versions to internal library
15:16:09 [INFO] added internal libraries to catalogue
15:16:09 [INFO] searching in /Users/moritz/code/ProcFlow/data for libraries
15:16:09 [INFO] added graph info /Users/moritz/code/ProcFlow/data/boot/boot: Proc Flow Boot Loader with 1 versions
15:16:09 [INFO] added graph info /Users/moritz/code/ProcFlow/data/graphics/graph_canvas: Proc Flow Graph Canvas with 1 versions
15:16:09 [INFO] added application libraries to catalogue
15:16:09 [INFO] searching in /Users/moritz/Documents/ProcFlow/Libraries for libraries
15:16:09 [WARN] could not walk directory: /Users/moritz/Documents/ProcFlow/Libraries: IO error for operation on /Users/moritz/Documents/ProcFlow/Libraries: No such file or directory (os error 2)
15:16:09 [INFO] added document libraries to catalogue
15:16:09 [INFO] boot sequence initiated for graph a795c3e9-0a2f-48bf-a9e2-03378e8e59b8 version 1
15:16:09 [INFO] graph a795c3e9-0a2f-48bf-a9e2-03378e8e59b8 found in catalogue with name Canvas
15:16:09 [INFO] internal graph a795c3e9-0a2f-48bf-a9e2-03378e8e59b8 : Canvas version 1 node actor spawned
15:16:09 [INFO] engine send value
15:16:09 [INFO] controller send value
15:16:09 [INFO] canvas recv
15:16:09 [INFO] engine value sent
15:16:09 [INFO] canvas edit
thread '<unnamed>' panicked at 'On macOS, `EventLoop` must be created on the main thread!', /../winit-0.22.2/src/platform_impl/macos/event_loop.rs:46:17

Would you consider changing this?

@Skareeg
Copy link
Owner

Skareeg commented Sep 21, 2020

Apologies for not getting back on this. The project runs primarily on Windows _at the moment just due to the nature of running an event loop on a different thread than main. I actually just got done creating an issue on the Amethyst game engines' tracker for allowing such a modification on their project.

The reason for this error is that I am using the Windows winit extension to launch a window when an actor in the axiom actor library gets run. I am actually considering moving the windowing and graphics elements to main thread, but that will take some time. (Ideally I could just keep them there with the node) By moving the window to the main thread where the engine structure itself is run, I can drop the Windows extension from the event loop and it will be cross-platform then.

Finally, this project can run nodes in a graph somewhat decently, but this entire project is in an experimental phase, so don't expect an actual product yet. The goal for this project is to offer an MIT licensed node based procedural editor that is designed to offer some functionality similar in nature to Houdini and Substance Designer. Ideally, I can keep everything library oriented so that the engine can itself be used at runtime within a game or other application as well, hence why I was trying to launch a windowed event loop in the child actor thread.

TLDR; It works in Windows right now and is not cross-platform.

@virtualritz
Copy link
Author

The goal for this project is to offer an MIT licensed node based procedural editor that is designed to offer some functionality similar in nature to Houdini and Substance Designer.

That's exactly what I'm interested in. Basically there is no nice standalone shader editor for OSL and as an ex- professional shader writer writing one in Rust is a pet project in the back of my head.
I also like building little side projects that almost all could benefit, each, from just slapping a node editor on top. :]
I'm a Linux guy but I do most of my work on a small, 2014 MBP these days as I often work from god-knows-where. Hence my interest for getting this to run 'elsewhere'. :)

@Skareeg
Copy link
Owner

Skareeg commented Sep 21, 2020

Understood. I will keep this issue open for now, and close it once I get the window on the main thread. This really is a pet project at the moment, so expect a great deal of delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants