12
Chapter 1: Getting Started with Cosmo 3D
Classes That Determine How Things Are Drawn
The set of nodes discussed in this section determines how things are drawn.
•“csContext”—Maintains the OpenGL state, for example,
•“The csEnvironment Classes”—Determines how lights and fog are applied to its
children.
csContext
csContext defines the default, global graphics state of shapes in the scene graph. Shapes
inherit some or all of the csContext values according to the values set in a mask.
csAppearance values set on shapes override the default csContext values. Similarly,
geometry values, defined in csContext, can be overridden by individual shapes.
csContext is multi-threaded. A thread can associate a csContext and a csWindow to
facilitate multi-threaded processing. For more information about multi-threading, see
Chapter 13, “Multiprocessing.”
For more general information about csContext, see “csContext Overview” on page 35.
The csEnvironment Classes
The csEnvironment class determines how lights and fog are applied to the scene graph.
The lights that affect a csShape during a csDrawAction are the lights attached to all
ancestor csEnvironments of the shape, plus all lights applied before invoking the
traversal. For more information on lights, see Chapter 8, “Lighting and Fog.”