[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestions for tutorials.



xMonkey wrote:

>            Well Where would be a really good tut for OpenGl (or Mesa)
> for Linux.  Like I said all I'd really like to do right now is open
> a window and make some lines and points, real primitive stuff.

OK - there are two separate parts to what you want to do - Opening
an OpenGL 'rendering context' (a Window) and drawing stuff in
OpenGL.

The window opening part is really rather Linux/X-windows specific,
since that's not a part of OpenGL and it's quite complicated for
someone who just wants to do something quick and easy.  Hence
there is a library called 'GLUT' - GL Utility Toolkit (which
comes with Mesa) that hides all the nastiness associated
with window-opening, keyboard/mouse/joystick I/O, etc - and
which is portable to a range of other OS's such as Windoze.

The GLUT manual can be found at http://www.opengl.org - where
you can also download GLUT itself if by some chance it isn't
installed on your machine.  There is also a GLUT clone that
is under the Xfree license called 'freeglut' that you can
get from http://freeglut.sourceforge.net

Now, as for the "drawing things in OpenGL" part:

There are many OpenGL tutorials on the net - all of those can
also be found through www.opengl.org - but I confess I have
not tried any of them.

Personally, I think you'd be better off to start with one
of the sample programs that come with Mesa and with GLUT,
pick one that does something close to what you need and
modify it.

If you plan to do a lot of OpenGL work in the future, you
should certainly buy the so-called 'Red Book' - "The OpenGL
Programmers Guide" which is really well written and published
in several languages.  There are some older revisions of the
Red Book to be found online.

Here is one of them:

  http://fly.srk.fer.hr/~unreal/theredbook/

If you are really into books, there are two others in the
series, the "Blue Book" which is "The OpenGL Reference Manual"
(basically all of the OpenGL 'man' pages bound together in
dead-tree format) - and the "Green Book" - whose exact title
I forget - something like "OpenGL Programming under X windows".
(There is also a fourth "Alpha Book" (in-joke) which has
to do with OpenGL programming under Windoze).

Personally, I think the Blue, Green and Alpha books are
unnecessary - but YMMV.

If you still have problems, email me privately and I'll do
what I can to help.

-- 
Steve Baker                  http://web2.airmail.net/sjbaker1
sjbaker1@airmail.net (home)  http://www.woodsoup.org/~sbaker
sjbaker@hti.com      (work)