View Full Version : GLUT - what's special?
12-15-2002, 04:33 AM
I haven't used GLUT before. I would like to know whats so special about it. I kind of see that it makes things easier but it is slower than raw opengl? or is it really the same and much more productive to use?
GLUT is special because it's easy and fast to create simple applications. About speed, it's all about how you code.
12-15-2002, 07:18 AM
Well GLUT is not so much an ecapsulation of OpenGL as it is of the calls to initializing things in the OS. Like if you used GLUT in a windows environment it creates a window and everythign is set up. Here comes the cool part: If you used the exact same code and compiled in another OS, GLUT would open a windows specific to that OS. It basically wraps the annoying initialization code for OpenGL (setting up pixel format, setting up the rendering context, the OS specific procedures to create windows with openGL support, etc.).
However, i'm not saying it doesn't support ANY OpenGL at all. It does let you do a few things like create a sphere, or a torrus, or a few other shapes. But you could do that using quadrics and the glaux library. I personally don't use GLUT because i like to make my own windows and my programs stay on Windows. But it is definetely worth checking out!
glut is used in the red book and is also cross-platform. Many folks learn OpenGL using the red book.
12-15-2002, 10:09 AM
thanks guys.. but what about speed though?
I mean is it any sower or the same?
P.S. cross platform sounds really cool!
As I said in my post above, it's all about how you code. You can make both slow and fast programs in GLUT, but it's you that makes them fast or slow, not GLUT.
12-15-2002, 11:39 AM
ok cool.. thanks
12-17-2002, 02:19 AM
I just had another question.. if you use glut for example for the window creation..can youy still pass to it normal or raw open gl commands? such as glvertex(); etc
12-17-2002, 02:56 AM
Yep, well thats the whole point really to create a window for using 'raw' opengl in.
12-17-2002, 05:56 AM
thanks a lot guys.
I appreciate the help =)
12-17-2002, 01:16 PM
I have found that my code running with glut is about 1/2 the speed versus when I set up the win32 window myself. For when you are just starting out GLUT is defeinitly the way to go, its easy to set up a program, it cuts your code size down by about 500 lines of code. Or if you want to write something that is cross platform, although if you want to run your program on a unix machine you will likely have to change it around abit, but nothing like if you used win32 api. For this reason glut is vary popular for writting how to demos
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.