View Full Version : Capture OpenGL stream

03-07-2012, 07:07 AM
Hi OpenGL Forum!

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 :(

Any thoughts how to grab that OpenGL stream?^_^

03-07-2012, 07:14 AM
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.

03-07-2012, 08:17 AM
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 :p
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..).

03-07-2012, 09:59 AM
BuGLE is capturing the OpenGL commands with the trace filter:

BuGLE is a free software under the GPL, so you can get the source code and figure out how it implements the command call capture.


03-07-2012, 10:53 AM
thank you very much for your answers!
I'll try those tools, perhapst I can simply parse the log file from bugle, who knows :)

..if I understand correctly then all those tools use some kind of library substitution, if anyone knows of another method.. but I think thats it.

11-27-2012, 11:02 PM
..if I understand correctly then all those tools use some kind of library substitution, if anyone knows of another method.. but I think thats it.

Detour from Microsoft also re-routs command stream I guess. Also chromium seems to have streaming capabilities. Have you tried any of these?