1 /* 2 * Copyright 2013 The Emscripten Authors. All rights reserved. 3 * Emscripten is available under two separate licenses, the MIT license and the 4 * University of Illinois/NCSA Open Source License. Both these licenses can be 5 * found in the LICENSE file. 6 */ 7 8 #include <GL/glew.h> 9 #include <GL/glut.h> 10 #include <emscripten.h> 11 12 #include "test_webgl_context_attributes_common.c" 13 main(int argc,char * argv[])14int main(int argc, char *argv[]) { 15 16 checkContextAttributesSupport(); 17 18 unsigned int glutDisplayMode = GLUT_RGBA | GLUT_DOUBLE; 19 20 #ifdef AA_ACTIVATED 21 antiAliasingActivated = true; 22 glutDisplayMode |= GLUT_MULTISAMPLE; 23 #endif 24 25 #ifdef DEPTH_ACTIVATED 26 depthActivated = true; 27 glutDisplayMode |= GLUT_DEPTH; 28 #endif 29 30 #ifdef STENCIL_ACTIVATED 31 stencilActivated = true; 32 glutDisplayMode |= GLUT_STENCIL; 33 #endif 34 35 #ifdef ALPHA_ACTIVATED 36 alphaActivated = true; 37 glutDisplayMode |= GLUT_ALPHA; 38 #endif 39 40 glutInit(&argc, argv); 41 glutInitWindowSize(WINDOWS_SIZE, WINDOWS_SIZE); 42 glutInitDisplayMode(glutDisplayMode); 43 glutCreateWindow("WebGL"); 44 glutDisplayFunc(draw); 45 46 glewInit(); 47 initGlObjects(); 48 49 draw(); 50 51 REPORT_RESULT(result); 52 53 return 0; 54 } 55