comparison OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.cpp @ 1575:e4a52cbbdd70

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