From c552664a8371a55f2e082507998f78228308672c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 13 Jan 2010 15:32:01 -0500 Subject: Split finish_fn into diffuse_fn and specular_fn. --- libdimension/dimension/texture.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'libdimension/dimension') diff --git a/libdimension/dimension/texture.h b/libdimension/dimension/texture.h index 4b14918..0c2b04b 100644 --- a/libdimension/dimension/texture.h +++ b/libdimension/dimension/texture.h @@ -56,11 +56,14 @@ void dmnsn_delete_pigment(dmnsn_pigment *pigment); /* Forward-declare dmnsn_finish */ typedef struct dmnsn_finish dmnsn_finish; -/* Finish callback */ -typedef dmnsn_color dmnsn_finish_fn(const dmnsn_finish *finish, - dmnsn_color light, dmnsn_color color, - dmnsn_vector ray, dmnsn_vector normal, - dmnsn_vector viewer); +/* Finish callbacks */ +typedef dmnsn_color dmnsn_diffuse_fn(const dmnsn_finish *finish, + dmnsn_color light, dmnsn_color color, + dmnsn_vector ray, dmnsn_vector normal); +typedef dmnsn_color dmnsn_specular_fn(const dmnsn_finish *finish, + dmnsn_color light, dmnsn_color color, + dmnsn_vector ray, dmnsn_vector normal, + dmnsn_vector viewer); typedef dmnsn_color dmnsn_ambient_fn(const dmnsn_finish *finish, dmnsn_color pigment); typedef dmnsn_color dmnsn_reflection_fn(const dmnsn_finish *finish, @@ -70,7 +73,8 @@ typedef dmnsn_color dmnsn_reflection_fn(const dmnsn_finish *finish, /* dmnsn_finish definition */ struct dmnsn_finish { /* Callbacks */ - dmnsn_finish_fn *finish_fn; + dmnsn_diffuse_fn *diffuse_fn; + dmnsn_specular_fn *specular_fn; dmnsn_ambient_fn *ambient_fn; dmnsn_reflection_fn *reflection_fn; dmnsn_free_fn *free_fn; -- cgit v1.2.3