Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between FreeGLUT vs GLFW? [closed]

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?

like image 540
varun Avatar asked Sep 07 '14 09:09

varun


People also ask

What is the difference between GLFW and GLEW?

GLFW and freeglut are alternative for us according to our need we can choose any one but GLEW is different from them which is used for run time loading of the OpenGL API.

Should I use SDL or GLFW?

GLFW is modern and has a very well defined scope. It's also under very active development. SDL on the other side is rock solid and has a lot features in different scopes but is somewhat lacking in all of them (for example: SDL can do audio, but you might prefer using OpenAL because its far superior in that matter).

What does GLFW stand for?

GLFW stands for Graphics Library Framework. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mouse input.

What is GLFW vs OpenGL?

GLFW and OpenGL serve distinct purposes. GLFW isn't there to make OpenGL easier. OpenGL isn't a base layer for OpenGL. If anything, GLFW looks like a base layer for OpenGL as it provides the contexts for OpenGL.


1 Answers

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.
like image 57
datenwolf Avatar answered Sep 20 '22 14:09

datenwolf