am f37a7ed6: GLES translator: don\'t delete EGLImage textures
* commit 'f37a7ed6c5c609a3afc33f81bf50893362917ae6': GLES translator: don't delete EGLImage textures
This commit is contained in:
@@ -1664,10 +1664,13 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOE
|
||||
if (ctx->shareGroup().Ptr()) {
|
||||
ObjectLocalName tex = TextureLocalName(target,ctx->getBindedTexture(target));
|
||||
unsigned int oldGlobal = ctx->shareGroup()->getGlobalName(TEXTURE, tex);
|
||||
// Delete old texture object
|
||||
// Delete old texture object but only if it is not a target of a EGLImage
|
||||
if (oldGlobal) {
|
||||
TextureData* oldTexData = getTextureData(tex);
|
||||
if (!oldTexData || oldTexData->sourceEGLImage == 0) {
|
||||
ctx->dispatcher().glDeleteTextures(1, &oldGlobal);
|
||||
}
|
||||
}
|
||||
// replace mapping and bind the new global object
|
||||
ctx->shareGroup()->replaceGlobalName(TEXTURE, tex,img->globalTexName);
|
||||
ctx->dispatcher().glBindTexture(GL_TEXTURE_2D, img->globalTexName);
|
||||
|
||||
Reference in New Issue
Block a user