I am learning OpenGL with the help of tutorials found online. Many of them use GLUT library, even though it is generally recommended to use freeglut instead. How will replacing GLUT header file with freeglut header affect the compilation ? Is such a simple replacement possible ? Are there many differences in terms of syntax, function names and usage ?
As mentioned by Andon, replacing the header will do next to nothing. The FreeGLUT about page has a good description of the what and why (http://freeglut.sourceforge.net/index.php).
Why not to use GLUT, from the above link:
The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. This would be OK, if not for the fact that GLUT is getting old and really needs improvement. Also, GLUT's license is incompatible with some software distributions (e.g., XFree86).
As for the syntax and function names, if your code currently compiles fine with GLUT, it should compile fine with FreeGLUT. You may need to tell the compiler to use/link against FreeGLUT instead of GLUT (and where to find it).
A quick Google search produced this result (using FreeGLUT), might be useful... http://peon-developments.blogspot.com.au/2011/04/creating-opengl-window-with-freeglut-in.html
© 2022 - 2024 — McMap. All rights reserved.