Rendering WITHOUT a window and retrieving the pixels.

Started by ManuelBrotz, June 02, 2015, 17:55:01

Previous topic - Next topic

ManuelBrotz

Hello

I want to render a picture WITHOUT displaying it in a window (using LWJGL 3). So i don't need a window at all.

Can anybody point me to some resources about that? All i have found so far is about rendering into the default framebuffer which is displayed in a window... I have trouble finding anything about creating a windowless context and rendering into a backbuffer, so that i can retrieve its pixels to work with them on the host cpu.

I have a working solution with JOGL but i would rather use LWJGL 3, if that's possible.

Thank you very much!

Manuel Brotz

spasi

Call glfwWindowHint(GLFW_VISIBLE, GL_FALSE) before creating a GLFW window. You can then use the window's context for rendering and never have to make it visible. This is the preferred way to create an offscreen OpenGL context (vs legacy solutions like pbuffers).

ManuelBrotz

Thank you so much!

I expected, there would be a special way of handling that, but i'll go with that solution.

Manuel Brotz