comparison Framework/Viewport/SdlViewport.cpp @ 1055:af456106576c

moving GetCanvasIdentifier from IViewport to WebAssemblyViewport
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Oct 2019 16:07:58 +0200
parents 32b403a47b19
children f3bb9a6dd949 2d8ab34c8c91
comparison
equal deleted inserted replaced
1054:3c9529edf5fd 1055:af456106576c
28 { 28 {
29 SdlOpenGLViewport::SdlOpenGLViewport(const char* title, 29 SdlOpenGLViewport::SdlOpenGLViewport(const char* title,
30 unsigned int width, 30 unsigned int width,
31 unsigned int height, 31 unsigned int height,
32 bool allowDpiScaling) : 32 bool allowDpiScaling) :
33 SdlViewport(title),
34 context_(title, width, height, allowDpiScaling) 33 context_(title, width, height, allowDpiScaling)
35 { 34 {
36 compositor_.reset(new OpenGLCompositor(context_, GetScene())); 35 compositor_.reset(new OpenGLCompositor(context_, GetScene()));
37 } 36 }
38 37
39 SdlOpenGLViewport::SdlOpenGLViewport(const char* title, 38 SdlOpenGLViewport::SdlOpenGLViewport(const char* title,
40 unsigned int width, 39 unsigned int width,
41 unsigned int height, 40 unsigned int height,
42 boost::shared_ptr<Scene2D>& scene, 41 boost::shared_ptr<Scene2D>& scene,
43 bool allowDpiScaling) : 42 bool allowDpiScaling) :
44 SdlViewport(title, scene), 43 SdlViewport(scene),
45 context_(title, width, height, allowDpiScaling) 44 context_(title, width, height, allowDpiScaling)
46 { 45 {
47 compositor_.reset(new OpenGLCompositor(context_, GetScene())); 46 compositor_.reset(new OpenGLCompositor(context_, GetScene()));
48 } 47 }
49 48
55 54
56 SdlCairoViewport::SdlCairoViewport(const char* title, 55 SdlCairoViewport::SdlCairoViewport(const char* title,
57 unsigned int width, 56 unsigned int width,
58 unsigned int height, 57 unsigned int height,
59 bool allowDpiScaling) : 58 bool allowDpiScaling) :
60 SdlViewport(title),
61 window_(title, width, height, false /* enable OpenGL */, allowDpiScaling), 59 window_(title, width, height, false /* enable OpenGL */, allowDpiScaling),
62 compositor_(GetScene(), width, height) 60 compositor_(GetScene(), width, height)
63 { 61 {
64 UpdateSdlSurfaceSize(width, height); 62 UpdateSdlSurfaceSize(width, height);
65 } 63 }