I just cannot install or link glfw library in ubuntu but glut/glu is working fine. SO i basically want to ask if i can just learn opengl with glut or should i try more effort in installing glfw?? whats the difference and which is superior??
Most of the feature’s you’re likely to need are present in FreeGLUT/OpenGLUT (Ubuntu’s “GLUT” package is probably one of these; the original version of GLUT is no longer maintained). If you get to the point that you find GLUT too limited, you should probably switch to either GTK/Qt/wxWidgets (if you need GUI-like features) or SDL (if you want a single window or full-screen display). GLUT and GLFW are both “toy” toolkits which favour simplicity over capability.
glut/glu are fine for learning OpenGL. Not too familiar with glfw, but it sounds similar to glut in one important aspect - both packages are fairly limited in user interface capabilities. If you ever get to the point where you need lots of menus, buttons, sliders, knobs, and groups of widgets which can hidden/displayed - glut is not going to cut it. You will have to move on to something with more GUI capability. I used FLTK.
I disagree with the idea the GLFW is a “‘toy’ toolkit”.
GLUT is primarily for creating demo applications. It has some input capability, but nothing substantial. GLFW however is able to do a lot more in terms of input than GLUT (it actually knows what Unicode is, for example). Not only that, it gives you a lot easier control over the main loop, which is important for the kinds of applications it is used for.
If you’re creating a GUI application, one that’s intended to look like a normal window with controls and so forth, those aren’t the tools you should be using. But then, that should be obvious just from looking at the API.
But if you don’t care about windows with controls and so forth, if you’re going to draw everything in OpenGL (like most games do, for example), then GLFW is a much slimmer tool than those GUI toolkits. The main advantage of using SDL over GLFW is that it gives you out-of-the-box support for sound and a couple of other things that GLFW doesn’t handle.