-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_scene.c
30 lines (27 loc) · 1.23 KB
/
create_scene.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* create_scene.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dkushche <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/01/31 17:21:22 by dkushche #+# #+# */
/* Updated: 2018/01/31 17:21:22 by dkushche ### ########.fr */
/* */
/* ************************************************************************** */
#include "rtv1.h"
t_scene create_scene(t_camera cam, t_obj *obj, int j, t_inf inf)
{
t_scene res;
int bpp;
int sl;
int endian;
res.cam = cam;
res.obj = obj;
res.n = j;
res.wid = S_WIDTH / 2;
res.hei = S_HEIGHT / 2;
res.im = mlx_new_image(inf.mlx, S_WIDTH / 2, S_HEIGHT / 2);
res.im_d = mlx_get_data_addr(res.im, &bpp, &sl, &endian);
return (res);
}