Jump to content


GLUT


10 replies to this topic

#1 TheLionKing

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 18 August 2003 - 04:15 PM

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?
<span style='color:blue'>I can survive anything ... even NUKES!!!
The Lion King</span>

#2 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 18 August 2003 - 05:49 PM

i use sdl
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#3 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 18 August 2003 - 06:22 PM

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...
If Prolog is the answer, what is the question ?

#4 starboarder2001

    Member

  • Members
  • PipPip
  • 35 posts

Posted 18 August 2003 - 10:30 PM

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

#5 TheLionKing

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 19 August 2003 - 01:05 AM

: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?
<span style='color:blue'>I can survive anything ... even NUKES!!!
The Lion King</span>

#6 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 19 August 2003 - 06:49 AM

Quote

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

Quote

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

Quote

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..

Quote

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..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#7 TheLionKing

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 19 August 2003 - 07:27 AM

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

Quote

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:
<span style='color:blue'>I can survive anything ... even NUKES!!!
The Lion King</span>

#8 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 19 August 2003 - 07:39 AM

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.
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#9 TheLionKing

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 19 August 2003 - 08:27 AM

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.
<span style='color:blue'>I can survive anything ... even NUKES!!!
The Lion King</span>

#10 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 19 August 2003 - 08:31 AM

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..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#11 TheLionKing

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 19 August 2003 - 08:37 AM

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

Thanks for all the posts :D !
<span style='color:blue'>I can survive anything ... even NUKES!!!
The Lion King</span>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users