Implicit Window::MakeReady on context set.

This commit is contained in:
Ben Vanik
2015-09-07 09:29:07 -07:00
parent ec7c74d04c
commit fa9c681c7c
3 changed files with 8 additions and 9 deletions

View File

@@ -75,8 +75,10 @@ class Window {
virtual bool Initialize() { return true; }
void set_context(std::unique_ptr<GraphicsContext> context) {
context_ = std::move(context);
if (context_) {
MakeReady();
}
}
virtual bool MakeReady();
bool LoadLanguage(std::string filename);
bool LoadSkin(std::string filename);
@@ -116,6 +118,8 @@ class Window {
protected:
Window(Loop* loop, const std::wstring& title);
virtual bool MakeReady();
virtual bool InitializeElemental(Loop* loop,
el::graphics::Renderer* renderer);