I would like to implement a raymarcher which is interactive and able to render in real-time. To make this work without artifacts I assume I need to utilize double-buffering.
In another project I do "standard" 3d graphics with Xlib for creating a window and GLX for OpenGL.
At first I was thinking that using only Xlib would suffice for doing real-time graphics on the CPU but searching around the web and reading the documentation I get the impression that it's not really supported. Apparently Xlib on its own doesn't even do double-buffering.
I'm a bit at a loss on what system API I should be using in order to do what I want. Basically I just need some piece of memory that I can write to that gets displayed on a window.
I've been contemplating going for OpenGL instead and upload a texture every frame or something like that. I know you can implement a raymarcher in a fragment shader like they do on Shadertoy but in my case would like to be able to manipulate the contents of the scene through a UI, like adding primitives and moving them about, and more advanced things if I get that far.
Primarily I'm wondering how other's would approach software rendering on Linux and secondly, if in my case I'd be better off just trying to make it work on the GPU instead.