diff options
Diffstat (limited to 'dimension/realize.c')
-rw-r--r-- | dimension/realize.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/dimension/realize.c b/dimension/realize.c index 1a42be9..7ca3ae2 100644 --- a/dimension/realize.c +++ b/dimension/realize.c @@ -536,8 +536,8 @@ dmnsn_realize_sphere(dmnsn_astnode astnode) return sphere; } -dmnsn_scene * -dmnsn_realize(const dmnsn_array *astree) +static dmnsn_scene * +dmnsn_realize_astree(const dmnsn_array *astree) { dmnsn_scene *scene = dmnsn_new_scene(); if (!scene) { @@ -607,3 +607,13 @@ dmnsn_realize(const dmnsn_array *astree) return scene; } + +dmnsn_scene * +dmnsn_realize(FILE *file, const char *filename) +{ + dmnsn_array *astree = dmnsn_parse(file, filename); + if (!astree) { + return NULL; + } + return dmnsn_realize_astree(astree); +} |