From 000a5e124b66698b02599e772fa4e4468a22fb09 Mon Sep 17 00:00:00 2001 From: coulsonwang Date: Tue, 28 May 2019 10:14:55 +0800 Subject: [PATCH] fix location (#19764) --- cocos/renderer/backend/ProgramState.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cocos/renderer/backend/ProgramState.cpp b/cocos/renderer/backend/ProgramState.cpp index 8a823da970..91a272a3cd 100644 --- a/cocos/renderer/backend/ProgramState.cpp +++ b/cocos/renderer/backend/ProgramState.cpp @@ -146,6 +146,10 @@ TextureInfo& TextureInfo::operator=(TextureInfo&& rhs) //release the textures before cleaning the vertor rhs.releaseTextures(); rhs.textures.clear(); + +#if CC_ENABLE_CACHE_TEXTURE_DATA + location = rhs.location; +#endif } return *this; } @@ -157,6 +161,10 @@ TextureInfo& TextureInfo::operator=(const TextureInfo& rhs) slot = rhs.slot; textures = rhs.textures; retainTextures(); + +#if CC_ENABLE_CACHE_TEXTURE_DATA + location = rhs.location; +#endif } return *this; }