# osg::ShadeModel Class Reference

Class which encapsulates glShadeModel(..). More...

Inheritance diagram for osg::ShadeModel:

[legend]
List of all members.

## Public Types

enum | Mode { FLAT = GL_FLAT, SMOOTH = GL_SMOOTH }

## Public Member Functions

| ShadeModel ()
| ShadeModel (const ShadeModel &sm, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
| Copy constructor using CopyOp to manage deep vs shallow copy.
| META_StateAttribute (osg, ShadeModel, SHADEMODEL)
virtual int | compare (const StateAttribute &sa) const
| return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
void | setMode (Mode mode)
Mode | getMode () const
virtual void | apply (State &state) const
| apply the OpenGL state attributes.

## Protected Member Functions

virtual | ~ShadeModel ()

## Protected Attributes

Mode | _mode

## Detailed Description

Class which encapsulates glShadeModel(..).

## Member Enumeration Documentation

enum osg::ShadeModel::Mode

Enumeration values:

  FLAT |
  SMOOTH |

## Constructor & Destructor Documentation

ShadeModel::ShadeModel | ( |  | ) |

osg::ShadeModel::ShadeModel | ( | const ShadeModel & | sm,
|  | const CopyOp & | copyop = `CopyOp::SHALLOW_COPY`
| ) | `[inline]`

| Copy constructor using CopyOp to manage deep vs shallow copy.

ShadeModel::~ShadeModel | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

void ShadeModel::apply | ( | State & | state | ) | const`[virtual]`

| apply the OpenGL state attributes. The global state for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state. Implements osg::StateAttribute.

virtual int osg::ShadeModel::compare | ( | const StateAttribute & | sa | ) | const`[inline, virtual]`

| return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. Implements osg::StateAttribute.

Mode osg::ShadeModel::getMode | ( |  | ) | const`[inline]`

osg::ShadeModel::META_StateAttribute | ( | osg | ,
|  | ShadeModel | ,
|  | SHADEMODEL |
| ) |

void osg::ShadeModel::setMode | ( | Mode | mode | ) | `[inline]`

## Member Data Documentation

Mode osg::ShadeModel::_mode `[protected]`

The documentation for this class was generated from the following files:

- ShadeModel
- ShadeModel.cpp