Merge pull request #38244 from m4gr3d/resolve_gl_invalid_enum_error

[3.2] Restrict `GL_TEXTURE_EXTERNAL_OES` to Android platforms
This commit is contained in:
Rémi Verschelde 2020-04-28 11:20:11 +02:00 committed by GitHub
commit 60609ff0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -565,7 +565,11 @@ void RasterizerStorageGLES2::texture_allocate(RID p_texture, int p_width, int p_
texture->images.resize(1);
} break;
case VS::TEXTURE_TYPE_EXTERNAL: {
#ifdef ANDROID_ENABLED
texture->target = _GL_TEXTURE_EXTERNAL_OES;
#else
texture->target = GL_TEXTURE_2D;
#endif
texture->images.resize(0);
} break;
case VS::TEXTURE_TYPE_CUBEMAP: {

View File

@ -666,7 +666,11 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_
texture->images.resize(1);
} break;
case VS::TEXTURE_TYPE_EXTERNAL: {
#ifdef ANDROID_ENABLED
texture->target = _GL_TEXTURE_EXTERNAL_OES;
#else
texture->target = GL_TEXTURE_2D;
#endif
texture->images.resize(0);
} break;
case VS::TEXTURE_TYPE_CUBEMAP: {