CGPdocs

material_mesh_drawable_phong

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

Fields and methods

Members of the struct material_mesh_drawable_phong. Most of what you do with a CGP type goes through the free functions listed below.

Fields

vec3 color = vec3{ 1.0f,1.0f,1.0f }Global RGB color of the object, white by default, sent to the uniform material.color.
float alpha = 1.0Opacity of the object, 1 by default, sent to the uniform material.alpha.
phong_parameters phongPhong 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_settingsTexture 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.

Methods

Sends the color, alpha, Phong coefficients and texture settings to the uniforms material.* of the shader, which must be in use. src

Functions taking a material_mesh_drawable_phong

Draw 2

Documented on another page

  • drawDraw a mesh_drawable with its shader, textures, model and material, plus the environment and optional additional uniforms, possibly instanced or with an overriding material.on mesh_drawable
  • drawDraw a non-indexed triangles_drawable (triangle soup) with its shader, texture, model and material, plus the environment and optional additional uniforms.on triangles_drawable

Functions returning a material_mesh_drawable_phong

None.

Operators

None.

CGP - Computer Graphics Programming.