1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2018, Blender Foundation.
17  */
18 
19 /** \file
20  * \ingroup eevee
21  */
22 
23 #pragma once
24 
25 #include "BLI_sys_types.h" /* for bool */
26 
27 struct EEVEE_Data;
28 struct EEVEE_ViewLayerData;
29 struct LightCache;
30 struct Scene;
31 struct SceneEEVEE;
32 struct ViewLayer;
33 
34 /* Light Bake */
35 struct wmJob *EEVEE_lightbake_job_create(struct wmWindowManager *wm,
36                                          struct wmWindow *win,
37                                          struct Main *bmain,
38                                          struct ViewLayer *view_layer,
39                                          struct Scene *scene,
40                                          int delay,
41                                          int frame);
42 void *EEVEE_lightbake_job_data_alloc(struct Main *bmain,
43                                      struct ViewLayer *view_layer,
44                                      struct Scene *scene,
45                                      bool run_as_job,
46                                      int frame);
47 void EEVEE_lightbake_job_data_free(void *custom_data);
48 void EEVEE_lightbake_update(void *custom_data);
49 void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float *progress);
50 
51 void EEVEE_lightbake_update_world_quick(struct EEVEE_ViewLayerData *sldata,
52                                         struct EEVEE_Data *vedata,
53                                         const Scene *scene);
54 
55 /* Light Cache */
56 struct LightCache *EEVEE_lightcache_create(const int grid_len,
57                                            const int cube_len,
58                                            const int cube_size,
59                                            const int vis_size,
60                                            const int irr_size[3]);
61 void EEVEE_lightcache_free(struct LightCache *lcache);
62 bool EEVEE_lightcache_load(struct LightCache *lcache);
63 void EEVEE_lightcache_info_update(struct SceneEEVEE *eevee);
64