I am trying to learn OpenGL, and I just found out that GLUT is obsolete. I already know SDL, and it seems it is a good alternative. Should I use SDL to develop games with OpenGL, or are there any better alternatives. I am new to game development, so I don't know much about the state of the art.
I just found out that GLUT is obsolete.
That's what happens when you accept the first answer you come across; you get bad information. GLUT 3.7 shouldn't be used, but FreeGLUT is completely backwards compatible with it.
However, your question goes elsewhere. For making an actual game, GLUT of * form is inappropriate. It doesn't give you control of the main loop, and you really need that in a game (FreeGLUT does have a way to control the main loop, but it's still odd). GLUT is for writing graphics demos. That's very important when testing new graphical effects, so it should be there in your toolbox when needed. But your main game code should never use it.
GLFW is a game-centric lightweight alternative to GLUT. It provides basic support for things beyond creating an OpenGL window. It lets you get input, load images as textures, and a couple of other things.
SDL, SFML, and Allegro 5 are all multimedia toolkits. They can create OpenGL windows, but they do a lot more than that. They provide full support for input, audio, and various other stuff you need to make a game. If you're making a game, any of these are a good starting point. I personally like Allegro 5, but that's just my bias towards good documentation and a clean API.
You can find alternative to GLUT on this page:
To that i would also add SFML:
If your goal is to develop a game,
It depends on whether you want your game to be cross-platform or not. For portable (Windows, Mac, Linux) games SDL seems to be the only choice.
If you only target Windows and/or XBox, there are much better alternatives, e. g. XNA which frees you from writing a lot of code manually.
If your goal is to learn OpenGL,
Just program in raw OpenGL, but be prepared to face a lot of unintuitive concepts, math and huge manuals.
GLUT is an API as well as a library. The original library is indeed obsolete. The API is a different thing, it was pretty good to begin, it just needs revisions for overcoming limitations and addressing new needs. The primary current implementation is FreeGLUT, which is supported and not obsolete. That means that a good alternative to GLUT (as in the library GLUT) is GLUT (as in FreeGLUT).
The problem noted above with "control of the main loop" is incorrect. With newer GLUT versions you can have better control over your game loop (if that is important to you). The limitation was fixed by glutMainLoopEvent(). This and other limitations are addressed here:
Qt does support OpenGL. Take a look to Open Inventor and consider if make it sense for you to go straight to an higher level 3D API.