Get the latest tech news
The Story Behind Fenster
Exploring how to use 2D graphics in various desktop operating systems, the old-school way. In this part we learn how to create an empty window under Linux, macOS and Windows.
Inside we would do things exactly like we did on macOS and Linux – we create an HBITMAP, configure information about its pixel format, and send framebuffer data to the canvas. Inside the main event loop on all three platforms users can now check for x/ y coordinates, mouse flag, a mod bitmask and keys status array. Unbelievable, but in less than 50 lines of code we got a fully working Doom game running on top of a tiny cross platform graphics library we’ve just created!
Or read this on Hacker News