Re:Rendering like it's 1996 – Baby's first pixel
by legosexmagic on Monday January 16, 2023 @02:30PM
(#34404531)
thats how it works. its called a swapchain and its usually more than one texture. to avoid artifacts.
Re:Rendering like it's 1996 – Baby's first pixel
by flohofwoe on Tuesday January 17, 2023 @03:31AM
(#34410353)
Setting up a correct swapchain, with correct frame timing and no microstutter, across Windows, Linux and macOS is a very non-trivial task though. This was no issue on 8-bit home-computers, and where it's basically a handful lines of assembly code to install a vsync interrupt service routine.
(modern GPUs gained performance at the cost of latency, but a lot of the complications are also just pointless over-engineering on the software side)
Re:Rendering like it's 1996 – Baby's first pixel
by mananaysiempre on Monday January 16, 2023 @07:37PM
(#34407605)
The standard “hello Wayland” project[1] is basically that, using an interface called wl_shm. You still need to do some IPC in order to arrange for the environment to so that for you, obviously, so a library called libwayland-client handles the necessary Unix socket handshake, plus some more of that to tell the system you’re done with the buffer and want to submit it. It would be possible to isolate the first part into a reusable executable that performs it then execs you leaving a mmapable fd for the buffer, but the second you’d still need to do yourself. (Wayland isn’t willing to just use a pixel buffer you’re still writing to—indeed I don’t think GPUs can do that as opposed to requiring an explicit transfer to video memory.)
Would obviously require some setup, but that functionality could come standard with the OS instead of requiring countless libraries.
Also half the article is about setting up a build system.