Debugged exe with freeglut issue
Posted: Thu Apr 23, 2015 1:31 am
I've been fiddling with freeglut for a couple opengl windows and everything seems to run fine except when I close out of the freeglut window.
I end up with a "The debugged executable quit unexpectedly" message.
I think this might be related to how glutMainLoop() works, but I'm not sure if I need to resolve this or if it's OK to overlook.
I'm hoping someone with freeglut/glut experience can point me in the right direction.
This download contains all the necessary files. Also this won't run on the x64 compiler because this is the x86 version of freeglut.
Freeglut Window Test.zip
For those interested here's the Window.pb file from the download above, but it won't run without the includes and lib file from it.
I end up with a "The debugged executable quit unexpectedly" message.
I think this might be related to how glutMainLoop() works, but I'm not sure if I need to resolve this or if it's OK to overlook.
I'm hoping someone with freeglut/glut experience can point me in the right direction.
This download contains all the necessary files. Also this won't run on the x64 compiler because this is the x86 version of freeglut.
Freeglut Window Test.zip
For those interested here's the Window.pb file from the download above, but it won't run without the includes and lib file from it.
Code: Select all
IncludeFile "freeglut_ext.pb"
IncludeFile "freeglut_std.pb"
Import "freeglut.lib"
glutCreateWindow(Title.s)
glutDisplayFunc(*Proc)
glutGetWindow()
glutInit(argc.i, argv.b)
glutInitDisplayMode(Flags.i)
glutInitWindowSize(Width.i, Height.i)
glutInitWindowPosition(StartX, StartY.i)
glutMainLoop()
glutMainLoopEvent()
glutSetOption(Action.i, Option.i)
glutSwapBuffers()
EndImport
Declare RenderLoop()
Define.i argc = 0
Dim argv.s(0)
argv(0) = ""
glutInit(@argc, @argv)
glutInitDisplayMode(#GLUT_DOUBLE | #GLUT_RGBA)
glutInitWindowSize(800, 600)
glutInitWindowPosition(200, 200)
glutCreateWindow("Freeglut Window")
glutDisplayFunc(@RenderLoop())
glClearColor_(1.0, 0.0, 0.0, 1.0)
glutMainLoop()
End
Procedure RenderLoop()
Debug "At Render"
glClear_(#GL_COLOR_BUFFER_BIT)
glutSwapBuffers()
EndProcedure