logoalt Hacker News

lstoddtoday at 6:55 AM0 repliesview on HN

> Even immediate-mode approach programs should just not be drawing new frames

They can't not. When the backend asks for a frame you give it a frame, or the result is not defined (a black rectangle instead of window content usually).

Even if you don't redraw anything at all it's still a 2d blit from gpu memory which is two triangles, a texture and sync object. Or you need to tell the window manager what's the window content this frame by any other way which also inevitably crossess process boundaries and thus is a bunch of syscalls. Plus you need to poll for input anyway.

edit: by "poll for input" I mean the literal poll() syscall. Which is ofc the basis of async and all. How else do you get to know there was any input?