What is the difference between FreeGLUT vs GLFW?

OpenglGlutGlfwFreeglut

Opengl Problem Overview


My university started teaching a course which includes OpenGL programming. They make us use FreeGLUT to create a window and a context for OpenGL, but I found an online course at lynda.com about OpenGL in which they use GLFW instead of FreeGLUT.

So I want to know which one should I use and what are the differences between the two?

Opengl Solutions


Solution 1 - Opengl

FreeGLUT:

  • Based on the GLUT API.
  • GLUT has been around for about as long as OpenGL itself.
  • Many tutorials and examples out there use GLUT.
  • Takes care of implementing the event loop and works through callbacks (good for simple stuff, makes things like precisely timed animation loops and low latency input much harder though).

GLFW:

  • Designed from scratch with the experiences of other frameworks in mind.
  • Gives much finer control over context creation and window attributes.
  • GLFW-2 Provides basic threading support functions (thread creation, synchronization). –– removed from GLFW-3
  • GLFW-2 Provides basic image file loading support. –– removed from GLFW-3
  • Gives very detailed access to input devices.
  • Event loop is in control of the programmer which allows for much preciser timing and lower latency.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionvarunView Question on Stackoverflow
Solution 1 - OpengldatenwolfView Answer on Stackoverflow