glMaterial

specify material parameters for the lighting model

Signature

glMaterial( )->
glMaterial( faces , constant , * args )
glMaterial -- convenience function to dispatch on argument type

    If passed a single argument in args, calls:
        glMaterialfv( faces, constant, args[0] )
    else calls:
        glMaterialf( faces, constant, *args )
    
glMaterialf( GLenum ( face ) , GLenum ( pname ) , GLfloat ( param ) )-> void
glMaterialf( face , pname , param )
glMaterialfv( GLenum ( face ) , GLenum ( pname ) , const GLfloat * ( params ) )-> void
glMaterialfv( face , pname , params )
glMateriali( GLenum ( face ) , GLenum ( pname ) , GLint ( param ) )-> void
glMateriali( face , pname , param )
glMaterialiv( GLenum ( face ) , GLenum ( pname ) , const GLint * ( params ) )-> void
glMaterialiv( face , pname , params )

Parameters

VariablesDescription
face
Specifies which face or faces are being updated. Must be one of GL_FRONT , GL_BACK , or GL_FRONT_AND_BACK .
pname
Specifies the single-valued material parameter of the face or faces that is being updated. Must be GL_SHININESS .
param
Specifies the value that parameter GL_SHININESS will be set to.

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glMaterial
Visvis wobjects/polygonalModeling.py Lines: 1003, 1004, 1005, 1006, 1007
glMaterialf
OpenGLContext OpenGLContext/scenegraph/material.py Lines: 90
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 177
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 110
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 83
{LGPL} PyMT pymt/obj.py Lines: 22, 52
{GPL3} OpenGL-Programmable 01-direct.py Lines: 244
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 338
{GPL3} OpenGL-Programmable 03-array.py Lines: 255
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 371
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 253
{GPL3} OpenGL-Programmable 05-shader.py Lines: 330
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 349
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 274
glMaterialfv
OpenGLContext tests/redbook_trim.py Lines: 90, 91, 92
OpenGLContext tests/redbook_surface.py Lines: 63, 64, 65
OpenGLContext tests/redbook_surface_cb.py Lines: 80, 81, 82
OpenGLContext tests/redbook_alpha3D.py Lines: 76, 77, 127, 128, 136, 137
OpenGLContext OpenGLContext/scenegraph/material.py Lines: 89
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 143, 144, 147, 154, 161, 168
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 237, 243, 249
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 77
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 33, 34, 35, 36
OpenGL-Demo PyOpenGL-Demo/tom/demo.py Lines: 85
OpenGL-Demo PyOpenGL-Demo/tom/conechecker.py Lines: 34, 35, 36, 37
OpenGL-Demo PyOpenGL-Demo/tom/pick.py Lines: 18, 20
OpenGL-Demo PyOpenGL-Demo/tom/text.py Lines: 16
OpenGL-Demo PyOpenGL-Demo/tom/conesave.py Lines: 17, 18, 19, 20
OpenGL-Demo PyOpenGL-Demo/tom/fog.py Lines: 62, 63, 64, 65
OpenGL-Demo PyOpenGL-Demo/tom/cone.py Lines: 13, 14, 15, 16
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 151, 152, 156, 157, 176
OpenGL-Demo PyOpenGL-Demo/proesch/bezier/bezier.py Lines: 125, 126, 127
OpenGL-Demo PyOpenGL-Demo/proesch/stereo/stereoDemo.py Lines: 117, 118, 119
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 105, 107, 109
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 78, 80, 82
{Artistic License} PymmLib applications/glutviewer.py Lines: 77, 78, 79, 80, 81
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 377, 378, 379, 380, 381, 404, 405, 406, 407, 408
{LGPL} PyMT pymt/obj.py Lines: 21, 48, 49, 50, 51
{GPL3} OpenGL-Programmable 01-direct.py Lines: 243
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 337
{GPL3} OpenGL-Programmable 03-array.py Lines: 254
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 370
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 252
{GPL3} OpenGL-Programmable 05-shader.py Lines: 329
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 348
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 273