diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-07-28 21:29:03 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-07-31 07:35:16 +0400 |
commit | 9952699978a132e4866acd26817fb9cfec23419d (patch) | |
tree | e0bdf99211ecc815b44636ea78a33ddf91cf6b4b /source/blender/render/extern/include/RE_bake.h | |
parent | 5e4a97d109b24444b9f2a80fdea6788d4d7a140d (diff) |
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
Diffstat (limited to 'source/blender/render/extern/include/RE_bake.h')
-rw-r--r-- | source/blender/render/extern/include/RE_bake.h | 18 |
1 files changed, 9 insertions, 9 deletions
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); |