Win32 API or Glut or VC

Can anyone tell me which API is better? Win32 API, Glut or Visual C++. Is there a article about that?

Thank you


it is all a matter of preference or what you wish to accomplish.

the win32 api is a monster in itself, but you can do a lot with it. mind you, you are limited in os. however, if you don’t care if it is only windows based and you want to build something useful (eg. a game), than it would probably be the way to go.

glut, on the other hand, is simple to implement along with the ability to port to other os’s. glut would be a definate winner if you wish to build small demos that display your opengl skills, whereas win32 forces you to be proficient in both ogl and windows coding. bottom line, if you wish to concentrate on opengl coding with minimal effort on worrying about the window creation, than glut would be the way to go.

visual c++ isn’t an api.

hope this helps.


What you mean by VC is probably the Microsoft Foundation Classes, which is the thing MSVC is basically built for. However, I would strongly discourage using MFC unless you need HIGHLY complex GUI. In my opinion, Windows API is the way to go for an extensive, Windows-only project. For anything else, GLUT is portable, easy to use and has no drawbacks except a certain lack of GUI features (no dialogs, for example). Also, you might want some kind of sound library. I’d recommend Fmod ( is small, fast, and, I believe, portable.

I heard someone said that GLUT is slow and give an advice - don’t stick with GLUT. Is it true or would you recommend something else?

As usual ( ) I recommend using GLFW ( It is a good mix between GLUT and the Win32 API:

  • You do not have to care about the monsterous Win32 API (opening an OpenGL window is done with one function call)
  • You are multi platform (GLFW works under X11 too, for example Linux)
  • You get the source for GLFW, which is fairly compact and easy to follow
  • You can modify it or make extensions yourself if you want to do “cool” Win32 or X11 things etc.
  • You can use the source for learning Win32 / X11 OpenGL programming