Differences from Windows GL?

Hi there.
At the moment I’m working with the dark side of the force (i.e. Windows), but I’m getting sick and tired of deriving from CDialog, and anyway, that stupid multi-threaded lazing-around Windows does is a bit too much to take.
So now I was gonna start developing in Linux, as soon as I got the new Debian or SuSe versions (I could get SuSe, but I heard Debian was better). Can anybody tell me the basics of how to do game developement under Linux?
+Is there a real OpenGL, or just Mesa?
+What GUI features are available in the Linux API (or whatever is shipped with GCC)?
+Is there sound support, like e.g. Fmod under Windows? (Note: I do NOT use any part of DIRECTX! That is downright unholy!)
+How do I check for keyboard and mouse input (equivalent to WM_KEYDOWN and WM_LBUTTONDOWN)?

Thanks for the help!

Originally posted by reign_bow:
[b]Hi there.
So now I was gonna start developing in Linux, as soon as I got the new Debian or SuSe versions (I could get SuSe, but I heard Debian was better). Can anybody tell me the basics of how to do game developement under Linux?
+Is there a real OpenGL, or just Mesa?
+What GUI features are available in the Linux API (or whatever is shipped with GCC)?
+Is there sound support, like e.g. Fmod under Windows? (Note: I do NOT use any part of DIRECTX! That is downright unholy!)
+How do I check for keyboard and mouse input (equivalent to WM_KEYDOWN and WM_LBUTTONDOWN)?

Thanks for the help![/b]

First I think you should look some more info about linux, what I can see your questions you really do not know lot about linux.

Maybe you should get suse its easier to install than debian if you do not have any linux experience or friend that know linux.

There are also some other distroes you can get free at net if you have burner and fast connection. Or bye so cheap disk only distro.

  1. Mesa is 99.999 openGL so you can use that.
    If I remember right you can get 'real’openGL in linux put its not free.

  2. There is no GUI features in linux API and
    non are chipped with gcc.
    There are lots of optional librarys you can get free or come with distro.
    Check GTK or QT in net. There are others too.

  3. It depens what soundcard you use, but yes there are lots of sound librarys you can use.

  4. It depends what library you use.

You can use things like SDL when you develop games. It gives you interface to sound, input and graph (openGL)

;Jackz

I use Mandrake 8.0, which I think is OK (it was very easy to install). I have not tested alot of distributions, so I really couldn’t tell which one is the best.

Mesa comes with most Linux distributions I guess, and it’s OK as long as you can settle for software rendering. For some cards I believe there is hardware support through something called DRI (dri.sourceforge.net). I have an nVidia card, and they have their own OpenGL implementation which can be downloaded at their driver page (it is really good!).

I believe Fmod supports Linux. Not sure what sound cards etc are supported though.

You may want to check out GLFW (http://opengl.freehosting.net/glfw), which is a compact open source OpenGL framework for Windows and Linux which supports user input etc.

/Marcus

this has been said before in this thread, but i thought id elaborate. i do think that you should really learn a little more about linux before you jump into programing for it.

ok, first, the distro wars: if you are new to linux, debian is probably not better than suse. it will probably be harder to use, plus suse comes with a VERY good manual. mandrake is supposed to be the easiest, suse/redhat are easy to use, but still very powerfull, and debian/slackware can be rather hard to use (but you learn more : )

mesa IS openGL. it wasnt in the past, but it is now. mesa IS hardware accelearted for many cards (the main exception being NVIDIA) go to dri.sourceforge.net to see which ones. nvidia uses their own gl implementation, its very good, and free, but not open source. the only reason mesa isnt called “somethingGL” is because they have to pay sgi (or the ARB, i cant remember which) a licensing fee to do that. sgi, has, however provided them with their sample implementation for free, which is why it is openGL compliant.

now the desktop manager wars: linux does not have a windowing api. linux is a console based operating system. linux uses X Windows as a windowing environtment. this is the same as *BSD/Sun’s Solaris/SGI’s Irix/most other unixes.

as far as a windowing api, you have several options. first, you can use xlib/glx. this is the most basic interface to x windows. it is the most complex, but probably the fastest, as well as the most widely installed. all the other windowing options are based on xlib, and, in the end, just make a bunch of xlib calls for you. if you use this, everybody who has x windows (almost everybody who isnt running a server) will be able to run your app. these are equivalent to straight win32/wgl programing.

another option would be to use SDL (www.libsdl.org). this was created by loki to help them port windows games to linux, and they have open sourced it. it does a lot more than just windowing. it also does sound, joystick, cd playing, video, etc (it basically does what direct x does). this is widely used by the game development community, because there is also a windows port, and a mac port. so you can simply recompile your program on another (supported) OS, and it will run just fine.

the other two options i will lump together: they are gtk(www.gtk.org) and qt (www.trolltech.com). think of them as the x windows equivalents of MFC. they arent really designed for what you want to do, but they both have GL support. the problem with these, is, not everybody has them installed. for instance, most people who use the kde desktop manager (which uses qt) wont have gtk installed, or at least wont have the very latest version. and the same is true for the other side: most people who use the gnome window manager (which uses gtk) wont have qt installed, or at least wont have the very latest version. so, using these might limit your potential user base. also, qt is object oriented, and gtk is not (in fact, qt is the only object oriented windowing library i have mentioned)

ok, sound: there are two sound interfaces for linux, alsa is newer, and completely open source, but doesnt have as many drivers or aplications written for it (cause its newer). oss has more drivers and aplications for it, but is older, and not completely open source (there is an open source version and a commercial version). in addition to these there are several higher level apis written on top of these two (SDL, for instance, includes a sound api that is written on top of oss).

checking for keyboard and mouse input depends on what windowing library you use. xlib has one api, sdl another, gtk another, and qt yet another. the one thing you will notice however, is that even though the function calls are different, they all behave basically the same way (windows also behaves the same way, most likely because it was written to emulate X Windows). if you know how to use the event system in windows, any of the x windows apis will be very easy to learn.

i know this is long, but those were complicated questions. hope it helps

I use Motif for windowing. However, I had to fork out $150 for it 5 years ago. It is a unix standard, and has many widgets similar to the Win32 stuff. It is probably not an option, however, due to the cost.

I am using the GLUT library for windowing which stands for, i think, Open GL Utility Library. It does not give you the full capability of manipulating the windows but it is descent and supposed to be portable across unix versions and windows. Also very easy to code.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.