Capture OpenGL stream

Perhaps some of you know TechViz? essentially a tool to capture the OpenGL stream and visualize in a Cave, works for example with CAD programs like Catia and ProE..

I was wondering how one could do something similar..

I would like to access the OpenGL Stream and save the scene to HD, this way I could simply load the stored stream file and wouldn't have to start Catia or ProE..

The problem I think is an old one, it takes to much time to visualize stuff in a Cave.. and I am trying to do it a little faster, ProE with techViz takes too long to fire up (and is not allways very stable), exporting the ProE data in an Open format yields ugly results, and the native formats are all closed ones

Re: Capture OpenGL stream

You can intercept all OpenGL commands and store them with all paramteters in your own format to disk (incl. buffer data, textures, shaders for which the gl calls get pointers). Your app will have to replace the opengl dll or shared library and replace all gl commands. glIntercept and most gl debuggers use this approach to catch the gl commands for visualization, statistics etc.
The replay would be like a video and non-interactive as the stream has no knowledge of the datastructures. Not sure if it's useful, but doable.

Re: Capture OpenGL stream

Hmm, TechViz only takes the scene data (geometries, materials, lights) and visualizes them, the interaction is from techViz, the viewport/camera/navigation is also from techviz.

I am not sure they replace the opengl dlls.

To use their tool you have to tell it what OpenGL window to take the stream from, for instance I start ProE, open my ProE file, and then I start TechViz where I press a button and then I click on the main viewport of ProE.

I have no idea what happens in the background
I would like to make my own tool with C++/OpenGL, but I have no idea what exactly this OpenGL stream is (I expect the vertex lists, materials, etc..).