4. Using glman
details are described later in this chapter. This is an ASCII-encoded input le
inspired by the Photorealistic RenderMan RIB le. You need to have both a
vertex shader and a fragment shader to use glman; you can also have a tessel-
lation shader or a geometry shader if you want, and if your system supports it.
You start by writing a GLIB le that describes your geometry and speci-
es your vertex, tessellation, geometry, and fragment shaders. The GLIB le
can dene uniform variables, including variables that can be changed using
sliders or color pickers. You can edit GLIB and shader les from within glman,
so you can start adding eects to the shaders, or geometry to the GLIB le, to
get incremental results. The glman system will return error messages if you
have compile errors in your shaders, which is very helpful as you begin to
learn to develop them. This experimental approach and incremental develop-
ment of shaders gives you good feedback on what works and lets you create
some very interesting images along the way.
While glman will let you make some very interesting images that illus-
trate how your shaders work, you should realize that it is not a production
tool for creating general graphics applications. There were conscious design
decisions to support only a limited geometry and interaction set, for example.
What it does is give you a tool to develop shaders easily and fairly quickly and
to experiment with shader parameters, and it does that very well.
When you are satised that the shaders you have developed do the things
you want, you can be condent that they will be useable for your other work.
Later chapters discuss how to use shaders for applications, so the shaders you
develop here will be useful there.
You can get glman from this book’s website at hp://www.cgeducation
.org/glman. It runs on Windows, even if you do not have a compiler and pro-
gramming environment on the system. Linux and Macintosh versions are
Figure 4.1. The cycle of experimentation without glman (left) and with glman (right).