OpenGL or GLUT which way to go?

This is a discussion on OpenGL or GLUT which way to go? within the Game Programming forums, part of the General Programming Boards category; I've been programming now for about 6 months and I'm currently using GLUT and OpenGL but I'm unsure which is ...

  1. #1
    Registered User
    Join Date
    Jan 2011
    Location
    Slovakia
    Posts
    21

    OpenGL or GLUT which way to go?

    I've been programming now for about 6 months and I'm currently using GLUT and OpenGL but I'm unsure which is best to use.

    As I see it so far. GLUT is easier and tidier to set up the window and run with a good selection of basic shapes and easy to use commands. However, to port it to another machine requires that the new machine has the glut32.dll file.

    OpenGL is portable with ease but has a much more complicated structure for setting up the windows and also for drawing spheres and cylinders (the only preset shapes)

    Redbook examples I have found on the internet are in GLUT but the portabilty issue is annoying.

    So shall I continue with GLUT or concentrate more with OpenGL?

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,616
    Well, for GLUT's portability its maintenance team is responsible.
    But, to make anything that uses Pure ol' OpenGL portable, you really have to sweat!!! ( Too many OSes )
    Devoted my life to programming...

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Just to be clear, when you're using GLUT you actually are using OpenGL as well. GLUT's just a front-end "utility" library that makes certain tasks easier for you.

    As for the extra DLL, I really wouldn't worry about it at all. If you're concerned then you can include the .dll with your executable whenever you give your program to someone. Windows will look in the current directory first before the standard places when trying to find DLLs. If you look at any graphical program there are a lot of DLLs it requires (most of my programs require zlib.dll, libpng.dll, and something or other for jpegs, just for loading images, for example).

    Finally, if you really don't like extra DLLs you should be able to statically link your executable so that the DLL code is embedded right into your exe. This will make your exe really huge, be warned. It's generally cleaner to have DLLs so that users can download updated versions of one part of your dependencies.

    In other words: if glut is more convenient for you, I'd definitely use it.

    One more point: there are other libraries you can use besides glut. I prefer the SDL, which is a multimedia front-end library that is much more powerful than glut. The SDL is a bit harder to learn, but it's worth it. (Before you ask, there is an SDL.dll too.) And you can use other libraries like Qt along with OpenGL as well, though I wouldn't suggest this to someone who is just starting out.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL/GLUT in Dev C++
    By Nextstopearth in forum Game Programming
    Replies: 3
    Last Post: 10-01-2008, 05:25 AM
  2. Problems with OpenGL(glut) in C++
    By Abood in forum Windows Programming
    Replies: 27
    Last Post: 11-16-2007, 07:09 PM
  3. OpenGL/GLUT Question
    By kas2002 in forum Game Programming
    Replies: 5
    Last Post: 05-25-2006, 02:25 PM
  4. SDL or GLUT for Opengl?
    By drdroid in forum Game Programming
    Replies: 1
    Last Post: 07-17-2003, 01:54 AM
  5. OpenGL GLUT 3D?
    By elfjuice in forum C++ Programming
    Replies: 8
    Last Post: 07-03-2002, 10:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21