Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/imagetexture.c
| Context not available. | |||||
| #include <io.h> | #include <io.h> | ||||
| #endif | #endif | ||||
| #include "IMB_imbuf_types.h" | #include "DNA_imbuf_types.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "DNA_image_types.h" | #include "DNA_image_types.h" | ||||
| Context not available. | |||||
| if (skip_load_image && !BKE_image_has_loaded_ibuf(ima)) | if (skip_load_image && !BKE_image_has_loaded_ibuf(ima)) | ||||
| return retval; | return retval; | ||||
| ibuf = BKE_image_pool_acquire_ibuf(ima, &tex->iuser, pool); | ibuf = BKE_image_pool_acquire_ibuf(ima, &tex->iuser, pool, IMA_IBUF_IMA); | ||||
| ima->flag|= IMA_USED_FOR_RENDER; | ima->flag|= IMA_USED_FOR_RENDER; | ||||
| } | } | ||||
| Context not available. | |||||
| if (skip_load_image && !BKE_image_has_loaded_ibuf(ima)) { | if (skip_load_image && !BKE_image_has_loaded_ibuf(ima)) { | ||||
| return retval; | return retval; | ||||
| } | } | ||||
| ibuf = BKE_image_pool_acquire_ibuf(ima, &tex->iuser, pool); | ibuf = BKE_image_pool_acquire_ibuf(ima, &tex->iuser, pool, IMA_IBUF_IMA); | ||||
| } | } | ||||
| if ((ibuf == NULL) || ((ibuf->rect == NULL) && (ibuf->rect_float == NULL))) { | if ((ibuf == NULL) || ((ibuf->rect == NULL) && (ibuf->rect_float == NULL))) { | ||||
| Context not available. | |||||
| if (skip_load_image && !BKE_image_has_loaded_ibuf(ima)) | if (skip_load_image && !BKE_image_has_loaded_ibuf(ima)) | ||||
| return retval; | return retval; | ||||
| ibuf = BKE_image_pool_acquire_ibuf(ima, &tex->iuser, pool); | ibuf = BKE_image_pool_acquire_ibuf(ima, &tex->iuser, pool, IMA_IBUF_IMA); | ||||
| ima->flag|= IMA_USED_FOR_RENDER; | ima->flag|= IMA_USED_FOR_RENDER; | ||||
| } | } | ||||
| Context not available. | |||||
| void image_sample(Image *ima, float fx, float fy, float dx, float dy, float result[4], struct ImagePool *pool) | void image_sample(Image *ima, float fx, float fy, float dx, float dy, float result[4], struct ImagePool *pool) | ||||
| { | { | ||||
| TexResult texres; | TexResult texres; | ||||
| ImBuf *ibuf = BKE_image_pool_acquire_ibuf(ima, NULL, pool); | ImBuf *ibuf = BKE_image_pool_acquire_ibuf(ima, NULL, pool, IMA_IBUF_IMA); | ||||
| if (UNLIKELY(ibuf == NULL)) { | if (UNLIKELY(ibuf == NULL)) { | ||||
| zero_v4(result); | zero_v4(result); | ||||
| Context not available. | |||||