humbleui

lilactown 2022-11-01T03:34:16.459129Z

I'm playing around with trying to render a component in isolation, instead of rendering from the root down. the thing I'm not sure about is how to get a reference to a Canvas object

lilactown 2022-11-01T03:48:32.321979Z

it seems like the canvas is a highly mutable thing that isn't save to keep a reference to

lilactown 2022-11-01T04:25:08.246369Z

for some reason I thought that humbleui wasn't meant to be immediate mode, but it seems like the state of the canvas needs to be re-built each re-render. there's not an engine for diffing and figuring out what exactly needs to change in a declarative way

Niki 2022-11-01T10:01:54.412679Z

Like dirty regions? No, I don’t think it makes sense in modern computers. It’s way faster to re-render everything from scratch

lilactown 2022-11-01T20:29:23.096509Z

maybe a stupid question: is there a difference between re-rendering everything from scratch, and "immediate mode" rendering?

Niki 2022-11-01T20:47:29.005839Z

depends on what you mean. Immediate mode UIs usually recreate whole components tree each frame. Immediate rendering is, I guess, rendering all from scratch?

lilactown 2022-11-02T14:11:16.317659Z

yeah I suppose that makes sense. my brain is broken by browser UIs, I'm trying to learn everything else now

lilactown 2022-11-02T14:12:13.511369Z

does ski(j)a then take care of figuring out how to draw all this stuff using the GPU?

Niki 2022-11-02T14:12:36.140589Z

Yes