image.gl_load(): clear glGetError buffer before getting a new one

This commit is contained in:
Dalai Felinto 2012-05-28 17:03:13 +00:00
parent 666667bd83
commit 6323b32c08

@ -213,6 +213,8 @@ 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);
while (error != GL_NO_ERROR)
error = (int)glGetError();
}