am b9a4d15d: Merge "Force-flush state sync on texid change" into lmp-mr1-dev automerge: b21a7ad

automerge: ec9b598

* commit 'ec9b598c7be65abb5ceb9d82e752c50f7e93deab':
  Force-flush state sync on texid change
This commit is contained in:
John Reck
2014-12-12 04:33:59 +00:00
committed by android-build-merger

View File

@@ -65,6 +65,12 @@ void AssetAtlas::terminate() {
void AssetAtlas::updateTextureId() {
mTexture->id = mImage ? mImage->getTexture() : 0;
if (mTexture->id) {
// Texture ID changed, force-set to defaults to sync the wrapper & GL
// state objects
mTexture->setWrap(GL_CLAMP_TO_EDGE, false, true);
mTexture->setFilter(GL_NEAREST, false, true);
}
for (size_t i = 0; i < mEntries.size(); i++) {
AssetAtlas::Entry* entry = mEntries.valueAt(i);
entry->texture->id = mTexture->id;