I would like to perform some 3D rendering on my Debian machine and bring the result into client-side memory.
I've created a C++, GLX, and GLEW based application that does not require a window. I get a display with glXOpenDisplay
, use it to find a proper framebuffer with glXChooseFBConfig
(passing the DefaultScreen
of the display), obtain visual info with glXGetVisualFromFBConfig
, and pass the relevant information to glXCreateContext
. I make that context current & initialize GLEW.
As a starting test, I'm simply clearing the default framebuffer with a variety of colors; I would like to now query the result pixel-by-pixel, presumably with glReadPixels
.
But this is where I seem to be fundamentally misunderstanding something: What are the dimensions of the default framebuffer? I never define an initial height or a width for it, and I'm not seeing a way to do so.
Answers such as this one imply the window "defines" the dimensions. In my application, is the DefaultScreen
defining the dimensions? If that's the case, what can I do to make the default framebuffer larger than a particularly small screen?