How to draw into view via OpenGL?

Creator
Creator

Hey guys,

 

I recently started to evaluate and benchmark Solid Edge. Therefore I want to see if I can draw something next to the part via OpenGL. I found the Display and RenderEvents on the View object and somehow managed to draw something but the render event is only called for initializing and does not update. As I am completely new to this API, I already had a hard time finding these objects and still I am not sure if it is the right way to go. Do you have experience in drawing and could provide some sample code? I also take hints about what objects to use. Smiley Happy

 

Thank you

Marcel

3 REPLIES

Re: How to draw into view via OpenGL?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

This sample addin does exactly what you are asking.

https://github.com/SolidEdgeCommunity/Samples/tree/master/AddIn/DemoAddIn

LMGi
www.TLMGi.com

Re: How to draw into view via OpenGL?

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

To add to what Jason posted, it's important to note that in Solid Edge, you do not interface "directly" with the OpenGL context. Technically speaking, you can, but it's not advised. They provide a wrapper COM interface that is defined in "C:\Program Files\Solid Edge STX\SDK\Advanced\include\igl.h". This wrapper interface provides most standard OpenGL methods but there are some limitations.

 

I am the author of the GitHub link that Jason provided. Feel free to ask any questions if something is not clear.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: How to draw into view via OpenGL?

Creator
Creator

The sample was exactly what I was looking for! I'm using C# and C++ and doing 'native' GL to draw which works pretty well. Thank you very much, both of you!