From 9952699978a132e4866acd26817fb9cfec23419d Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 28 Jul 2014 14:29:03 -0300 Subject: Bake-API: use size_t instead of width, height (original patch by Sergey Sharybin) Note: RNA API can't use size_t at the moment. Once it does this patch can be tweaked a bit to fully benefit from size_t larger dimensions. (right now num_pixels is passed as int) Reviewed By: sergey, campbellbarton Differential Revision: https://developer.blender.org/D688 --- source/blender/render/extern/include/RE_bake.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/render/extern/include/RE_bake.h') diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h index 8f2a0e382a4..481da452529 100644 --- a/source/blender/render/extern/include/RE_bake.h +++ b/source/blender/render/extern/include/RE_bake.h @@ -39,7 +39,7 @@ typedef struct BakeImage { struct Image *image; int width; int height; - int offset; + size_t offset; } BakeImage; typedef struct BakeImages { @@ -72,35 +72,35 @@ bool RE_bake_has_engine(struct Render *re); bool RE_bake_engine( struct Render *re, struct Object *object, const BakePixel pixel_array[], - const int num_pixels, const int depth, const ScenePassType pass_type, float result[]); + const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); /* bake.c */ int RE_pass_depth(const ScenePassType pass_type); bool RE_bake_internal( struct Render *re, struct Object *object, const BakePixel pixel_array[], - const int num_pixels, const int depth, const ScenePassType pass_type, float result[]); + const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); bool RE_bake_pixels_populate_from_objects( struct Mesh *me_low, BakePixel pixel_array_from[], - BakeHighPolyData highpoly[], const int tot_highpoly, const int num_pixels, const bool is_custom_cage, + BakeHighPolyData highpoly[], const int tot_highpoly, const size_t num_pixels, const bool is_custom_cage, const float cage_extrusion, 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 int num_pixels, const struct BakeImages *bake_images, const char *uv_layer); + const size_t num_pixels, const struct BakeImages *bake_images, const char *uv_layer); -void RE_bake_mask_fill(const BakePixel pixel_array[], const int num_pixels, char *mask); +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 int num_pixels, const int depth, float result[], + const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], struct Object *ob, const BakeNormalSwizzle normal_swizzle[3]); void RE_bake_normal_world_to_tangent( - const BakePixel pixel_array[], const int num_pixels, const int depth, float result[], + const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], struct Mesh *me, const BakeNormalSwizzle normal_swizzle[3], float mat[4][4]); void RE_bake_normal_world_to_world( - const BakePixel pixel_array[], const int num_pixels, const int depth, float result[], + const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[], const BakeNormalSwizzle normal_swizzle[3]); void RE_bake_ibuf_clear(struct Image *image, const bool is_tangent); -- cgit v1.2.3