aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-10-27 12:23:33 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-10-27 12:23:33 -0700
commitcf1411ea51f30cf7f30d27f2eff61cd21b1fc386 (patch)
tree46febd01065eedd42ba9b71f879f3e64a6127788
parent4563af3f091d16da991cdb4603cd18d9cce5b640 (diff)
show alerts if antialiasing, depth or stencil are missing in context attributes test
-rw-r--r--tests/test_webgl_context_attributes_common.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_webgl_context_attributes_common.c b/tests/test_webgl_context_attributes_common.c
index 80d569ce..7131203b 100644
--- a/tests/test_webgl_context_attributes_common.c
+++ b/tests/test_webgl_context_attributes_common.c
@@ -3,6 +3,8 @@
#include <string.h>
#include <stdbool.h>
+#include <emscripten.h>
+
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
static const int WINDOWS_SIZE = 500;
@@ -245,12 +247,15 @@ extern int webglStencilSupported();
static void checkContextAttributesSupport() {
if (!webglAntialiasSupported()) {
resultAA = 1;
- }
+ EM_ASM(alert('warning: no antialiasing\n'));
+ }
if (!webglDepthSupported()) {
resultDepth = 1;
- }
+ EM_ASM(alert('warning: no depth\n'));
+ }
if (!webglStencilSupported()) {
resultStencil = 1;
+ EM_ASM(alert('warning: no stencil\n'));
}
}