When using clangd or running clang-tidy on headers there are currently many errors. These are noisy in IDEs, make auto fixes impossible, and break features like code completion, refactoring and navigation. This makes source/blender headers work by themselves, which is generally the goal anyway. But #includes and forward declarations were often incomplete. * Add #includes and forward declarations * Add IWYU pragma: export in a few places * Remove some unused #includes (but there are many more) * Tweak ShaderCreateInfo macros to work better with clangd Some types of headers still have errors, these could be fixed or worked around with more investigation. Mostly preprocessor template headers like NOD_static_types.h. Note that that disabling WITH_UNITY_BUILD is required for clangd to work properly, otherwise compile_commands.json does not contain the information for the relevant source files. For more details see the developer docs: https://developer.blender.org/docs/handbook/tooling/clangd/ Pull Request: https://projects.blender.org/blender/blender/pulls/132608
77 lines
2.0 KiB
C
77 lines
2.0 KiB
C
/* SPDX-FileCopyrightText: Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup bke
|
|
* \brief General operations for probes.
|
|
*/
|
|
|
|
#include "BLI_sys_types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct LightProbe;
|
|
struct Main;
|
|
struct BlendWriter;
|
|
struct BlendDataReader;
|
|
struct LightProbeObjectCache;
|
|
struct LightProbeGridCacheFrame;
|
|
struct Object;
|
|
|
|
void BKE_lightprobe_type_set(struct LightProbe *probe, short lightprobe_type);
|
|
struct LightProbe *BKE_lightprobe_add(struct Main *bmain, const char *name);
|
|
|
|
void BKE_lightprobe_cache_blend_write(struct BlendWriter *writer,
|
|
struct LightProbeObjectCache *cache);
|
|
|
|
void BKE_lightprobe_cache_blend_read(struct BlendDataReader *reader,
|
|
struct LightProbeObjectCache *cache);
|
|
|
|
/**
|
|
* Create a single empty irradiance grid cache.
|
|
*/
|
|
struct LightProbeGridCacheFrame *BKE_lightprobe_grid_cache_frame_create(void);
|
|
|
|
/**
|
|
* Create a copy of a cache frame.
|
|
* This does not include the in-progress baking data.
|
|
*/
|
|
LightProbeGridCacheFrame *BKE_lightprobe_grid_cache_frame_copy(LightProbeGridCacheFrame *src);
|
|
|
|
/**
|
|
* Free a single grid cache.
|
|
*/
|
|
void BKE_lightprobe_grid_cache_frame_free(struct LightProbeGridCacheFrame *cache);
|
|
|
|
/**
|
|
* Create the grid cache list depending on the lightprobe baking settings.
|
|
* The list is left empty to be filled by the baking process.
|
|
*/
|
|
void BKE_lightprobe_cache_create(struct Object *object);
|
|
|
|
/**
|
|
* Create a copy of a whole cache.
|
|
* This does not include the in-progress baking data.
|
|
*/
|
|
LightProbeObjectCache *BKE_lightprobe_cache_copy(LightProbeObjectCache *src_cache);
|
|
|
|
/**
|
|
* Free all irradiance grids allocated for the given object.
|
|
*/
|
|
void BKE_lightprobe_cache_free(struct Object *object);
|
|
|
|
/**
|
|
* Return the number of sample stored inside an irradiance cache.
|
|
* This depends on the light cache type.
|
|
*/
|
|
int64_t BKE_lightprobe_grid_cache_frame_sample_count(const struct LightProbeGridCacheFrame *cache);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|