FreeGlut Example Not Working
- Posted by Icy_Viking Feb 03, 2021
- 966 views
Hello all,
I have finished writing my FreeGlut wrapper, however the example I am working on does nothing. No command prompt is showing nor is the window showing. Am I missing something, or some snag in the code somewhere?
--Wrapper public constant xglutInit = define_c_proc(glut,"+glutInit",{C_POINTER,C_POINTER}) public procedure glutInit(atom parg,sequence args) atom str = allocate_string(args,1) c_proc(xglutInit,{parg,str}) end procedure public constant xglutMainLoop = define_c_proc(glut,"+glutMainLoop",{}) public procedure glutMainLoop() c_proc(xglutMainLoop,{}) end procedure public constant xglutCreateWindow = define_c_func(glut,"+glutCreateWindow",{C_POINTER},C_INT) public function glutCreateWindow(sequence title) atom str = allocate_string(title,1) return c_func(xglutCreateWindow,{str}) end function
--Example without warning include EuFreeGlut.ew include flags.e glutInit(0,"") glutInitDisplayMode(GLUT_DEPTH) glutInitWindowPosition(100,100) glutInitWindowSize(640,480) atom x = glutCreateWindow("My Window") glutMainLoop()