[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45815] trunk/blender/source/blender/ makesrna/intern/rna_image_api.c: fix [#31036] image.gl_load() consistently segfault at gluBuild2DMipmaps

Campbell Barton ideasman42 at gmail.com
Fri Apr 20 17:06:54 CEST 2012


Revision: 45815
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45815
Author:   campbellbarton
Date:     2012-04-20 15:06:54 +0000 (Fri, 20 Apr 2012)
Log Message:
-----------
fix [#31036] image.gl_load() consistently segfault at gluBuild2DMipmaps

incorrect argument to gluBuild2DMipmaps()

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_image_api.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_image_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_image_api.c	2012-04-20 14:59:24 UTC (rev 45814)
+++ trunk/blender/source/blender/makesrna/intern/rna_image_api.c	2012-04-20 15:06:54 UTC (rev 45815)
@@ -200,7 +200,7 @@
 	glBindTexture(GL_TEXTURE_2D, *bind);
 
 	if (filter != GL_NEAREST && filter != GL_LINEAR)
-		error = (int)gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_INT, ibuf->rect);
+		error = (int)gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
 
 	if (!error) {
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, image->tpageflag & IMA_CLAMP_U ? GL_CLAMP : GL_REPEAT);




More information about the Bf-blender-cvs mailing list