Mercurial > hg > orthanc-stone
comparison Framework/Viewport/SdlViewport.cpp @ 1332:be614695747d broker
std::string in viewport ctor
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 31 Mar 2020 10:59:00 +0200 |
parents | ab81ee8fce1f |
children | 32272ecfc6c2 |
comparison
equal
deleted
inserted
replaced
1331:ab81ee8fce1f | 1332:be614695747d |
---|---|
72 event.type = refreshEvent_; | 72 event.type = refreshEvent_; |
73 SDL_PushEvent(&event); // This function is thread-safe, and can be called from other threads safely. | 73 SDL_PushEvent(&event); // This function is thread-safe, and can be called from other threads safely. |
74 } | 74 } |
75 | 75 |
76 | 76 |
77 SdlOpenGLViewport::SdlOpenGLViewport(const char* title, | 77 SdlOpenGLViewport::SdlOpenGLViewport(const std::string& title, |
78 unsigned int width, | 78 unsigned int width, |
79 unsigned int height, | 79 unsigned int height, |
80 bool allowDpiScaling) : | 80 bool allowDpiScaling) : |
81 context_(title, width, height, allowDpiScaling) | 81 context_(title.c_str(), width, height, allowDpiScaling) |
82 { | 82 { |
83 AcquireCompositor(new OpenGLCompositor(context_)); // (*) | 83 AcquireCompositor(new OpenGLCompositor(context_)); // (*) |
84 } | 84 } |
85 | 85 |
86 boost::shared_ptr<SdlOpenGLViewport> SdlOpenGLViewport::Create(const char* title, | 86 boost::shared_ptr<SdlOpenGLViewport> SdlOpenGLViewport::Create( |
87 unsigned int width, | 87 const std::string& title, |
88 unsigned int height, | 88 unsigned int width, |
89 bool allowDpiScaling) | 89 unsigned int height, |
90 bool allowDpiScaling) | |
90 { | 91 { |
91 boost::shared_ptr<SdlOpenGLViewport> that = | 92 boost::shared_ptr<SdlOpenGLViewport> that = |
92 boost::shared_ptr<SdlOpenGLViewport>(new SdlOpenGLViewport(title, width, height, allowDpiScaling)); | 93 boost::shared_ptr<SdlOpenGLViewport>(new SdlOpenGLViewport(title, width, height, allowDpiScaling)); |
93 that->SdlViewport::PostConstructor(); | 94 that->SdlViewport::PostConstructor(); |
94 return that; | 95 return that; |