Graphics Reference
In-Depth Information
tures of your graphics scene and documenting the uniform variable value
setings that made this scene.
Exercises
The exercises in this chapter will give you some experience in working with
the glman application, which should make it easier for you to do the work
on shaders in later chapters. Exercises in later chapters will ask for you to do
things in glman to work with the functionality of different shader types.
1. In the previous chapter we gave some examples of shaders to create some
of the chapter's figures, and in this chapter we showed the GLIB files that
worked with them to create the figures. For at least one of these, identify
each of the GLIB file commands and show how it led to features of the
figure(s) it helped create.
2. The glman interface panel has a number of functions, and you should
take a moment to exercise as many of those as you can. In particular, use
the eye transformation, hardcopy, object selection and manipulation, and
frame rate options, and analyze and note what each of these does.
3. Use the editing functions of glman to make small changes in the GLIB
file and the vertex and fragment shader files and note the effect of the
changes. Do this by first loading a GLIB file and noting the image, and
then editing one or more of the files and using the Reload function. This
cycle should become very familiar to you as you develop your shaders.
4. The glman tool provides a number of different graphics primitives. Use
several primitives in a single scene (described in a GLIB file) to see how
each looks. Use translations so they won't all be drawn on top of each
other, and use a different color for each.
5. Create a scene with at least two objects whose color is set by a glman uni-
form color variable. (You can do this as part of Exercise 4.)
6. Create a scene with an object whose properties (for example the density
and frequency of the screen in the pixel-discard shader in the previous
file) are set by a glman uniform slider variable. (You can do this as part of
Exercise 4.)
7. Create a scene that includes a graphics object defined by an .obj file. You
can get such iles from the topic's website, or you can get such iles from
the topic's website htp://www.cgeducation.org.
8. Create a scene that uses texturing on a graphics primitive. You may need
to refer to Chapter 8 for some details.
Search WWH ::




Custom Search