Re:From scratch OpenGL and shaders with raw Xlib
by engeljohnb on Saturday March 30, 2024 @02:33PM
(#39877396)
I haven't done anything with X11 in a few years, but last I looked made no sense to do anything with XCB because the documentation is half complete, whereas Xlib has everything you might need documented.
[ Parent
| on HN ]
Re:From scratch OpenGL and shaders with raw Xlib
by toast0 on Saturday March 30, 2024 @03:38PM
(#39877907)
Otoh, Xlib's approach to networking is kind of wrong on so many levels.
> Calls that don't require a response from the X server are queued in a buffer to be sent as a batch of requests to the server. Those that require a response flush all the buffered requests and then block until the response is received. [1]
X11, the protocol is a distributed systems protocol, built on asynchronous message passing, that outputs to the screen as a side effect. Xlib hides the nature of the underlying protocol, and makes it very hard to pipeline things that should be pipelined for maximum performance. Xcb separates out sending a request and waiting for a response, so if you absolutely need the response before you continue, you can do that, but you can also request many things and then wait when you need them.