PDA

View Full Version : OpenGL or Glut?



Jase
12-26-2003, 02:54 PM
Greetings,

I've been doing a little research before I dive into any kind of OpenGL programming... and I'm curious as to which is better to start with, OpenGL or Glut(or some other high level library). From what I understand, Glut is just a toolkit that sits optop of OpenGL to simplify OpenGL... which is all good and everything, but would it be better to just learn the low level OpenGL?

Thanks for any help.
Jase

Honk
12-26-2003, 03:54 PM
GLUT isnt maintained anymore so I suggest you check out the OpenGL Toolkits board on this site.

*hint* GLFW looks nice */hint*

Jase
12-26-2003, 04:40 PM
So if glut is no longer maintained, why would so many people still want to use it? Is it good to use still, even if unmaintained? Are the other libraries any good, or should I just try to learn sraight OpenGL?

Thanks,
Jase

nexusone
12-26-2003, 06:05 PM
First remember openGL is only a graphics API, it does not handle any windowing functions or input functions. So in order to program with openGL, you need to use some code to open a window in which to render your scene to.


Most people use GLUT because you can start programming in openGL very fast using it.

GLUT offers lot's of things that are useful:
If you use GLUT then your program will run under just about any OS (windows, Linux, Mac).

GLUT with only a few commands you can open a window and get keyboard and mouse input. VS. say windows native commands to open a window that will take lots of extra lines of code and harder to understand.

GLUT is great way to get your feet wet with openGL, then you can move on to a API like SDL that offers more features then GLUT and it maintained.


Originally posted by Jase:
So if glut is no longer maintained, why would so many people still want to use it? Is it good to use still, even if unmaintained? Are the other libraries any good, or should I just try to learn sraight OpenGL?

Thanks,
Jase



[This message has been edited by nexusone (edited 12-26-2003).]

Jase
12-26-2003, 06:18 PM
Ahh, I see. One more quick question...

Even though glut is no longer maintained, would glut still be a good choice even if you were developing a commercial game engine? Or is it only good for starting out to learn OpenGL?

Thanks, I appreciate all your help.
Jase

nexusone
12-26-2003, 06:40 PM
Depends on what type of commercial game you are trying to write, a simple mouse driven game would work nice under glut.

But I don't think a I would use glut for a 3D shooter type game.

If you want cross platform support then the SDL library would be a good choice www.libsdl.org. (http://www.libsdl.org.)

But as stated you could use glut just to open a window and simple input to start with. Then later just change those routines to some other library.


Originally posted by Jase:
Ahh, I see. One more quick question...

Even though glut is no longer maintained, would glut still be a good choice even if you were developing a commercial game engine? Or is it only good for starting out to learn OpenGL?

Thanks, I appreciate all your help.
Jase

JanHH
12-28-2003, 06:26 PM
choosing glut for anyting professional is a rather weird idea, althoug it's good for learning purposes. And of course glutSolidTeapot() rocks http://www.opengl.org/discussion_boards/ubb/wink.gif.

Jan

dorbie
12-28-2003, 06:47 PM
There's some bad information been posted here.

GLUT is NOT a high level API to replace OpenGL. GLUT merely provides the system level interface for things like windowing.

GLUT is complete and functional. It needs no maintenence but don't expect new features, it works and comes with source code. Mark Kilgard pretty froze features and won't license it where it can go on as a viable project (says it's free and that's enough, AFAIK you can take the code just don't call it GLUT).

It is definitely OK to use GLUT, but GLFW is OK too, I have no preference.

GLUT is an easy vehicle to learn OpenGL, without worrying about the windowing and i/o specific details which can be quite tedious.

So use GLUT (of GLFW) to learn OpenGL (there isn't much learning to GLUT) and once you're done you can move on from glut to the platform's native windowing code or perhaps consider a higher level API.


[This message has been edited by dorbie (edited 12-28-2003).]

Honk
12-28-2003, 08:13 PM
Originally posted by dorbie:
There's some bad information been posted here.
GLUT is complete and functional. It needs no maintenence but don't expect new features, it works and comes with source code.

No one said thats its not complete or not functional, only thats its not maintained anymore. This is no "bad information", thats the thruth and if you say otherwise, you aint know what you are talking about (moderator or not).

As you said yourself GLUT lacks lots of "new" features like: multithreading, mousewheel, real fullscreen selection mode, bits per pixel selection, zbuffer precision selection, multiple keystrokes and so on.

People would like to have these feature (Win, Linux, ...) so I would call implementing those features "maintenence".

KUDOS to Mark but he would be the first to admit that GLUT is pretty outdated and should not be used for anything else but the examples of the red/blue book or tutorials (nehe's for example).

dorbie
12-28-2003, 09:29 PM
GLUT is perfectly useable and remains popular. The rest we agree on, although I wouldn't speak for Mark w.r.t. GLUT's utility.

For learning OpenGL I still wouldn't hesitate to recommend GLUT and that's a pretty fundamental difference in our advice whichever way you look at it.

01-22-2004, 06:47 PM
GLUT lacks lots of "new" features like: multithreading, mousewheel, real fullscreen selection mode, bits per pixel selection, zbuffer precision selection, multiple keystrokes and so on.

Please recommend a toolkit that would have these features. I am new to OpenGL and would appreciate any suggestions you may have. Thanks!!

01-23-2004, 12:13 PM
Give GLFW a try.