Skip to content

Commit

Permalink
bug fix for removing texture
Browse files Browse the repository at this point in the history
When a texture is set to null, GearVRf was not always regenerating the shader. This patch fixes that - issue Samsung#1848
  • Loading branch information
NolaDonato committed Apr 23, 2018
1 parent 6de6572 commit 10e57e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void ShaderData::setTexture(const char* key, Texture* texture)
if (temp.compare(key) == 0)
{
Texture* oldtex = mTextures[i];
makeDirty(oldtex ? MOD_TEXTURE : NEW_TEXTURE);
makeDirty(((oldtex != nullptr) && (texture != nullptr)) ? MOD_TEXTURE : NEW_TEXTURE);
mTextures[i] = texture;
return;
}
Expand Down

0 comments on commit 10e57e6

Please sign in to comment.