using opengl code

I have and opengl modeler that Im rewriting in opencascade. Right now I have some very basic opengl code that displays a bitmap of the camera image in my application within the 3D View. Can I reuse this code in opencascade.


Forum supervisor's picture

Dear Derrek,

If there is not that much existing rendering code in your application, it is strongly recommended to migrate it to high-level OCCT visualization API from low-level OpenGL calls.
E.g. an image from a camera can be displayed using texture mapping.

Still it is possible to reuse existing OpenGL rendering code with OCCT visualization.
Applications can implement custom OpenGl_Element class and add it to the scene through UserDraw() method to a Graphic3d_Group in Compute() method of a custom interactive object class.
Corresponding example you can find in 'vuserdraw' DRAW command (see ViewerTest_OpenGlCommands.cxx file).

Best regards