summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/light.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-30 18:20:51 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-30 18:21:04 -0400
commit57ee9bfb0dddba7ea06fd0e09c8aa2d80b8eb46d (patch)
treeb30dea9a9c82a7dcd47494cafcf43230dc05bed9 /libdimension/dimension/light.h
parentc2b4dcc7660407f687604afe2c03eff0a4ff3a16 (diff)
downloaddimension-57ee9bfb0dddba7ea06fd0e09c8aa2d80b8eb46d.tar.xz
light: Use pool.
Diffstat (limited to 'libdimension/dimension/light.h')
-rw-r--r--libdimension/dimension/light.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/libdimension/dimension/light.h b/libdimension/dimension/light.h
index aebb2d8..218611d 100644
--- a/libdimension/dimension/light.h
+++ b/libdimension/dimension/light.h
@@ -54,37 +54,23 @@ typedef dmnsn_color dmnsn_light_illumination_fn(const dmnsn_light *light,
*/
typedef bool dmnsn_light_shadow_fn(const dmnsn_light *light, double t);
-/**
- * Light destruction callback.
- * @param[in,out] light The light to free.
- */
-typedef void dmnsn_light_free_fn(dmnsn_light *light);
-
/** A light. */
struct dmnsn_light {
/* Callbacks */
- dmnsn_light_direction_fn *direction_fn; /**< Direction callback. */
+ dmnsn_light_direction_fn *direction_fn; /**< Direction callback. */
dmnsn_light_illumination_fn *illumination_fn; /**< Illumination callback. */
- dmnsn_light_shadow_fn *shadow_fn; /**< Shadow callback. */
- dmnsn_light_free_fn *free_fn; /**< Desctructor callback. */
-
- DMNSN_REFCOUNT; /**< Reference count. */
+ dmnsn_light_shadow_fn *shadow_fn; /**< Shadow callback. */
};
/**
* Create a dummy light.
+ * @param[in] pool The memory pool to allocate from.
* @return The allocated light.
*/
-dmnsn_light *dmnsn_new_light(void);
+dmnsn_light *dmnsn_new_light(dmnsn_pool *pool);
/**
* Initialize a dmnsn_light field.
* @param[out] light The light to initialize.
*/
void dmnsn_init_light(dmnsn_light *light);
-
-/**
- * Delete a light.
- * @param[in,out] light The light to delete.
- */
-void dmnsn_delete_light(dmnsn_light *light);