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