3 Replies Latest reply on Jun 5, 2015 9:52 PM by Michael Deng

    Why can't I see the graphics drawn by opengl in solidworks?

    Michael Deng

      Why can't I see the graphics drawn by  opengl in solidworks ?

      {

      uiModelView_c::InitializeShading()

      CClientDC dC(CWnd* parentWindow);

      HGLRC hRc = ::wglCreateContext(dC.m_hDC);

      ::wglMakeCurrent(dC.m_hDC, hRc); (call this before each 'paint' operation)

      When you are done using OpenGL for this paint'operation, call:

      ::wglMakeCurrent(NULL, NULL);

      When the DLL shuts down or the IModelView object is destroyed (watch for a DModelViewEvents DestroyNotify2), your application must do the following:

      ::wglMakeCurrent(NULL, NULL);

      ::wglDeleteContext(hRc);

      }

      I followed the above instructions and generated my code,but nothing happened when I ran my program.What exactly is the problem ?

      Anyone has any idea?