2
* Copyright 2011, Blender Foundation.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
#include "device_memory.h"
24
#include "util_string.h"
25
#include "util_vector.h"
29
#define TEX_NUM_FLOAT_IMAGES 5
30
#define TEX_NUM_IMAGES 95
31
#define TEX_IMAGE_MAX (TEX_NUM_IMAGES + TEX_NUM_FLOAT_IMAGES)
32
#define TEX_IMAGE_FLOAT_START TEX_NUM_IMAGES
43
int add_image(const string& filename, bool& is_float);
44
void remove_image(const string& filename);
46
void device_update(Device *device, DeviceScene *dscene, Progress& progress);
47
void device_free(Device *device, DeviceScene *dscene);
49
void set_osl_texture_system(void *texture_system);
61
vector<Image*> images;
62
vector<Image*> float_images;
63
void *osl_texture_system;
65
bool file_load_image(Image *img, device_vector<uchar4>& tex_img);
66
bool file_load_float_image(Image *img, device_vector<float4>& tex_img);
68
void device_load_image(Device *device, DeviceScene *dscene, int slot);
69
void device_free_image(Device *device, DeviceScene *dscene, int slot);
74
#endif /* __IMAGE_H__ */