Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2016-05-23 00:24:26 +0300
committerThomas Dinges <blender@dingto.org>2016-05-23 00:24:26 +0300
commita2669b0cbff0dc02729a7246ac29642aca84929e (patch)
tree5ce4409ef596ee61303fdb22348d270d65ee8b0b /intern/cycles/render/image.h
parent84a9d171dab04f61a10a335a709838c0452924b8 (diff)
Cleanup: Deduplicate image loading functions using templates.
Diffstat (limited to 'intern/cycles/render/image.h')
-rw-r--r--intern/cycles/render/image.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h
index 53f739cd356..2ab16dd8967 100644
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@ -107,10 +107,12 @@ private:
bool pack_images;
bool file_load_image_generic(Image *img, ImageInput **in, int &width, int &height, int &depth, int &components);
- bool file_load_byte4_image(Image *img, device_vector<uchar4>& tex_img);
- bool file_load_byte_image(Image *img, device_vector<uchar>& tex_img);
- bool file_load_float4_image(Image *img, device_vector<float4>& tex_img);
- bool file_load_float_image(Image *img, device_vector<float>& tex_img);
+
+ template<typename T>
+ bool file_load_byte_image(Image *img, ImageDataType type, device_vector<T>& tex_img);
+
+ template<typename T>
+ bool file_load_float_image(Image *img, ImageDataType type, device_vector<T>& tex_img);
int type_index_to_flattened_slot(int slot, ImageDataType type);
int flattened_slot_to_type_index(int flat_slot, ImageDataType *type);