Cycles code internals: add CPU kernel support for 3D image textures.

This commit is contained in:
Brecht Van Lommel
2014-03-29 13:03:48 +01:00
parent 07d1fba367
commit a2e4ebd36a
11 changed files with 201 additions and 85 deletions

View File

@@ -50,6 +50,7 @@ public:
~ImageManager();
int add_image(const string& filename, void *builtin_data, bool animated, bool& is_float, bool& is_linear, InterpolationType interpolation);
void remove_image(int slot);
void remove_image(const string& filename, void *builtin_data, InterpolationType interpolation);
bool is_float_image(const string& filename, void *builtin_data, bool& is_linear);
@@ -63,15 +64,9 @@ public:
bool need_update;
boost::function<void(const string &filename, void *data, bool &is_float, int &width, int &height, int &channels)> builtin_image_info_cb;
boost::function<void(const string &filename, void *data, bool &is_float, int &width, int &height, int &depth, int &channels)> builtin_image_info_cb;
boost::function<bool(const string &filename, void *data, unsigned char *pixels)> builtin_image_pixels_cb;
boost::function<bool(const string &filename, void *data, float *pixels)> builtin_image_float_pixels_cb;
private:
int tex_num_images;
int tex_num_float_images;
int tex_image_byte_start;
thread_mutex device_mutex;
int animation_frame;
struct Image {
string filename;
@@ -84,6 +79,13 @@ private:
int users;
};
private:
int tex_num_images;
int tex_num_float_images;
int tex_image_byte_start;
thread_mutex device_mutex;
int animation_frame;
vector<Image*> images;
vector<Image*> float_images;
void *osl_texture_system;