GLUT vs visual C++

Wanna know which is better and easier to learn/use, GLUT or C++ for GUI application involving 3D visualization? Will appreciate if someone can kindly give some advice or suggest any better software.

First GLUT is a library of functions made to simplify the creation of a window in a opengl program vs. using native windowing commands.

C++ is a programming language has no built in GUI, external library’s much be used in conjunction with C++.

GLUT will work inside of a C or C++ based program.

Now, I think you may have been think about windowing functions in the MFC vs. GLUT.

GLUT does not support menu bar type functions, while MFC does.

If you want a menu bar type interface then you will have to look at MFC or some other GUI that supports that.

Note also that the MFC is Microsoft windows only, so if you want cross platform then you can not use it.

Originally posted by coda:
Wanna know which is better and easier to learn/use, GLUT or C++ for GUI application involving 3D visualization? Will appreciate if someone can kindly give some advice or suggest any better software.

the topic is really weird… glut is better of course because:

  • it does not cost money
  • it is not windows-only

but it really dependes on what you want to do… mfc seems to be outdated, anyway. I would not a) invest money and b) not learn anything that is so much microsoft-only. so you’re better of with glut, in my opinion, but after all it depends on what you want to do…

If you really want to develop a complex application with a complex GUI and OpenGL visualization, maybe you should try delphi… it is a lot easier than c++, the IDE is extremely easy to use and it is not less powerfull than c++, and the personal version does not even cost any money.

oh dear, here we go again.

yup, MFC is clunky, but it works (most of the time), no it’s not portable but then 90% of people who bang on about the importance of writing portable code don’t because they only ever target a specific OS anyway (usually linux).

for GUI stuff MFC will be easier than glut, however it is also easier to get lost in MFC if you aren’t comfortable with WIN32 code.

if you want to be truly portable, then go for one of the following glut based gui’s :

pui (now part of plib)
glui

These are OK, however their (C++) interface design is a bit sucky IMO, and they still feel very ‘glut’ and fairly rough around the edges. Basically glui looks better but is more limited, pui has more useful widgets (such as a file selector) but it looks cack.

or, go for a more robust option such as Qt from trolltech. (This is kinda free, but only if you have linux, a cut down version is available for free on Win32/Mac, though the full blown version costs a hell of a lot of money - GNU licenses eh? Giving it to you free in one hand, using the other to rob you blind… )

I’ve started using this recently because it is the quickest thing I’ve ever used to knock up OpenGL/GUI apps. It also has the QGlWidget class that should be straight forward for any glut user to get their head around (infact, it’s simpler than glut)

The other options are stuff like Tcl/Tk, or full blown windowed code ( WIN32, X etc ), however you will have to do your own GL setup with these options (and MFC actually…)

[This message has been edited by Rob The Bloke (edited 08-10-2003).]

JanHH, you are a sick sick man

coda,

download

Qt/Windows Non-commercial (version 2.3)

from
http://www.trolltech.com/download/index.html

This will have the libs, Qt (GUI) designer, and lots of docs and examples.

If you have VC6 then it will happily integrate itself into the IDE. I use VCNET / gcc and codewarrior on win32/linux/mac and have had no problem with it on any platform/compiler combination.

Check out the manual in Qt designer for more info, also check out the “gear” and “box” examples that come with it. Post here if you get stuck and I’ll try to answer your questions…

Gee thanx for those advice… actually mi am still not sure wat kinda software to use coz I need to create a GUI that takes in user inputs and depending on those inputs, generate 3D visualization images… so was thinking of using opengl and c++ but heard of this GLUT thing and DirectX similar to opengl…hence can anyone offer some help on what I can use?

Read my post.

QT & C++ & OpenGL

That is what you are asking for, that is what I am suggesting.

sorry rob qt came to my mind after writing these posts, but somehow I forgot to mention it… I also think it is the right choice.

Maybe you should start with learning a little bit more about programming in general, since we did give you some advise but did not understand it.

The point is all of the things that you mentioned are able to do as you asked take data and make a 3D plot.

It is like picking a car to use, any car will take you from place to place. It is in how the car handles and how hard it is to drive and helps us make a choice on which car to use.

The same with programming, there are many diffrent way’s you can go about creating a program that does the same job.

Starting out I would think that a C/C++ compiler would be you choice of language, and GLUT is a very easy to use window library. Using the GLUT library will let you create a openGL program very easy.

It seems you have to determine what OS
you gonna use

-Linux ?
-Windows ?
-MacOs???

Then you ll be set

you mentionned DirectX I presume its for windoze system then…

After that, what is your current programming skillz?

Do you know Basic, Visual Basic, C or C++
Pascal? perl etc…

If you know programming, take some Nehe lessons, it will get you started(search for Nehe Opengl)

Glut is pretty easy to learn
But MFC is just a bit tougher and you need Visual C++…(money)

Theres Qt, by Trolltech, but you’ll need a licence if ya wanna sell your product
It isnt free on windows platform either.
(still you can have an oudated version to try on Win32 system) But its free to try in linux platform.

If its only graph you want maybe you dont even need OpenGL, ever tough about Visual Basic?

yup i want to use on windows platform. As for level of programming skills, i can say i am quite new to programming thus am looking for easier ways to pick up the stuff. At the moment I need to create 3D visualization of MEMS structures