Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.

The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.

Hewlett-Packard Company makes no warranty as to the accuracy or completeness of the material included in this text and hereby disclaims any responsibility therefore.

The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact:

For sales outside the U.S., please contact:

Visit us on the Web:

Library of Congress Cataloging-in-Publication DataRost, Randi J., 1960– OpenGL shading language / Randi J. Rost ; with contributions by John M. Kessenich . . . [et al.].—2nd ed.   p. cm. Includes bibliographical references and index. ISBN 0-321-33489-2 (pbk. : alk. paper) 1. Computer graphics. 2. OpenGL. I. Kessenich, John M. II. Title. T385.R665 2006 006.6'86—dc22                                                                    2005029650

Copyright © 2006 Pearson Education, Inc.

Chapter 3 © 2003 John M. Kessenich

Portions of Chapter 4 © 2003 Barthold Lichtenbelt

All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to:

Pearson Education, IncRights and Contracts Department75 Arlington Street, Suite 300Boston, MA 02116Fax (617) 848-7047

Text printed in the United States on recycled paper at Courier in Stoughton, Massachusetts.

First printing, January 2006


To Baby Cakes, Baby Doll, Love Bug, and Little Zooka—thanks for your love and support

To Mom and Pop—my first and best teachers

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.