GLUT

40da7e74fdca33768b6714646853b3f5
0
TheLionKing 101 Aug 18, 2003 at 16:15

Hi,

In OpenGL Game Programming, the authors mentioned about GLUT that for creating complex games, one will have to go beyond the methods used in GLUT ;) .

In most of the OpenGL books (which are for Graphics), GLUT is used abundantly through out :o.

However, in game programming tutorials (found on the net for OpenGL) of complex objects uses GLUT :huh:.

What do you guys suggest … Is it really helpful :blush:?

How many of you people use GLUT in your programs?

10 Replies

Please log in or register to post a reply.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Aug 18, 2003 at 17:49

i use sdl

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Aug 18, 2003 at 18:22

yeah, i use sdl, too, don’t really know why i like it better… i guess it’s more complete in it’s features… many games that have been ported by lokigames also use the sdl…

F699ebb187331fdf7f7875320e3e7e3e
0
starboarder2001 101 Aug 18, 2003 at 22:30

I dont know i just havnt ever used glut. It kind of feels like your cheating :P.

40da7e74fdca33768b6714646853b3f5
0
TheLionKing 101 Aug 19, 2003 at 01:05

:rolleyes: I think SDL can also be used with OpenGL.

I just wanted to know why in the most of the examples GLUT is used :huh: ?

For instance, I searched for an example of a fountain made using OpenGL. I found it … but it used GLUT.

By the way :wtf: is SDL powerful as OpenGL & DirectX?

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Aug 19, 2003 at 06:49

:rolleyes: I think SDL can also be used with OpenGL.

yes

I just wanted to know why in the most of the examples GLUT is used :huh: ?

because glut is a quite old c-utility to quickly platformindependent be able to draw some opengl stuff. not much more, but thats enough for most demos.
i don’t like it because it makes interfacing to c++ quite difficult, and i don’t get the mainloop to work the way i want, i have to use the glut-mainloop

For instance, I searched for an example of a fountain made using OpenGL. I found it … but it used GLUT.

and? glut is a toolkit, wich has nothing to do with opengl. it assists, but thats about it. the opengl code stays the same. and glut is easy to learn..

By the way :wtf: is SDL powerful as OpenGL & DirectX?

OpenGL: 3d drawing api, based on the rastericing idea
DirectX: a set of apis for different tasks, made to work together. Direct3D (counterpart of OpenGL), DirectSound, DirectMusic, DirectPlay, etc..
SDL: a set of tools for a platform independent way to interface with your hw. it contains a 2d drawing api, based on rectangles wich you can blit over eachother, rastergraphics that is, a cdplayer api, a messaging api for interfacing with keyboard, mouse, joystick, and more. as its opensource, there are a lot of addons to sdl, like network interfaces, or other.
SDL doesn’t contain an own 3d api, instead it allows to directly use opengl.

basically, SDL with OpenGL has similar functionality as DirectX. one has stuff the other hasn’t, and the other way around.

but yes, if you have SDL and OpenGL, you can set up games just as well as you can if you have DirectX. with SDL, you gain platform independence..

40da7e74fdca33768b6714646853b3f5
0
TheLionKing 101 Aug 19, 2003 at 07:27

So, SDL is only 2D. OpenGL can be used as both 2D & 3D?

with SDL, you gain platform independence

OpenGL can also be used for platform independent.

Thanks Dave :yes: . A big reply but really increased my knowledge. Thanks.

I wont ask anymore questions now … looks to me that I am about to start a flame between OpenGL and SDL. ;)

Thanks … :yes:

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Aug 19, 2003 at 07:39

yes, sure. but opengl is a 3d api. sdl is a window framework, a event api, a 2d api, and more.. it doesn’t have a 3d api, it allows to use opengl instead.

both together give you ability to set up platform independent stuff, not only platform independent graphics.

glut on the other hand is only a tiny addon to make a platform independent window for gl, and handle some events. it doesn’t contain much, sdl has more.

40da7e74fdca33768b6714646853b3f5
0
TheLionKing 101 Aug 19, 2003 at 08:27

So, what you mean to say is that it will be a very good idea to learn SDL along with OpenGL … right?

But … 2D games are hardly ever built now. For Instance … current release of Duke Nukem 3D looks like a 2D game but is built on a 3D Engine.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Aug 19, 2003 at 08:31

if you want 2d only, you don’t need gl, and can just stay with sdl and the sdl surfaces and the blitters and that.. else, yeah, as most engines do, use 3d to do what ever you want, even 2d.. it adds very much flexibility..

40da7e74fdca33768b6714646853b3f5
0
TheLionKing 101 Aug 19, 2003 at 08:37

OK! I’ll stick with 3D and use OpenGL.

Thanks for all the posts :D !