- const int width = 640, height = 480;
- if(glfwOpenWindow(width, height, 8, 8, 8, 8, 16, 0, GLFW_WINDOW) == GL_TRUE)
- {
- //glfwSwapBuffers();
+ EmscriptenWebGLContextAttributes attribs = { 0 };
+ attribs.depth = 1;
+ attribs.antialias = 1;
+
+ /*
+ EM_BOOL alpha;
+ EM_BOOL depth;
+ EM_BOOL stencil;
+ EM_BOOL antialias;
+ EM_BOOL premultipliedAlpha;
+ EM_BOOL preserveDrawingBuffer;
+ EM_BOOL preferLowPowerToHighPerformance;
+ EM_BOOL failIfMajorPerformanceCaveat;
+ int majorVersion;
+ int minorVersion;
+ EM_BOOL enableExtensionsByDefault;
+ */
+
+ emscripten_webgl_init_context_attributes(&attribs);
+ oglSystem.pow2textures = true;
+ oglSystem.maxTextureSize = 16384;
+ oglSystem.glc = emscripten_webgl_create_context("canvas", &attribs);
+ if(emscripten_webgl_make_context_current(oglSystem.glc) == EMSCRIPTEN_RESULT_SUCCESS)