-
Re: Why can't I see the graphics drawn by opengl in solidworks?
Abdullah Erdemir Jun 5, 2015 10:17 AM (in response to Michael Deng)Did you try in a part document, instead of an assembly?
Long time ago, I have tried OpenGL to draw some virtual lines, and it was successful only in a part document, not in an assembly document.
Regards...
-
Re: Why can't I see the graphics drawn by opengl in solidworks?
Michael Deng Jun 5, 2015 9:52 PM (in response to Abdullah Erdemir)Hello,Abdullah
Simon is right. If you want to use OpenGL in assembly document, you just need to place your OpenGL codes("wgl::create context,wgl::make current" and
so on, such codes are not necessary) in the BufferSwapNotify which is created in DocView.h and DocView.cpp files.
-
-
Re: Why can't I see the graphics drawn by opengl in solidworks?
Simon Turner Jun 5, 2015 11:10 AM (in response to Michael Deng)I think you are going about this the wrong way. I have got this to work in the past by using the context that SolidWorks has already created.
You need to use that context by placing your OpenGL drawing code in BufferSwapNotify. Forget about CreateContext and MakeCurrent. SolidWorks handles all of that for you.