Scenes have a Camera object
This commit is contained in:
parent
6d253aab10
commit
9508b01e10
2 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,13 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "basics.h"
|
||||
#include "camera.h"
|
||||
|
||||
|
||||
typedef struct _Scene
|
||||
{
|
||||
int height, width; /* Pixel dimensions. */
|
||||
Camera *camera;
|
||||
} Scene;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue