Web server - OpenGL Super Bible! Page 347 Reference Section glColorMaterial

OpenGL Super Bible! Page 347 Reference Section glColorMaterial Purpose Allows material colors to track the current color as set by glColor. Include File Syntax void glColorMaterial(GLenum face, GLenum mode); Description This function allows material properties to be set without having to call glMaterial directly. By using this function, certain material properties can be set to follow the current color as specified by glColor. By default, color tracking is disabled; to enable it, you must also call glEnable(GL_COLOR_MATERIAL). To disable color tracking again, call glDisable(GL_COLOR_MATERIAL). Parameters face GLenum: Specifies if the front (GL_FRONT), back (GL_BACK), or both (GL_FRONT_AND_BACK) should follow the current color. mode GLenum: Specifies which material property should be following the current color. This can be GL_EMISSION, GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, or GL_AMBIENT_AND_DIFFUSE. Returns None. Example The following code from the AMBIENT example program enables color tracking, then sets the front material parameters for ambient and diffuse reflectivity to follow the colors specified by glColor. glEnable(GL_COLOR_MATERIAL); // Enable Material color tracking // Front material ambient and diffuse colors track glColor glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE); See Also glColor, glMaterial, glLight, glLightModel
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply