Use a material for proceeding vertex draws.
Material or None) – Material descriptor to use. Default material properties are set if None
is specified. This is equivalent to disabling materials.
bool) – Enable textures. Textures specified in a material descriptor’s ‘texture’
attribute will be bound and their respective texture units will be
enabled. Note, when disabling materials, the value of useTextures must
match the previous call. If there are no textures attached to the
material, useTexture will be silently ignored.
If a material mode has a value of None, a color with all components 0.0 will be assigned.
Material colors and shininess values are accessible from shader programs after calling ‘useMaterial’. Values can be accessed via built-in ‘gl_FrontMaterial’ and ‘gl_BackMaterial’ structures (e.g. gl_FrontMaterial.diffuse).
Use a material when drawing:
useMaterial(metalMaterials.gold) drawVAO( ... ) # all meshes drawn will be gold useMaterial(None) # turn off material when done