Fork me on GitHub

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?


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


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.


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


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


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


That's when using renderer abstraction


There's an example of that somewhere...


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.