Revision: 48006
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48006
Author: moguri
Date: 2012-06-17 07:59:22 +0000 (Sun, 17 Jun 2012)
Log Message:
-----------
Fix for [#31848] "BGE: Commit r47628 breaks custom GLSL material shaders"
reported by Alex Fraser.
Custom shaders is a case where the BGE can be using GLSL materials and still
need to upload textures without bf_gpu. I tweaked some logic to handle this
special case and added more comments.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47628
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-17 04:14:44 UTC (rev 48005)
+++ trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
2012-06-17 07:59:22 UTC (rev 48006)
@@ -176,7 +176,8 @@
mMaterial->matname<< ", image
will not be available");
}
// If we're using glsl materials, the textures are handled by
bf_gpu, so don't load them twice!
- else if (!mMaterial->glslmat) {
+ // However, if we're using a custom shader, then we still need
to load the textures ourselves.
+ else if (!mMaterial->glslmat || mBlenderShader) {
if ( mMaterial->img[i] ) {
if ( ! mTextures[i].InitFromImage(i,
mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 ))
spit("unable to initialize
image("<<i<<") in "<<
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs