One FBO for several windows

Hello,

I’m working with Linux and Nvidia drivers, to process videos with OpenGL. I use Glut.
I want to build, in an offscreen buffer, a mosaic composed with images sent by a moving camera.
Then I want to use this buffer as a texture to make different renderings in several independent windows.
This works well with only one window. I use a texture attached to an FBO for the offscreen buffer. Then the texture is rendered with a glQuad and a shader in the output window.

How can I use the same texture to make a rendering in a second window ?

Thank you.

You need your windows to share contexts (assuming they’re on the same graphics card or screen). Then they will have access to the same textures.

I’m not sure how you do that with GLUT, but with GLX you specify a share context when you create a context.

Bruce

I understood that glut encapsulates all the glx primitives and make easier the building of windows.
Can I use only glx for building windows ?
Is it then possible that the windows share contexts and use the same texture ?

You can use X API to manage your windows and glx to manage OpenGL.

It seems like the only way with Glut is to modify the glu sources:

http://www.cg.its.tudelft.nl/~paul/glut.html

GLX and X Windows are a bit of hassle, but certainly work. You can still use some glut stuff, probably primitives, but maybe not the drawing loop etc.

Bruce

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.