Plugging OCC Visualization to other OpenGL rendering libraries

Hello!

I'm planning to start a small "project" (first some tests) of adding some visualization features to OCC, like GLSL shaders.

I open this thread to ask for different ideas, or how would you do, for displaying a OpenCascade shape into let's say a 3d application running its own opengl context. This could be a 3d application like Wings3d, that uses triangles or NURBS or a real-time render engine, like Irrlicht or Ogre.

I'm able to think of two levels of integration:

1) Rewriting opengl calls from the corresponding classes of OCC (terrifying!)
2) Using a fast meshing algorithm and send these triangles to the application/library (performance!)

What do you think about this? Any suggestion?

Thanks,

.alvaro.

P Dolbey's picture

Alvaro,

You might want to take a look at the FreeCAD source code, hosted on sourforge. Not happy with the rendering with the default OCC viewers, they rendered the objects through a Coin3d (OpenInventor like) engine. In Salome, the post-procesing model renders the resulting mesh through a VTK widget. These might give some idea about extracting geometry into other rendering libraries.

Pete

Alvaro's picture

Thanks! FreeCAD seems a good start point...
I've considered that other as well and indeed tried VTK.