GLES1: Shade model API
+ add sample
BUG=angleproject:2306
Change-Id: Ie0c391618ec2b771cc99b96db02b9008a86272b9
Reviewed-on: https://chromium-review.googlesource.com/1079992
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES1.cpp b/src/libANGLE/validationES1.cpp
index 10d1cbe..a299065 100644
--- a/src/libANGLE/validationES1.cpp
+++ b/src/libANGLE/validationES1.cpp
@@ -862,10 +862,18 @@
return true;
}
-bool ValidateShadeModel(Context *context, GLenum mode)
+bool ValidateShadeModel(Context *context, ShadingModel mode)
{
- UNIMPLEMENTED();
- return true;
+ ANGLE_VALIDATE_IS_GLES1(context);
+ switch (mode)
+ {
+ case ShadingModel::Flat:
+ case ShadingModel::Smooth:
+ return true;
+ default:
+ ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidShadingModel);
+ return false;
+ }
}
bool ValidateTexCoordPointer(Context *context,