PDA

View Full Version : Starting under Linux



David
07-12-2000, 06:16 AM
Hello,

Ive been programming in OpenGl under MSwindows for the last year or so and have decided it is time I learnt some 'unix' skills. I am thinking of getting a copy of Suze Linux (or could you recommend another?) and I need to know from scratch how to setup opengl and get a simple 'hello world' program running. Does anyone know how I could find a good step by step guide to achieving this (bearing in mind Ive only used VC++ before...)

Hope you can help

David

witcomb
07-12-2000, 02:12 PM
As for Distros I use Corel, very easy to install and well, I couldn't find anything else at the time.

Now, getting started with Mesa (OpenGL for Unix, pretty much) There is no OpenGL for Linux so Mesa takes it's place the coding is exactly the same with some minor implementation differences. The purpose of Mesa is to be a port of OpenGL to unsupported OS's. Ok, with that out of the way, you will want to visit http://utah-glx.sourceforge.net/. This site has accelerated drivers for many of the cards out there today (read the docs). In the process of installing these drivers you will install Mesa so that will kill two birds with one install.

Once you have the libraries installed and your drivers install you can start your coding. Now, you said that you are a VC++ person, well I am not really. I use a program called Xemacs in Linux for my coding. It is a very nice program, however you will have to deal with makefiles and this might be a problem if you only deal with the MS Wizards and projects. There are probably people out the that can tell you more about programs similar to VC++, I believe that a program called Crisp comes with Suse and this may be what you want. Take a look for a website.

Ok, now getting code started is very easy much of your code could be ported if you are using glut, if you have using the MS Windowing then you will have to learn how to create x windows. There are some quick examples that come with mesa look in the /xdemos directory.

If you have any questions about installing the GLX drivers or Mesa let me know.

witcomb
07-13-2000, 03:37 AM
Sorry, I should have probably included that I am working on some tutorials( just starting ) at the moment that will cover very simple stuff like creating windows and how to start rendering. This should be enough for you to get started. I can also include how to create makefiles or give an example at least that will build a mesa program.

If you can think of other tutorials that you might find useful let me know. It can be hard to think of things that are new to do.

MC
07-13-2000, 12:07 PM
Distro:

Most are good now, RH is the easier to find, but in the 6.x series there is a lot of install glitches and RH distros are always outdated. Mandrake is good, suse and slackware probably the best ones. Corel is the easiest to install maybe.

Anyway, you didn't list your config. If you have a Voodo or Matrox board, install Xfree86 3.3.6 with utah drivers. For nvidia boards, take Xfree4.0 but you will have to compile it.

I have tried Matrox under Xfree4.0.1, it works, but perfs are not good as with Utah.
check Xfree site www.xfree86.org (http://www.xfree86.org)

For tools: one word GNU, one site www.gnu.org (http://www.gnu.org) (all manuals are online). Learn to write a Makefile first, it helps. Use DDD as frontend to GDB (debugger). Editor: Vi or emacs, it a quite a religious question http://www.opengl.org/discussion_boards/ubb/smile.gif

For libraries: Glut, Gtk or Qt for GUI...