Scenes have a Camera object

This commit is contained in:
Eryn Wells 2013-09-06 19:01:15 -07:00
parent 6d253aab10
commit 9508b01e10
2 changed files with 4 additions and 0 deletions

View file

@ -26,6 +26,7 @@ scene_init()
// Set some default values.
new_scene->height = 0;
new_scene->width = 0;
new_scene->camera = camera_init();
return new_scene;
}
@ -43,6 +44,7 @@ scene_destroy(Scene *scene)
return;
}
camera_destroy(scene->camera);
free(scene);
}

View file

@ -10,11 +10,13 @@
#include <stdio.h>
#include "basics.h"
#include "camera.h"
typedef struct _Scene
{
int height, width; /* Pixel dimensions. */
Camera *camera;
} Scene;