diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 128cc9f7eb3..a326338895d 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -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: { diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 7f047776329..57ad70166fe 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -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: {