CLmaterial Struct Reference

Defines a material. More...

#include <cl.h>


Data Fields

GLenum face
CLcolour ambient
CLcolour diffuse
CLcolour specular
CLcolour emission
GLfloat shininess
GLuint display_list


Detailed Description

The CLmaterial struct defines a material. Its members can be passed to the OpenGL function glMaterial():

Example

  CLmaterial material;

  glMaterialfv(material.face, GL_AMBIENT, (GLfloat*)&material.ambient);
  glMaterialfv(material.face, GL_DIFFUSE, (GLfloat*)&material.diffuse);
  glMaterialfv(material.face, GL_SPECULAR, (GLfloat*)&material.specular);
  glMaterialfv(material.face, GL_EMISSION, (GLfloat*)&material.emission);
  glMaterialf(material.face, GL_SHININESS, material.shininess);
  

The face member can also be passed to the glPolygonMode function:

Example

  glPolygonMode(material.face);
  

The display_list member is an OpenGL display list ID. It is set by the clUpdateMaterial() function and called by the clLoadMaterial() function. However, it may also be set and called by the user.

For more information on CLmaterial members consult the OpenGL documentation for glMaterial(), glPolygonMode(), glGenLists(), glNewList(), glEndList(), glCallList(), and glDeleteLists().

Definition at line 476 of file cl.h.


Generated on Thu Dec 27 13:53:41 2007 for CL by  doxygen 1.4.6