GLES1: GL_OES_draw_texture
BUG=angleproject:2306
This implements GL_OES_draw_texture using a few bits of new state
in the renderer and adding a code path for it in the shader, using
gl_VertexID to draw the quad backing the texture draw. This allows us
to avoid allocating a separate vertex array for the texture draw and
reuses the current shader as much as possible, plugging in to the
existing multitexturing pipeline.
- Add unit test and sample
- No new test expectations, but advertising GL_OES_draw_texture makes
the DrawTex GLES1 conformance test non-trivial and actually test
glDrawTex*.
Change-Id: I1485098249fe44d46a01cab4bb7b2c39d0492923
Reviewed-on: https://chromium-review.googlesource.com/1135930
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 54f8fd3..d081a37 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -3091,9 +3091,10 @@
if (getClientVersion() < ES_2_0)
{
// Default extensions for GLES1
- supportedExtensions.pointSizeArray = true;
- supportedExtensions.textureCubeMap = true;
- supportedExtensions.pointSprite = true;
+ supportedExtensions.pointSizeArray = true;
+ supportedExtensions.textureCubeMap = true;
+ supportedExtensions.pointSprite = true;
+ supportedExtensions.drawTexture = true;
supportedExtensions.parallelShaderCompile = false;
}