3 ms·
If you really want to go barebones, just mmap /dev/fb0 and do a memset 0 on the region of screen that you want black. Key/pointer events are a matter of reading
by 10000truths 6y ago
If you really want to go barebones, just mmap /dev/fb0 and do a memset 0 on the region of screen that you want black. Key/pointer events are a matter of reading files from /dev/input.
- DonHopkins 6y agoYeahhhh!!! That's what FORTH is for! https://donhopkins.com/home/archive/forth/cg/cg.f https://donhopkins.com/home/archive/forth/cg/cg.f
- enriquto 6y agoHa! But I want to open a window, if possible portably between linux and windows (just like glut was). It seems to me that we are adding a lot of complexity and going backwards feature-wise.
- sitic 6y agoGLUT (in the form of freeglut [1]) still exists (last commit is from February) and works on all major (desktop) operating systems. GLFW [2] is however much more wildly used these days and pretty much the spiritual successor of GLUT. ImGUI can run on top off all of them and doesn't provide the features (window/context creation, event handling) they do. [1] http://freeglut.sourceforge.net/ http://freeglut.sourceforge.net/ [2] https://www.glfw.org/ https://www.glfw.org/
- enriquto 6y agoI still use freeglut and am mostly happy with it. Yet, I'm often mocked by my colleagues for that reason. I tried GLFW but I don't see the point of this library whose main raison d'être seems to be "not be freeglut" while having nearly identical features. Besides, the fact that it works with keycodes and not with letters is a bit annoying. The X server sends the key symbols but GLFW choses to ignore them, forcing the user to find them according to the current, difficult to find, keyboard configuration.