diff options
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r-- | libs/hwui/Caches.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 27039dd..96e142c 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -79,6 +79,9 @@ void Caches::init() { mTexCoordsArrayEnabled = false; + glActiveTexture(gTextureUnits[0]); + mTextureUnit = 0; + mRegionMesh = NULL; blend = false; @@ -301,6 +304,13 @@ void Caches::disbaleTexCoordsVertexArray() { } } +void Caches::activeTexture(GLuint textureUnit) { + if (mTextureUnit != textureUnit) { + glActiveTexture(gTextureUnits[textureUnit]); + mTextureUnit = textureUnit; + } +} + TextureVertex* Caches::getRegionMesh() { // Create the mesh, 2 triangles and 4 vertices per rectangle in the region if (!mRegionMesh) { |