diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-11-06 18:10:18 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-11-06 18:10:41 +0300 |
commit | e15076b22f4f015404b3140d8169734cce80407c (patch) | |
tree | 19c218f3c128ca34417dd2b844f90b30b6483084 /source/blender/render/extern | |
parent | 235c309e5f86e84fb08e1ff2c5c11eb0b775c388 (diff) |
Cleanup: Render Module: move header files to main directory
Move headers files from `render/extern/` to `render/`
Part of T73586
Diffstat (limited to 'source/blender/render/extern')
-rw-r--r-- | source/blender/render/extern/include/RE_bake.h | 128 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_engine.h | 245 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_multires_bake.h | 70 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_pipeline.h | 392 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_render_ext.h | 80 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_shader_ext.h | 83 |
6 files changed, 0 insertions, 998 deletions
diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h deleted file mode 100644 index 3ed41ede006..00000000000 --- a/source/blender/render/extern/include/RE_bake.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2010 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup render - */ - -#pragma once - -struct Depsgraph; -struct ImBuf; -struct Mesh; -struct Render; - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct BakeImage { - struct Image *image; - int width; - int height; - size_t offset; -} BakeImage; - -typedef struct BakeImages { - BakeImage *data; /* all the images of an object */ - int *lookup; /* lookup table from Material to BakeImage */ - int size; -} BakeImages; - -typedef struct BakePixel { - int primitive_id, object_id; - float uv[2]; - float du_dx, du_dy; - float dv_dx, dv_dy; -} BakePixel; - -typedef struct BakeHighPolyData { - struct Object *ob; - struct Object *ob_eval; - struct Mesh *me; - bool is_flip_object; - - float obmat[4][4]; - float imat[4][4]; -} BakeHighPolyData; - -/* external_engine.c */ -bool RE_bake_has_engine(struct Render *re); - -bool RE_bake_engine(struct Render *re, - struct Depsgraph *depsgraph, - struct Object *object, - const int object_id, - const BakePixel pixel_array[], - const BakeImages *bake_images, - const int depth, - const eScenePassType pass_type, - const int pass_filter, - float result[]); - -/* bake.c */ -int RE_pass_depth(const eScenePassType pass_type); - -bool RE_bake_pixels_populate_from_objects(struct Mesh *me_low, - BakePixel pixel_array_from[], - BakePixel pixel_array_to[], - BakeHighPolyData highpoly[], - const int tot_highpoly, - const size_t num_pixels, - const bool is_custom_cage, - const float cage_extrusion, - const float max_ray_distance, - float mat_low[4][4], - float mat_cage[4][4], - struct Mesh *me_cage); - -void RE_bake_pixels_populate(struct Mesh *me, - struct BakePixel *pixel_array, - const size_t num_pixels, - const struct BakeImages *bake_images, - const char *uv_layer); - -void RE_bake_mask_fill(const BakePixel pixel_array[], const size_t num_pixels, char *mask); - -void RE_bake_margin(struct ImBuf *ibuf, char *mask, const int margin); - -void RE_bake_normal_world_to_object(const BakePixel pixel_array[], - const size_t num_pixels, - const int depth, - float result[], - struct Object *ob, - const eBakeNormalSwizzle normal_swizzle[3]); -void RE_bake_normal_world_to_tangent(const BakePixel pixel_array[], - const size_t num_pixels, - const int depth, - float result[], - struct Mesh *me, - const eBakeNormalSwizzle normal_swizzle[3], - float mat[4][4]); -void RE_bake_normal_world_to_world(const BakePixel pixel_array[], - const size_t num_pixels, - const int depth, - float result[], - const eBakeNormalSwizzle normal_swizzle[3]); - -void RE_bake_ibuf_clear(struct Image *image, const bool is_tangent); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h deleted file mode 100644 index e53f33eacff..00000000000 --- a/source/blender/render/extern/include/RE_engine.h +++ /dev/null @@ -1,245 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup render - */ - -#pragma once - -#include "DNA_listBase.h" -#include "DNA_node_types.h" -#include "DNA_scene_types.h" -#include "RE_bake.h" -#include "RNA_types.h" - -#include "BLI_threads.h" - -struct BakePixel; -struct Depsgraph; -struct Main; -struct Object; -struct Render; -struct RenderData; -struct RenderEngine; -struct RenderEngineType; -struct RenderLayer; -struct RenderResult; -struct ReportList; -struct Scene; -struct ViewLayer; -struct bNode; -struct bNodeTree; - -#ifdef __cplusplus -extern "C" { -#endif - -/* External Engine */ - -/* RenderEngineType.flag */ -#define RE_INTERNAL 1 -/* #define RE_FLAG_DEPRECATED 2 */ -#define RE_USE_PREVIEW 4 -#define RE_USE_POSTPROCESS 8 -#define RE_USE_EEVEE_VIEWPORT 16 -#define RE_USE_SAVE_BUFFERS 32 -#define RE_USE_SHADING_NODES_CUSTOM 64 -#define RE_USE_SPHERICAL_STEREO 128 -#define RE_USE_STEREO_VIEWPORT 256 -#define RE_USE_GPU_CONTEXT 512 - -/* RenderEngine.flag */ -#define RE_ENGINE_ANIMATION 1 -#define RE_ENGINE_PREVIEW 2 -#define RE_ENGINE_DO_DRAW 4 -#define RE_ENGINE_DO_UPDATE 8 -#define RE_ENGINE_RENDERING 16 -#define RE_ENGINE_HIGHLIGHT_TILES 32 - -extern ListBase R_engines; - -typedef struct RenderEngineType { - struct RenderEngineType *next, *prev; - - /* type info */ - char idname[64]; /* best keep the same size as BKE_ST_MAXNAME. */ - char name[64]; - int flag; - - void (*update)(struct RenderEngine *engine, struct Main *bmain, struct Depsgraph *depsgraph); - void (*render)(struct RenderEngine *engine, struct Depsgraph *depsgraph); - void (*bake)(struct RenderEngine *engine, - struct Depsgraph *depsgraph, - struct Object *object, - const int pass_type, - const int pass_filter, - const int width, - const int height); - - void (*view_update)(struct RenderEngine *engine, - const struct bContext *context, - struct Depsgraph *depsgraph); - void (*view_draw)(struct RenderEngine *engine, - const struct bContext *context, - struct Depsgraph *depsgraph); - - void (*update_script_node)(struct RenderEngine *engine, - struct bNodeTree *ntree, - struct bNode *node); - void (*update_render_passes)(struct RenderEngine *engine, - struct Scene *scene, - struct ViewLayer *view_layer); - - struct DrawEngineType *draw_engine; - - /* RNA integration */ - ExtensionRNA rna_ext; -} RenderEngineType; - -typedef void (*update_render_passes_cb_t)(void *userdata, - struct Scene *scene, - struct ViewLayer *view_layer, - const char *name, - int channels, - const char *chanid, - eNodeSocketDatatype type); - -typedef struct RenderEngine { - RenderEngineType *type; - void *py_instance; - - int flag; - struct Object *camera_override; - unsigned int layer_override; - - int tile_x; - int tile_y; - - struct Render *re; - ListBase fullresult; - char text[512]; /* IMA_MAX_RENDER_TEXT */ - - int resolution_x, resolution_y; - - struct ReportList *reports; - - struct { - const struct BakePixel *pixels; - float *result; - int width, height, depth; - int object_id; - } bake; - - /* Depsgraph */ - struct Depsgraph *depsgraph; - - /* callback for render pass query */ - ThreadMutex update_render_passes_mutex; - update_render_passes_cb_t update_render_passes_cb; - void *update_render_passes_data; - - rctf last_viewplane; - rcti last_disprect; - float last_viewmat[4][4]; - int last_winx, last_winy; -} RenderEngine; - -RenderEngine *RE_engine_create(RenderEngineType *type); -void RE_engine_free(RenderEngine *engine); - -void RE_layer_load_from_file( - struct RenderLayer *layer, struct ReportList *reports, const char *filename, int x, int y); -void RE_result_load_from_file(struct RenderResult *result, - struct ReportList *reports, - const char *filename); - -struct RenderResult *RE_engine_begin_result( - RenderEngine *engine, int x, int y, int w, int h, const char *layername, const char *viewname); -void RE_engine_update_result(RenderEngine *engine, struct RenderResult *result); -void RE_engine_add_pass(RenderEngine *engine, - const char *name, - int channels, - const char *chan_id, - const char *layername); -void RE_engine_end_result(RenderEngine *engine, - struct RenderResult *result, - bool cancel, - bool highlight, - bool merge_results); -struct RenderResult *RE_engine_get_result(struct RenderEngine *engine); - -const char *RE_engine_active_view_get(RenderEngine *engine); -void RE_engine_active_view_set(RenderEngine *engine, const char *viewname); -float RE_engine_get_camera_shift_x(RenderEngine *engine, - struct Object *camera, - bool use_spherical_stereo); -void RE_engine_get_camera_model_matrix(RenderEngine *engine, - struct Object *camera, - bool use_spherical_stereo, - float *r_modelmat); -bool RE_engine_get_spherical_stereo(RenderEngine *engine, struct Object *camera); - -bool RE_engine_test_break(RenderEngine *engine); -void RE_engine_update_stats(RenderEngine *engine, const char *stats, const char *info); -void RE_engine_update_progress(RenderEngine *engine, float progress); -void RE_engine_update_memory_stats(RenderEngine *engine, float mem_used, float mem_peak); -void RE_engine_report(RenderEngine *engine, int type, const char *msg); -void RE_engine_set_error_message(RenderEngine *engine, const char *msg); - -int RE_engine_render(struct Render *re, int do_all); - -bool RE_engine_is_external(const struct Render *re); - -void RE_engine_frame_set(struct RenderEngine *engine, int frame, float subframe); - -void RE_engine_update_render_passes(struct RenderEngine *engine, - struct Scene *scene, - struct ViewLayer *view_layer, - update_render_passes_cb_t callback, - void *callback_data); -void RE_engine_register_pass(struct RenderEngine *engine, - struct Scene *scene, - struct ViewLayer *view_layer, - const char *name, - int channels, - const char *chanid, - eNodeSocketDatatype type); - -/* Engine Types */ - -void RE_engines_init(void); -void RE_engines_exit(void); -void RE_engines_register(RenderEngineType *render_type); - -bool RE_engine_is_opengl(RenderEngineType *render_type); - -RenderEngineType *RE_engines_find(const char *idname); - -rcti *RE_engine_get_current_tiles(struct Render *re, int *r_total_tiles, bool *r_needs_free); -struct RenderData *RE_engine_get_render_data(struct Render *re); -void RE_bake_engine_set_engine_parameters(struct Render *re, - struct Main *bmain, - struct Scene *scene); - -void RE_engine_free_blender_memory(struct RenderEngine *engine); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/render/extern/include/RE_multires_bake.h b/source/blender/render/extern/include/RE_multires_bake.h deleted file mode 100644 index fd200e85719..00000000000 --- a/source/blender/render/extern/include/RE_multires_bake.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2010 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup render - */ - -#pragma once - -struct MultiresBakeRender; -struct Scene; - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct MultiresBakeRender { - Scene *scene; - DerivedMesh *lores_dm, *hires_dm; - int bake_filter; /* Bake-filter, aka margin */ - int lvl, tot_lvl; - short mode; - bool use_lores_mesh; /* Use low-resolution mesh when baking displacement maps */ - - /* material aligned image array (for per-face bake image) */ - struct { - Image **array; - int len; - } ob_image; - - int number_of_rays; /* Number of rays to be cast when doing AO baking */ - float bias; /* Bias between object and start ray point when doing AO baking */ - - int tot_obj, tot_image; - ListBase image; - - int baked_objects, baked_faces; - - int raytrace_structure; /* Optimization structure to be used for AO baking */ - int octree_resolution; /* Reslution of octotree when using octotree optimization structure */ - int threads; /* Number of threads to be used for baking */ - - float user_scale; /* User scale used to scale displacement when baking derivative map. */ - - short *stop; - short *do_update; - float *progress; -} MultiresBakeRender; - -void RE_multires_bake_images(struct MultiresBakeRender *bkr); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h deleted file mode 100644 index 4dd2b300700..00000000000 --- a/source/blender/render/extern/include/RE_pipeline.h +++ /dev/null @@ -1,392 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup render - */ - -#pragma once - -#include "DEG_depsgraph.h" -#include "DNA_listBase.h" -#include "DNA_vec_types.h" - -struct Image; -struct ImageFormatData; -struct Main; -struct Object; -struct RenderData; -struct RenderResult; -struct ReportList; -struct Scene; -struct StampData; -struct ViewLayer; -struct bMovieHandle; - -#ifdef __cplusplus -extern "C" { -#endif - -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -/* this include is what is exposed of render to outside world */ -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -/* length of the scene name + passname */ -#define RE_MAXNAME ((MAX_ID_NAME - 2) + 10) - -/* only used as handle */ -typedef struct Render Render; - -/* Render Result usage: - * - * - render engine allocates/frees and delivers raw floating point rects - * - right now it's full rects, but might become tiles or file - * - the display client has to allocate display rects, sort out what to display, - * and how it's converted - */ - -typedef struct RenderView { - struct RenderView *next, *prev; - char name[64]; /* EXR_VIEW_MAXNAME */ - - /* if this exists, result of composited layers */ - float *rectf; - /* if this exists, result of composited layers */ - float *rectz; - /* optional, 32 bits version of picture, used for sequencer, ogl render and image curves */ - int *rect32; - -} RenderView; - -typedef struct RenderPass { - struct RenderPass *next, *prev; - int channels; - char name[64]; /* amount defined in openexr_multi.h */ - char chan_id[8]; /* amount defined in openexr_multi.h */ - float *rect; - int rectx, recty; - - char fullname[64]; /* EXR_PASS_MAXNAME */ - char view[64]; /* EXR_VIEW_MAXNAME */ - int view_id; /* quick lookup */ - - int pad; -} RenderPass; - -/* a renderlayer is a full image, but with all passes and samples */ -/* size of the rects is defined in RenderResult */ -/* after render, the Combined pass is in combined, - * for renderlayers read from files it is a real pass */ -typedef struct RenderLayer { - struct RenderLayer *next, *prev; - - /** copy of RenderData */ - char name[RE_MAXNAME]; - int layflag, passflag, pass_xor; - - int rectx, recty; - - /** Optional saved endresult on disk. */ - void *exrhandle; - - ListBase passes; - -} RenderLayer; - -typedef struct RenderResult { - struct RenderResult *next, *prev; - - /* target image size */ - int rectx, recty; - short crop, sample_nr; - - /* The following rect32, rectf and rectz buffers are for temporary storage only, - * for RenderResult structs created in #RE_AcquireResultImage - which do not have RenderView */ - - /* optional, 32 bits version of picture, used for ogl render and image curves */ - int *rect32; - /* if this exists, a copy of one of layers, or result of composited layers */ - float *rectf; - /* if this exists, a copy of one of layers, or result of composited layers */ - float *rectz; - - /* coordinates within final image (after cropping) */ - rcti tilerect; - /* offset to apply to get a border render in full image */ - int xof, yof; - - /* the main buffers */ - ListBase layers; - - /* multiView maps to a StringVector in OpenEXR */ - ListBase views; /* RenderView */ - - /* allowing live updates: */ - volatile rcti renrect; - volatile RenderLayer *renlay; - - /* optional saved endresult on disk */ - int do_exr_tile; - - /* for render results in Image, verify validity for sequences */ - int framenr; - - /* for acquire image, to indicate if it there is a combined layer */ - int have_combined; - - /* render info text */ - char *text; - char *error; - - struct StampData *stamp_data; -} RenderResult; - -typedef struct RenderStats { - int cfra; - bool localview; - double starttime, lastframetime; - const char *infostr, *statstr; - char scene_name[MAX_ID_NAME - 2]; - float mem_used, mem_peak; -} RenderStats; - -/* *********************** API ******************** */ - -/* the name is used as identifier, so elsewhere in blender the result can retrieved */ -/* calling a new render with same name, frees automatic existing render */ -struct Render *RE_NewRender(const char *name); -struct Render *RE_GetRender(const char *name); - -struct Scene; -struct Render *RE_NewSceneRender(const struct Scene *scene); -struct Render *RE_GetSceneRender(const struct Scene *scene); - -/* assign default dummy callbacks */ -void RE_InitRenderCB(struct Render *re); - -/* use free render as signal to do everything over (previews) */ -void RE_FreeRender(struct Render *re); -/* only called on exit */ -void RE_FreeAllRender(void); -/* Free memory used by persistent data. - * Invoked when loading new file. - */ -void RE_FreeAllPersistentData(void); -/* only call on file load */ -void RE_FreeAllRenderResults(void); -/* for external render engines that can keep persistent data */ -void RE_FreePersistentData(void); - -/* get results and statistics */ -void RE_FreeRenderResult(struct RenderResult *rr); -struct RenderResult *RE_AcquireResultRead(struct Render *re); -struct RenderResult *RE_AcquireResultWrite(struct Render *re); -void RE_ReleaseResult(struct Render *re); -void RE_AcquireResultImageViews(struct Render *re, struct RenderResult *rr); -void RE_ReleaseResultImageViews(struct Render *re, struct RenderResult *rr); -void RE_AcquireResultImage(struct Render *re, struct RenderResult *rr, const int view_id); -void RE_ReleaseResultImage(struct Render *re); -void RE_SwapResult(struct Render *re, struct RenderResult **rr); -void RE_ClearResult(struct Render *re); -struct RenderStats *RE_GetStats(struct Render *re); - -void RE_ResultGet32(struct Render *re, unsigned int *rect); -void RE_AcquiredResultGet32(struct Render *re, - struct RenderResult *result, - unsigned int *rect, - const int view_id); - -void RE_render_result_rect_from_ibuf(struct RenderResult *rr, - struct RenderData *rd, - struct ImBuf *ibuf, - const int view_id); - -struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name); -float *RE_RenderLayerGetPass(volatile struct RenderLayer *rl, - const char *name, - const char *viewname); - -bool RE_HasSingleLayer(struct Render *re); - -/* add passes for grease pencil */ -struct RenderPass *RE_create_gp_pass(struct RenderResult *rr, - const char *layername, - const char *viewname); - -void RE_create_render_pass(struct RenderResult *rr, - const char *name, - int channels, - const char *chan_id, - const char *layername, - const char *viewname); - -/* obligatory initialize call, disprect is optional */ -void RE_InitState(struct Render *re, - struct Render *source, - struct RenderData *rd, - struct ListBase *render_layers, - struct ViewLayer *single_layer, - int winx, - int winy, - rcti *disprect); -void RE_ChangeResolution(struct Render *re, int winx, int winy, rcti *disprect); -void RE_ChangeModeFlag(struct Render *re, int flag, bool clear); - -/* set up the viewplane/perspective matrix, three choices */ -struct Object *RE_GetCamera(struct Render *re); /* return camera override if set */ -void RE_SetOverrideCamera(struct Render *re, struct Object *cam_ob); -void RE_SetCamera(struct Render *re, struct Object *cam_ob); -void RE_SetWindow(struct Render *re, const rctf *viewplane, float clip_start, float clip_end); -void RE_SetOrtho(struct Render *re, const rctf *viewplane, float clip_start, float clip_end); - -/* get current view and window transform */ -void RE_GetViewPlane(struct Render *re, rctf *r_viewplane, rcti *r_disprect); - -/* set the render threads based on the command-line and autothreads setting */ -void RE_init_threadcount(Render *re); - -bool RE_WriteRenderViewsImage(struct ReportList *reports, - struct RenderResult *rr, - struct Scene *scene, - const bool stamp, - char *name); -bool RE_WriteRenderViewsMovie(struct ReportList *reports, - struct RenderResult *rr, - struct Scene *scene, - struct RenderData *rd, - struct bMovieHandle *mh, - void **movie_ctx_arr, - const int totvideos, - bool preview); - -/* only RE_NewRender() needed, main Blender render calls */ -void RE_RenderFrame(struct Render *re, - struct Main *bmain, - struct Scene *scene, - struct ViewLayer *single_layer, - struct Object *camera_override, - int frame, - const bool write_still); -void RE_RenderAnim(struct Render *re, - struct Main *bmain, - struct Scene *scene, - struct ViewLayer *single_layer, - struct Object *camera_override, - int sfra, - int efra, - int tfra); -#ifdef WITH_FREESTYLE -void RE_RenderFreestyleStrokes(struct Render *re, - struct Main *bmain, - struct Scene *scene, - int render); -void RE_RenderFreestyleExternal(struct Render *re); -#endif - -/* Free memory and clear runtime data which is only needed during rendering. */ -void RE_CleanAfterRender(struct Render *re); - -void RE_SetActiveRenderView(struct Render *re, const char *viewname); -const char *RE_GetActiveRenderView(struct Render *re); - -/* error reporting */ -void RE_SetReports(struct Render *re, struct ReportList *reports); - -/* main preview render call */ -void RE_PreviewRender(struct Render *re, struct Main *bmain, struct Scene *scene); - -bool RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode); -bool RE_WriteRenderResult(struct ReportList *reports, - RenderResult *rr, - const char *filename, - struct ImageFormatData *imf, - const char *view, - int layer); -struct RenderResult *RE_MultilayerConvert( - void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty); - -/* display and event callbacks */ -void RE_display_init_cb(struct Render *re, - void *handle, - void (*f)(void *handle, RenderResult *rr)); -void RE_display_clear_cb(struct Render *re, - void *handle, - void (*f)(void *handle, RenderResult *rr)); -void RE_display_update_cb(struct Render *re, - void *handle, - void (*f)(void *handle, RenderResult *rr, volatile struct rcti *rect)); -void RE_stats_draw_cb(struct Render *re, void *handle, void (*f)(void *handle, RenderStats *rs)); -void RE_progress_cb(struct Render *re, void *handle, void (*f)(void *handle, float)); -void RE_draw_lock_cb(struct Render *re, void *handle, void (*f)(void *handle, int)); -void RE_test_break_cb(struct Render *re, void *handle, int (*f)(void *handle)); -void RE_current_scene_update_cb(struct Render *re, - void *handle, - void (*f)(void *handle, struct Scene *scene)); - -void RE_gl_context_create(Render *re); -void RE_gl_context_destroy(Render *re); -void *RE_gl_context_get(Render *re); -void *RE_gpu_context_get(Render *re); - -/* should move to kernel once... still unsure on how/where */ -float RE_filter_value(int type, float x); - -int RE_seq_render_active(struct Scene *scene, struct RenderData *rd); - -bool RE_layers_have_name(struct RenderResult *result); -bool RE_passes_have_name(struct RenderLayer *rl); - -struct RenderPass *RE_pass_find_by_name(volatile struct RenderLayer *rl, - const char *name, - const char *viewname); -struct RenderPass *RE_pass_find_by_type(volatile struct RenderLayer *rl, - int passtype, - const char *viewname); - -/* shaded view or baking options */ -#define RE_BAKE_NORMALS 0 -#define RE_BAKE_DISPLACEMENT 1 -#define RE_BAKE_AO 2 - -void RE_GetCameraWindow(struct Render *re, struct Object *camera, float mat[4][4]); -void RE_GetCameraWindowWithOverscan(struct Render *re, float overscan, float r_winmat[4][4]); -void RE_GetCameraModelMatrix(struct Render *re, struct Object *camera, float r_modelmat[4][4]); -struct Scene *RE_GetScene(struct Render *re); -void RE_SetScene(struct Render *re, struct Scene *sce); - -bool RE_is_rendering_allowed(struct Scene *scene, - struct ViewLayer *single_layer, - struct Object *camera_override, - struct ReportList *reports); - -bool RE_allow_render_generic_object(struct Object *ob); - -/******* defined in render_result.c *********/ - -bool RE_HasCombinedLayer(RenderResult *res); -bool RE_HasFloatPixels(RenderResult *res); -bool RE_RenderResult_is_stereo(RenderResult *res); -struct RenderView *RE_RenderViewGetById(struct RenderResult *rr, const int view_id); -struct RenderView *RE_RenderViewGetByName(struct RenderResult *rr, const char *viewname); - -RenderResult *RE_DuplicateRenderResult(RenderResult *rr); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h deleted file mode 100644 index 76812840c91..00000000000 --- a/source/blender/render/extern/include/RE_render_ext.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 by Blender Foundation - * All rights reserved. - */ -/** \file - * \ingroup render - */ - -#pragma once - -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -/* this include is for non-render pipeline exports (still old cruft here) */ -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -/* called by meshtools */ -struct Depsgraph; -struct ImagePool; -struct MTex; - -#ifdef __cplusplus -extern "C" { -#endif - -/* render_texture.c */ -bool RE_texture_evaluate(const struct MTex *mtex, - const float vec[3], - const int thread, - struct ImagePool *pool, - const bool skip_load_image, - const bool texnode_preview, - /* Return arguments. */ - float *r_intensity, - float r_rgba[4]) ATTR_NONNULL(1, 2, 7, 8); - -void texture_rgb_blend( - float in[3], const float tex[3], const float out[3], float fact, float facg, int blendtype); -float texture_value_blend(float tex, float out, float fact, float facg, int blendtype); - -void RE_texture_rng_init(void); -void RE_texture_rng_exit(void); - -/* imagetexture.c */ -void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float result[4]); - -/* pointdensity.c */ -struct PointDensity; - -void RE_point_density_cache(struct Depsgraph *depsgraph, struct PointDensity *pd); - -void RE_point_density_minmax(struct Depsgraph *depsgraph, - struct PointDensity *pd, - float r_min[3], - float r_max[3]); - -void RE_point_density_sample(struct Depsgraph *depsgraph, - struct PointDensity *pd, - const int resolution, - float *values); - -void RE_point_density_free(struct PointDensity *pd); - -void RE_point_density_fix_linking(void); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h deleted file mode 100644 index d9d5a924949..00000000000 --- a/source/blender/render/extern/include/RE_shader_ext.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 by Blender Foundation - * All rights reserved. - */ -/** \file - * \ingroup render - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -/* this include is for texture exports */ -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -/* localized texture result data */ -/* note; tr tg tb ta has to remain in this order */ -typedef struct TexResult { - float tin, tr, tg, tb, ta; - int talpha; - float *nor; -} TexResult; - -typedef struct BakeImBufuserData { - float *displacement_buffer; - char *mask_buffer; -} BakeImBufuserData; - -/* node shaders... */ -struct ImagePool; -struct MTex; -struct Tex; - -/* this one uses nodes */ -int multitex_ext(struct Tex *tex, - float texvec[3], - float dxt[3], - float dyt[3], - int osatex, - struct TexResult *texres, - const short thread, - struct ImagePool *pool, - bool scene_color_manage, - const bool skip_load_image); -/* nodes disabled */ -int multitex_ext_safe(struct Tex *tex, - const float texvec[3], - struct TexResult *texres, - struct ImagePool *pool, - bool scene_color_manage, - const bool skip_load_image); -/* only for internal node usage */ -int multitex_nodes(struct Tex *tex, - const float texvec[3], - float dxt[3], - float dyt[3], - int osatex, - struct TexResult *texres, - const short thread, - short which_output, - struct MTex *mtex, - struct ImagePool *pool); - -#ifdef __cplusplus -} -#endif |