am 4ca8cd85: Merge "1.1 Translator: fix bug in glDeleteTexture"

* commit '4ca8cd85821b42fd40e88b45195f7d8a23062276':
  1.1 Translator: fix bug in glDeleteTexture
This commit is contained in:
David Turner
2011-07-06 07:30:01 -07:00
committed by Android Git Automerger

View File

@@ -488,9 +488,17 @@ GL_API void GL_APIENTRY glDeleteTextures( GLsizei n, const GLuint *textures) {
SET_ERROR_IF(n<0,GL_INVALID_VALUE); SET_ERROR_IF(n<0,GL_INVALID_VALUE);
if(thrd->shareGroup.Ptr()) { if(thrd->shareGroup.Ptr()) {
for(int i=0; i < n; i++){ for(int i=0; i < n; i++){
thrd->shareGroup->deleteName(TEXTURE,textures[i]); if(textures[i] != 0)
const GLuint globalTextureName = thrd->shareGroup->getGlobalName(TEXTURE,textures[i]); {
ctx->dispatcher().glDeleteTextures(1,&globalTextureName); thrd->shareGroup->deleteName(TEXTURE,textures[i]);
const GLuint globalTextureName = thrd->shareGroup->getGlobalName(TEXTURE,textures[i]);
ctx->dispatcher().glDeleteTextures(1,&globalTextureName);
if(ctx->getBindedTexture() == textures[i])
{
ctx->setBindedTexture(0);
}
}
} }
} }
} }