OpenGL et GLUT
OpenGL
3. To install GLUT and GLEW, look for the
binary packages on their respective sites.
MacOS X comes with GLUT preinstalled.
Most Linux distributions have GLUT and
GLEW available through their package
system, though for GLUT, you may need
to enable your distribution's optional
"non-free" package repositories, since its
license is not technically open source.
There is an open-source GLUT clone
called OpenGLUT if you're a stickler for
such things.
4. If you're a seasoned C programmer, you
should be able to install these libraries and
get them working in your development
environment without any trouble. But
before we get our hands dirty with any
code, I'm going to go over some big-picture
concepts. In this first chapter, I'm going to
explain the graphics pipeline and the
dataflow of a rendering job. In the next
chapter, we'll write a simple "hello world"
program that draws the contents of an
image file to the screen, showing how the
pipeline is put into practice.
OpenGL
212
Where do I get OpenGL, GLUT, and GLEW?
1. OpenGL comes standard in some form or another on MacOS X,
Windows, and most Linux distributions. If you want to follow these
tutorials, you'll need to ensure your OpenGL implementation supports
at least version 2.0. MacOS X's OpenGL implementation always
supports OpenGL 2.0, at least in software if the graphics card driver
doesn't provide it. On Windows, you're dependent on your graphics
card drivers to provide OpenGL 2 or later. You can use RealTech's free
OpenGL Extensions Viewer to see what OpenGL version your driver
supports. nVidia and AMD's OpenGL drivers support at least OpenGL
2.0 on all of their video cards released in the past four years. Users of
Intel onboard graphics and older graphics cards are less fortunate. For
a fallback, Mesa provides an open-source, cross-platform software
OpenGL 2.1 implementation that works on Windows and almost all
Unix platforms.
2. Mesa is also the most common OpenGL implementation on Linux,
where it also works with the X server to interface OpenGL with
graphics hardware using "direct rendering interface" (DRI) drivers. You
can see whether your particular DRI driver supports OpenGL 2.0 by
running the glxinfo command from an xterm. If OpenGL 2.0 isn't
supported on your hardware, you can disable the driver to fall back to
Mesa's software implementation. nVidia also provides their own
proprietary OpenGL implementation for Linux targeting their own
GPUs; this implementation should provide OpenGL 2.0 or later on any
recent nVidia card.