Mercurial > hg > orthanc-stone
diff Applications/Sdl/SdlEngine.h @ 53:c2dc924f1a63 wasm
removing threading out of the framework
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Apr 2017 16:57:49 +0200 |
parents | b340879da9bd |
children | 9e3c2e75b870 |
line wrap: on
line diff
--- a/Applications/Sdl/SdlEngine.h Thu Apr 27 14:50:40 2017 +0200 +++ b/Applications/Sdl/SdlEngine.h Thu Apr 27 16:57:49 2017 +0200 @@ -25,6 +25,7 @@ #include "SdlBuffering.h" #include "../BinarySemaphore.h" +#include "../BasicApplicationContext.h" #include <boost/thread.hpp> @@ -33,14 +34,14 @@ class SdlEngine : public IViewport::IChangeObserver { private: - SdlWindow& window_; - IViewport& viewport_; - SdlBuffering buffering_; - boost::thread renderThread_; - bool continue_; - BinarySemaphore renderFrame_; - uint32_t refreshEvent_; - bool viewportChanged_; + SdlWindow& window_; + BasicApplicationContext& context_; + SdlBuffering buffering_; + boost::thread renderThread_; + bool continue_; + BinarySemaphore renderFrame_; + uint32_t refreshEvent_; + bool viewportChanged_; void RenderFrame(); @@ -49,7 +50,8 @@ static KeyboardModifiers GetKeyboardModifiers(const uint8_t* keyboardState, const int scancodeCount); - void SetSize(unsigned int width, + void SetSize(BasicApplicationContext::ViewportLocker& locker, + unsigned int width, unsigned int height); void Stop(); @@ -58,7 +60,7 @@ public: SdlEngine(SdlWindow& window, - IViewport& viewport); + BasicApplicationContext& context); virtual ~SdlEngine();