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:
authorDalai Felinto <dfelinto@gmail.com>2012-05-28 21:03:13 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-05-28 21:03:13 +0400
commit6323b32c082997a8fe7c1b8cf99106428a4aa9e0 (patch)
tree2c9bba7b4e3c904990da8b908c589fb1223b85f8 /source/blender/makesrna/intern/rna_image_api.c
parent666667bd8360b1a4d3f3a63a999f67bcf4153a2b (diff)
image.gl_load(): clear glGetError buffer before getting a new one
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index cf19002f44e..336f033eae4 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -213,7 +213,9 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int filter, int
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLint)mag);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ibuf->x, ibuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
- error = (int)glGetError();
+
+ while (error != GL_NO_ERROR)
+ error = (int)glGetError();
}
if (error) {