URL: https://graphicscomputing.fr/cgp/reference/material_mesh_drawable_phong/
Description: Material of a mesh_drawable (color, alpha, Phong coefficients, texture settings).

# material_mesh_drawable_phong

Material of a mesh_drawable (color, alpha, Phong coefficients, texture settings).

Fields:

- `vec3 color` - Global RGB color of the object, white by default, sent to the uniform material.color.
- `float alpha` - Opacity of the object, 1 by default, sent to the uniform material.alpha.
- `phong_parameters phong` - Phong coefficients (ambient 0.3, diffuse 0.6, specular 0.3, specular_exponent 64 by default) sent to the uniforms material.phong.*.
- `texture_settings_parameters texture_settings` - Texture options (active and inverse_v true, two_sided false by default) sent to the uniforms material.texture_settings.use_texture, texture_inverse_v and two_sided.

Functions taking it:

- `void draw(mesh_drawable const& drawable, environment_generic_structure const& environment = environment_generic_structure(), int instance_count = 1, bool expected_uniforms = true, uniform_generic_structure const& additional_uniforms = uniform_generic_structure(), GLenum draw_mode = GL_TRIANGLES, material_mesh_drawable_phong const* material_override = nullptr)` - Draw a mesh_drawable with its shader, textures, model and material, plus the environment and optional additional uniforms, possibly instanced or with an overriding material.
- `void draw(triangles_drawable const& drawable, environment_generic_structure const& environment = environment_generic_structure(), uniform_generic_structure const& additional_uniforms = uniform_generic_structure(), material_mesh_drawable_phong const* material_override = nullptr)` - Draw a non-indexed triangles_drawable (triangle soup) with its shader, texture, model and material, plus the environment and optional additional uniforms.
