AnsweredAssumed Answered

How can i use FreeGlut.dll in SolidWorks?

Question asked by Lenny Yang on Dec 21, 2018
Latest reply on Dec 22, 2018 by Lenny Yang

Hello everyone,

I can use opengl.gl and openg.glu in SW environment.

But when i use opengl.glut, the SW program crash immediately

 

here is the code://///////////////////////////////////////////////////////////////////////////////////////////

Imports Tao.OpenGl.gl

Imports Tao.FreeGlut

Public Class OpenGLTest

Dim WithEvents swModelView As ModelView

Function OnBufferDrawOpenGL() As Integer

        glLineWidth(1)

        glBegin(GL_LINES)

        glVertex3f(0, 0, 0)

        glVertex3f(1, 0, 0)

        glEnd()

      glutSwapBuffers()‘ SW Crash here!!!!!

        glFlush()

 

End Function

 

Sub AttachSWModelviewEvents()

      AddHandler swModelView.BufferSwapNotify, AddressOf OnBufferDrawOpenGL

End Sub

Sub DetachSWModelviewEvents()

      AddHandler swModelView.BufferSwapNotify, AddressOf OnBufferDrawOpenGL

End Sub

End Class

here is the code://///////////////////////////////////////////////////////////////////////////////////////////

 

My question is how can i use GLUT in SW?

Looking forward to your reply

thank you!

Outcomes