Blender  V2.93
eevee_lightcache.h
Go to the documentation of this file.
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 
23 #pragma once
24 
25 #include "BLI_sys_types.h" /* for bool */
26 
27 struct BlendDataReader;
28 struct BlendWriter;
29 struct EEVEE_Data;
30 struct EEVEE_ViewLayerData;
31 struct LightCache;
32 struct Scene;
33 struct SceneEEVEE;
34 struct ViewLayer;
35 
36 /* Light Bake */
38  struct wmWindow *win,
39  struct Main *bmain,
40  struct ViewLayer *view_layer,
41  struct Scene *scene,
42  int delay,
43  int frame);
44 void *EEVEE_lightbake_job_data_alloc(struct Main *bmain,
45  struct ViewLayer *view_layer,
46  struct Scene *scene,
47  bool run_as_job,
48  int frame);
49 void EEVEE_lightbake_job_data_free(void *custom_data);
50 void EEVEE_lightbake_update(void *custom_data);
51 void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float *progress);
52 
54  struct EEVEE_Data *vedata,
55  const Scene *scene);
56 
57 /* Light Cache */
59  const int cube_len,
60  const int cube_size,
61  const int vis_size,
62  const int irr_size[3]);
63 void EEVEE_lightcache_free(struct LightCache *lcache);
64 bool EEVEE_lightcache_load(struct LightCache *lcache);
65 void EEVEE_lightcache_info_update(struct SceneEEVEE *eevee);
66 
67 void EEVEE_lightcache_blend_write(struct BlendWriter *writer, struct LightCache *cache);
68 void EEVEE_lightcache_blend_read_data(struct BlendDataReader *reader, struct LightCache *cache);
Scene scene
void * EEVEE_lightbake_job_data_alloc(struct Main *bmain, struct ViewLayer *view_layer, struct Scene *scene, bool run_as_job, int frame)
struct LightCache * EEVEE_lightcache_create(const int grid_len, const int cube_len, const int cube_size, const int vis_size, const int irr_size[3])
void EEVEE_lightcache_blend_write(struct BlendWriter *writer, struct LightCache *cache)
void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float *progress)
void EEVEE_lightcache_blend_read_data(struct BlendDataReader *reader, struct LightCache *cache)
struct wmJob * EEVEE_lightbake_job_create(struct wmWindowManager *wm, struct wmWindow *win, struct Main *bmain, struct ViewLayer *view_layer, struct Scene *scene, int delay, int frame)
void EEVEE_lightbake_update_world_quick(struct EEVEE_ViewLayerData *sldata, struct EEVEE_Data *vedata, const Scene *scene)
void EEVEE_lightcache_free(struct LightCache *lcache)
void EEVEE_lightbake_job_data_free(void *custom_data)
void EEVEE_lightcache_info_update(struct SceneEEVEE *eevee)
void EEVEE_lightbake_update(void *custom_data)
bool EEVEE_lightcache_load(struct LightCache *lcache)
Definition: BKE_main.h:116
Definition: wm_jobs.c:73
short do_update
Definition: wm_jobs.c:118
short stop
Definition: wm_jobs.c:118
float progress
Definition: wm_jobs.c:119
wmWindow * win
Definition: wm_jobs.c:77