I found this interesting article where someone explains in detail how to make, with plain C code, a program that provides a screen (window) buffer where you can directly access every pixel in order to draw into the window what you like.
And it also shows how to integrate the open-source DOOM code (which is also in C), with changing only a few lines, to make it work with that Fenster library code.