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

Modern rendering engine for user interfaces #2

Open
nical opened this issue Oct 15, 2018 · 3 comments
Open

Modern rendering engine for user interfaces #2

nical opened this issue Oct 15, 2018 · 3 comments

Comments

@nical
Copy link

nical commented Oct 15, 2018

Filing this for a focused discussion on the needs of GUIs which appears to be a popular topic. I'll chime in when I have a bit of time.
There has been a lot of discussion about what people want from a GUI toolkit in the past (note to self to dig up the reddit and internals forum links). Perhaps we should try to keep an eye on solutions and feasibility in this thread to maximize the chance of moving some things forward.

This was referenced Oct 15, 2018
@sophistifunk
Copy link

I've been lurking, just thought I'd put in my 2c.

My background: new to Rust, and have very little hands-on experience writing code for GPUs. I do have a very long history of consuming APIs for graphics and GUIs though. I've built many custom components over the years on many different platforms / frameworks.

I would like to suggest a good target for this effort would be something very similar to the Flash display list / scene graph. A "retained-mode" scene graph, consisting of painted nodes, transforms, filters, and clipping regions. Of course the API would have to be "rusted"- probably want to separate the tree structure from the node attributes, things of that nature. But you basically give it a tree of nodes, it takes care of compositing and moving pixels to the screen, gives you some interaction events, and you can ask it to transform local<->global coordinates any time you need to. It has no notion of component lifecycles, animation, stylesheets, or anything like that. Consider it akin to Flutter at the "layer" layer.

Using something like this, higher level frameworks analogous to Flex or React or Vue could make their own decisions about layout, component invalidation, cascading styles, lifecycle, etc, while those who want more direct control for simplicity or performance can simply manipulate the scene graph themselves. It would probably make a great platform to host v8 with a port of React, for example.

Happy to elaborate on my thoughts and experiences if anybody's interested, or to go back to lurking if I'm just adding noise and not value :)

@derekdreery
Copy link
Member

Happy to elaborate on my thoughts and experiences if anybody's interested, or to go back to lurking if I'm just adding noise and not value :)

Definitely adding value, as is everyone else!

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

4 participants