comparison OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.cpp @ 1578:1f812f4c95be

comments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Sep 2020 17:20:36 +0200
parents 92fca2b3ba3d
children
comparison
equal deleted inserted replaced
1577:e8a120dd05bd 1578:1f812f4c95be
48 { 48 {
49 // Context configuration 49 // Context configuration
50 EmscriptenWebGLContextAttributes attr; 50 EmscriptenWebGLContextAttributes attr;
51 emscripten_webgl_init_context_attributes(&attr); 51 emscripten_webgl_init_context_attributes(&attr);
52 52
53 #if 1 53 // The next line might be necessary to print using
54 // The next line might be necessary to print on Firefox 71 54 // WebGL. Sometimes, if set to "false" (the default value),
55 // using WebGL. Sometimes, if set to "false" (the default 55 // the canvas was rendered as a fully white or black
56 // value), the canvas was rendered as a fully white or black 56 // area. UNCONFIRMED.
57 // area. UNCONFIRMED, so disabled.
58 attr.preserveDrawingBuffer = true; 57 attr.preserveDrawingBuffer = true;
59 #endif
60 58
61 context_ = emscripten_webgl_create_context(canvasSelector.c_str(), &attr); 59 context_ = emscripten_webgl_create_context(canvasSelector.c_str(), &attr);
62 if (context_ == 0) 60 if (context_ == 0)
63 { 61 {
64 std::string message("Cannot create an OpenGL context for the element with the following CSS selector: \""); 62 std::string message("Cannot create an OpenGL context for the element with the following CSS selector: \"");