[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47628] trunk/blender/source/gameengine/ Ketsji/KX_BlenderMaterial.cpp: Fixing a BGE bug where textures could get loaded into VRAM twice.

Mitchell Stokes mogurijin at gmail.com
Fri Jun 8 21:57:32 CEST 2012


Revision: 47628
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47628
Author:   moguri
Date:     2012-06-08 19:57:28 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
Fixing a BGE bug where textures could get loaded into VRAM twice.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp	2012-06-08 19:57:25 UTC (rev 47627)
+++ trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp	2012-06-08 19:57:28 UTC (rev 47628)
@@ -175,8 +175,8 @@
 				spit("unable to initialize image("<<i<<") in "<< 
 						 mMaterial->matname<< ", image will not be available");
 		} 
-	
-		else {
+		// If we're using glsl materials, the textures are handled by bf_gpu, so don't load them twice!
+		else if (!mMaterial->glslmat) {
 			if ( mMaterial->img[i] ) {
 				if ( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 ))
 					spit("unable to initialize image("<<i<<") in "<< 




More information about the Bf-blender-cvs mailing list