diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-06-08 23:57:28 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-06-08 23:57:28 +0400 |
commit | 8a4f16739ae44c96568a0efae9f668c46bcf8035 (patch) | |
tree | 15a7eb00dc13377c86b2aba73db999ee4289cbf9 /source/gameengine/Ketsji/KX_BlenderMaterial.cpp | |
parent | 7c87f646c256dc8b8a97de2ad2d5c4b0dbe1a4a0 (diff) |
Fixing a BGE bug where textures could get loaded into VRAM twice.
Diffstat (limited to 'source/gameengine/Ketsji/KX_BlenderMaterial.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 018a8d44cc1..939f0693161 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -175,8 +175,8 @@ void KX_BlenderMaterial::OnConstruction(int layer) 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 "<< |