diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-01-13 15:32:01 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-01-13 15:32:01 -0500 |
commit | c552664a8371a55f2e082507998f78228308672c (patch) | |
tree | 93464a9820630ec2e63a2e53b8f7fab6ff6b28cd /libdimension/dimension/texture.h | |
parent | 6787a9219748575cd63aaadd483f49a4fd83b543 (diff) | |
download | dimension-c552664a8371a55f2e082507998f78228308672c.tar.xz |
Split finish_fn into diffuse_fn and specular_fn.
Diffstat (limited to 'libdimension/dimension/texture.h')
-rw-r--r-- | libdimension/dimension/texture.h | 16 |
1 files changed, 10 insertions, 6 deletions
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; |