summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/texture.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-09 15:20:58 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-09 16:07:33 -0500
commit5138e55d3eb41255b1436d40ceba134876c3c5cd (patch)
tree5a3e00248c328b097c4b71e225c597d19a372363 /libdimension/dimension/texture.h
parent319491781c1389d82897075b6d890e74d82a08a9 (diff)
downloaddimension-5138e55d3eb41255b1436d40ceba134876c3c5cd.tar.xz
Add support for finishes (BRDFs).
Diffstat (limited to 'libdimension/dimension/texture.h')
-rw-r--r--libdimension/dimension/texture.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libdimension/dimension/texture.h b/libdimension/dimension/texture.h
index c26e840..4d0e2d7 100644
--- a/libdimension/dimension/texture.h
+++ b/libdimension/dimension/texture.h
@@ -50,11 +50,38 @@ dmnsn_pigment *dmnsn_new_pigment();
void dmnsn_delete_pigment(dmnsn_pigment *pigment);
/*
+ * Finishes
+ */
+
+/* Forward-declare dmnsn_finish */
+typedef struct dmnsn_finish dmnsn_finish;
+
+/* Finish callback */
+typedef dmnsn_color dmnsn_finish_fn(const dmnsn_finish *finish,
+ dmnsn_color color, dmnsn_vector x0,
+ dmnsn_vector normal,
+ dmnsn_vector reflected);
+
+/* dmnsn_finish definition */
+struct dmnsn_finish {
+ /* Callbacks */
+ dmnsn_finish_fn *finish_fn;
+ dmnsn_free_fn *free_fn;
+
+ /* Generic pointer */
+ void *ptr;
+};
+
+dmnsn_finish *dmnsn_new_finish();
+void dmnsn_delete_finish(dmnsn_finish *finish);
+
+/*
* A complete texture
*/
typedef struct {
dmnsn_pigment *pigment;
+ dmnsn_finish *finish;
} dmnsn_texture;
dmnsn_texture *dmnsn_new_texture();