Property definitions

gamnit $ Material :: defaultinit
# Material for models, or how to draw the model
#
# To create a simple basic blueish material, use `new Material`.
#
# Each class of material is associated to a `GLProgram` and its GPU shaders.
# The simple material `SmoothMaterial` allows to set an ambient, diffuse and specular color.
# To which `TextureMaterial` adds three textures, for each kind of light.
# The `NormalsMaterial` may be useful for debugging, it show the orientation of
# the normal vectors as colors.
#
# ~~~
# import gamnit::depth
#
# var blueish_material = new Material
# var redish_material = new SmoothMaterial([0.3, 0.0, 0.0],
#                                          [0.6, 0.0, 0.0],
#                                          [1.0, 1.0, 1.0])
# var normals_material = new NormalsMaterial
# ~~~
abstract class Material

	# Draw a `model` from `actor`
	#
	# This method should be refined by subclasses as the default implementation is a no-op.
	#
	# This method is called on many materials for many `actor` and `model` at each frame.
	# It is expected to use a `GLProgram` and call an equivalent to `glDrawArrays`.
	# However, it should not call `glClear` nor `GamnitDisplay::flip`.
	fun draw(actor: Actor, model: LeafModel, camera: Camera) do end
end
lib/gamnit/depth/depth_core.nit:143,1--172,3