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:
authorClément Foucault <foucault.clem@gmail.com>2020-07-26 21:17:01 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-26 22:07:25 +0300
commit487eaeed7e3da6bbadc7899062574ef9b62ab7e4 (patch)
treec90cd601f1a4169ecdfb1e24a7a5a0c9a0ad827e /source/blender/makesrna/intern/rna_image_api.c
parent025dc31d28446039f949d8c12359c64c90530bee (diff)
GPUTexture: Replace GL textarget enum by Image enum
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 41c0e724234..fecd364992b 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -222,19 +222,20 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int frame)
BKE_imageuser_default(&iuser);
iuser.framenr = frame;
- GPUTexture *tex = GPU_texture_from_blender(image, &iuser, NULL, GL_TEXTURE_2D);
+ GPUTexture *tex = GPU_texture_from_blender(image, &iuser, NULL, TEXTARGET_TEXTURE_2D);
if (tex == NULL) {
BKE_reportf(reports, RPT_ERROR, "Failed to load image texture '%s'", image->id.name + 2);
- return (int)GL_INVALID_OPERATION;
+ /* TODO(fclem) this error code makes no sense for vulkan. */
+ return 0x0502; /* GL_INVALID_OPERATION */
}
- return GL_NO_ERROR;
+ return 0; /* GL_NO_ERROR */
}
static int rna_Image_gl_touch(Image *image, ReportList *reports, int frame)
{
- int error = GL_NO_ERROR;
+ int error = 0; /* GL_NO_ERROR */
BKE_image_tag_time(image);