cljfx

https://github.com/cljfx/cljfx
chrisn 2021-03-30T00:00:23.054300Z

I saw Skia's implementation but I do want to have a full UI toolkit and for 95% of the application cljfx fits the bill perfectly. When I get enough going I will put that on the list to benchmark and be sure about.

đź‘Ť 1
phronmophobic 2021-03-30T00:49:19.055300Z

I think cljfx would simplify distribution as well

chrisn 2021-03-30T14:39:02.058900Z

How are you managing redrawing your canvas when the user resizes the main window? Are you keeping a mirror of the window properties in an atom to force a redraw that way?

vlaaad 2021-03-30T14:40:27.059300Z

I put canvas’s width and height into app state, and listen to size changes to update the state. Then redraws will happen automatically on resize

chrisn 2021-03-30T14:58:09.059800Z

That makes sense. I am bit concerned about how smooth that will appear but since I am bouncing all the way to opengl and back anyway I don't think it can be butter smooth.

chrisn 2021-03-30T14:59:24.060Z

Does that coalesce rendering? For example does a single resize cause 2 render requests?

chrisn 2021-03-30T15:07:49.060200Z

Yes, it appears like it does with batching descriptions. This is great.

vlaaad 2021-03-30T15:11:54.060400Z

Not sure I understand the question, but you can request rendering million times per second from multiple threads, and it should preform redraws once per frame from javafx ui thread

vlaaad 2021-03-30T15:12:54.060600Z

That's when using renderer abstraction

vlaaad 2021-03-30T15:13:10.060800Z

There's an example of that somewhere...

chrisn 2021-03-30T15:21:26.061300Z

That is what I was looking for. If a user starts resizing the window then you can easily end up with too many events to render and some level of coalescing makes sense. Sorry of all the detailed questions, I am also going through the code to see what is going on.